commit 599e066a13a1290a678cf7464a5014af5023b0ae
Author: Kornel Benko <[email protected]>
Date:   Wed Jul 2 11:18:38 2025 +0200

    Cmake build: Omit unrecognized option for GNU compiler
---
 src/CMakeLists.txt | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 05d1fd4f57..ba887c6b21 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -8,7 +8,12 @@ project(${_lyx})
 
 include_directories(${TOP_SRC_DIR}/src)
 
-add_compile_options(-Wno-nested-anon-types)
+if (CMAKE_CXX_COMPILER_ID MATCHES "^([cC]lang|AppleClang)$")
+  add_compile_options(-Wno-nested-anon-types)
+else()
+  # GNU compiler emits the note "unrecognized command-line option 
‘-Wno-nested-anon-types’"
+  # but only if some other warning also occured
+endif()
 
 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
 set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMakeTargets")
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to