[lldb] Guard some GCC-style flags from MSVC
A follow up to #92953. Suggested in https://github.com/llvm/llvm-project/pull/92953#issuecomment-2143274065
This commit is contained in:
parent
16397e8ec7
commit
cd676e5b27
@ -186,6 +186,7 @@ include_directories("${CMAKE_CURRENT_BINARY_DIR}/../clang/include")
|
|||||||
# printed. Therefore, check for whether the compiler supports options in the
|
# printed. Therefore, check for whether the compiler supports options in the
|
||||||
# form -W<foo>, and if supported, add the corresponding -Wno-<foo> option.
|
# form -W<foo>, and if supported, add the corresponding -Wno-<foo> option.
|
||||||
|
|
||||||
|
if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
|
||||||
# Disable GCC warnings
|
# Disable GCC warnings
|
||||||
append("-Wno-deprecated-declarations" CMAKE_CXX_FLAGS)
|
append("-Wno-deprecated-declarations" CMAKE_CXX_FLAGS)
|
||||||
append("-Wno-unknown-pragmas" CMAKE_CXX_FLAGS)
|
append("-Wno-unknown-pragmas" CMAKE_CXX_FLAGS)
|
||||||
@ -193,6 +194,7 @@ append("-Wno-strict-aliasing" CMAKE_CXX_FLAGS)
|
|||||||
|
|
||||||
check_cxx_compiler_flag("-Wstringop-truncation" CXX_SUPPORTS_STRINGOP_TRUNCATION)
|
check_cxx_compiler_flag("-Wstringop-truncation" CXX_SUPPORTS_STRINGOP_TRUNCATION)
|
||||||
append_if(CXX_SUPPORTS_STRINGOP_TRUNCATION "-Wno-stringop-truncation" CMAKE_CXX_FLAGS)
|
append_if(CXX_SUPPORTS_STRINGOP_TRUNCATION "-Wno-stringop-truncation" CMAKE_CXX_FLAGS)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Disable Clang warnings
|
# Disable Clang warnings
|
||||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user