Skip to content

Commit ed803c8

Browse files
committed
Properly initialize CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG CMake variable
A follow-up for #92953. Addresses the following buildbot failures: https://lab.llvm.org/buildbot/#/builders/36/builds/45836 https://lab.llvm.org/buildbot/#/builders/57/builds/35200
1 parent 90a4690 commit ed803c8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/cmake/modules/HandleLLVMOptions.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,10 @@ if (LLVM_ENABLE_WARNINGS AND (LLVM_COMPILER_IS_GCC_COMPATIBLE OR CLANG_CL))
817817
endif()
818818

819819
append("-Wimplicit-fallthrough" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
820+
821+
set(CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG 0)
820822
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
823+
set(CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG 1)
821824
append("-Wcovered-switch-default" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
822825
endif()
823826
append_if(USE_NO_UNINITIALIZED "-Wno-uninitialized" CMAKE_CXX_FLAGS)

0 commit comments

Comments
 (0)