build: ignore pragma warnings with GCC

GCC does not support '#pragma mark'.  Add -Wno-unknown-pragmas if the compiler
supports it.

llvm-svn: 205389
This commit is contained in:
Saleem Abdulrasool 2014-04-02 03:51:16 +00:00
parent 92e4846a7b
commit f7da6c1fcf

View File

@ -133,6 +133,12 @@ if (CXX_SUPPORTS_NO_DEPRECATED_DECLARATIONS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
endif ()
check_cxx_compiler_flag("-Wno-unknown-pragmas"
CXX_SUPPORTS_NO_UNKNOWN_PRAGMAS)
if (CXX_SUPPORTS_NO_UNKNOWN_PRAGMAS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-pragmas")
endif ()
# Disable Clang warnings
check_cxx_compiler_flag("-Wno-deprecated-register"
CXX_SUPPORTS_NO_DEPRECATED_REGISTER)