diff --git a/cmake/DD4hepBuild.cmake b/cmake/DD4hepBuild.cmake index 251708600725b661c9fdb50a13ec7f6c7265613e..897c5aeef1a15c459692f183f2e7b688465fab49 100644 --- a/cmake/DD4hepBuild.cmake +++ b/cmake/DD4hepBuild.cmake @@ -37,7 +37,12 @@ find_package(Threads REQUIRED) macro(dd4hep_set_compiler_flags) include(CheckCXXCompilerFlag) - SET(COMPILER_FLAGS -Wall -Wextra -pedantic -Wshadow -Wformat-security -Wno-long-long -Wdeprecated -fdiagnostics-color=auto -Winconsistent-missing-override) + SET(COMPILER_FLAGS -Wall -Wextra -pedantic -Wshadow -Wformat-security -Wno-long-long -Wdeprecated -fdiagnostics-color=auto) + + # AppleClang/Clang specific warning flags + if(CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang$") + set ( COMPILER_FLAGS ${COMPILER_FLAGS} -Winconsistent-missing-override -Wno-c++1z-extensions) + endif() FOREACH( FLAG ${COMPILER_FLAGS} ) ## meed to replace the minus or plus signs from the variables, because it is passed