File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -186,13 +186,15 @@ include_directories("${CMAKE_CURRENT_BINARY_DIR}/../clang/include")
186186# printed. Therefore, check for whether the compiler supports options in the
187187# form -W<foo>, and if supported, add the corresponding -Wno-<foo> option.
188188
189- # Disable GCC warnings
190- append ("-Wno-deprecated-declarations" CMAKE_CXX_FLAGS )
191- append ("-Wno-unknown-pragmas" CMAKE_CXX_FLAGS )
192- append ("-Wno-strict-aliasing" CMAKE_CXX_FLAGS )
193-
194- check_cxx_compiler_flag("-Wstringop-truncation" CXX_SUPPORTS_STRINGOP_TRUNCATION)
195- append_if(CXX_SUPPORTS_STRINGOP_TRUNCATION "-Wno-stringop-truncation" CMAKE_CXX_FLAGS )
189+ if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
190+ # Disable GCC warnings
191+ append ("-Wno-deprecated-declarations" CMAKE_CXX_FLAGS )
192+ append ("-Wno-unknown-pragmas" CMAKE_CXX_FLAGS )
193+ append ("-Wno-strict-aliasing" CMAKE_CXX_FLAGS )
194+
195+ check_cxx_compiler_flag("-Wstringop-truncation" CXX_SUPPORTS_STRINGOP_TRUNCATION)
196+ append_if(CXX_SUPPORTS_STRINGOP_TRUNCATION "-Wno-stringop-truncation" CMAKE_CXX_FLAGS )
197+ endif ()
196198
197199# Disable Clang warnings
198200if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
You can’t perform that action at this time.
0 commit comments