mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
build: only add compiler flag if it is supported
This ensures that we only add the flag if it is supported by the compiler rather than doing it unconditionally.
This commit is contained in:
@@ -295,7 +295,9 @@ macro(swift_common_cxx_warnings)
|
||||
|
||||
if(MSVC)
|
||||
check_cxx_compiler_flag("/we4062" CXX_SUPPORTS_WE4062)
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:/we4062>)
|
||||
if(CXX_SUPPORTS_WE4062)
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:/we4062>)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user