]> granicus.if.org Git - icinga2/commitdiff
Enable -Wno-deprecated-register for Clang and AppleClang
authorMichael Friedrich <michael.friedrich@netways.de>
Tue, 14 Jul 2015 13:02:43 +0000 (15:02 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Tue, 14 Jul 2015 13:02:43 +0000 (15:02 +0200)
refs #9414

CMakeLists.txt
lib/config/CMakeLists.txt
tools/mkclass/CMakeLists.txt

index 3241607cd27908833ff98526bdd86dc5e58bbbc3..fbe631c307e335db382f92ae0200029ab01eb7d0 100644 (file)
@@ -118,7 +118,7 @@ if(APPLE)
   set(CMAKE_MACOSX_RPATH 0)
 endif(APPLE)
 
-if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
+if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Qunused-arguments -g")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments -g")
 endif()
index 09cd12830bef3570086c10ce2e289dbf9dcc0d30..102f6e6d1dd2bc74b6df68d44a4f27a7edb6d915 100644 (file)
@@ -24,7 +24,7 @@ set_property(SOURCE ${CMAKE_CURRENT_BINARY_DIR}/config_parser.cc PROPERTY EXCLUD
 flex_target(config_lexer config_lexer.ll ${CMAKE_CURRENT_BINARY_DIR}/config_lexer.cc)
 set_property(SOURCE ${CMAKE_CURRENT_BINARY_DIR}/config_lexer.cc PROPERTY EXCLUDE_UNITY_BUILD TRUE)
 
-if(APPLE)
+if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
   set_property(SOURCE ${CMAKE_CURRENT_BINARY_DIR}/config_parser.cc PROPERTY COMPILE_FLAGS "-Wno-deprecated-register")
   set_property(SOURCE ${CMAKE_CURRENT_BINARY_DIR}/config_lexer.cc PROPERTY COMPILE_FLAGS "-Wno-deprecated-register")
 endif()
index 424d2d3ab780c4012fbb84463d9ae742c53fa961..5dba4577ac9064112f51b57fda5977df7829c1a6 100644 (file)
@@ -22,7 +22,7 @@ bison_target(class_parser class_parser.yy ${CMAKE_CURRENT_BINARY_DIR}/class_pars
 flex_target(class_lexer class_lexer.ll ${CMAKE_CURRENT_BINARY_DIR}/class_lexer.cc)
 add_flex_bison_dependency(class_lexer class_parser)
 
-if(APPLE)
+if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
   set_property(SOURCE ${CMAKE_CURRENT_BINARY_DIR}/class_parser.cc PROPERTY COMPILE_FLAGS "-Wno-deprecated-register")
   set_property(SOURCE ${CMAKE_CURRENT_BINARY_DIR}/class_lexer.cc PROPERTY COMPILE_FLAGS "-Wno-deprecated-register")
 endif()