forked from OSchip/llvm-project
build: use LLVM build routines
Check if the compiler actually supports the flags that are being added. Previously, the compiler flags would be used improperly push the flags to the compiler. Particularly, on Darwin, the option would be pushed to the compiler even if it does not support it. llvm-svn: 203532
This commit is contained in:
parent
12390847fb
commit
efbf8367e6
|
@ -126,19 +126,17 @@ elseif (MSVC_VERSION LESS 1700)
|
|||
"required to build lldb.")
|
||||
endif()
|
||||
|
||||
# Disable Clang warnings
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
add_lldb_definitions(
|
||||
-Wno-deprecated-declarations # Suppress "deprecated auto_ptr" warnings
|
||||
)
|
||||
endif()
|
||||
# Disable GCC warnings
|
||||
check_cxx_compiler_flag("-Wno-deprecated-declarations"
|
||||
CXX_SUPPORTS_NO_DEPRECATED_DECLARATIONS)
|
||||
append_if(CXX_SUPPORTS_NO_DEPRECATED_DECLARATIONS
|
||||
"-Wno-deprecated-declarations" CMAKE_CXX_FLAGS)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
|
||||
AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "3.3")
|
||||
add_lldb_definitions(
|
||||
-Wno-deprecated-register # Suppress "deprecated register keyword" warnings
|
||||
)
|
||||
endif()
|
||||
# Disable Clang warnings
|
||||
check_cxx_compiler_flag("-Wno-deprecated-register"
|
||||
CXX_SUPPORTS_NO_DEPRECATED_REGISTER)
|
||||
append_if(CXX_SUPPORTS_NO_DEPRECATED_REGISTER
|
||||
"-Wno-deprecated-register" CMAKE_CXX_FLAGS)
|
||||
|
||||
# Disable MSVC warnings
|
||||
if( MSVC )
|
||||
|
|
Loading…
Reference in New Issue