File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change 1
1
2
2
# clang-cl interprets paths starting with /U as macro undefines, so we need to
3
3
# put a -- before the input file path to force it to be treated as a path.
4
- if (NOT MSVC AND "${CMAKE_SIMULATE_ID} " STREQUAL "MSVC" )
5
- string (REPLACE "-c <SOURCE>" "-c -- <SOURCE>" CMAKE_C_COMPILE_OBJECT "${CMAKE_C_COMPILE_OBJECT} " )
6
- string (REPLACE "-c <SOURCE>" "-c -- <SOURCE>" CMAKE_CXX_COMPILE_OBJECT "${CMAKE_CXX_COMPILE_OBJECT} " )
7
- endif ()
4
+ string (REPLACE "-c <SOURCE>" "-c -- <SOURCE>" CMAKE_C_COMPILE_OBJECT "${CMAKE_C_COMPILE_OBJECT} " )
5
+ string (REPLACE "-c <SOURCE>" "-c -- <SOURCE>" CMAKE_CXX_COMPILE_OBJECT "${CMAKE_CXX_COMPILE_OBJECT} " )
8
6
9
7
# NOTE(compnerd) incremental linking is known to cause corruption in the
10
8
# protocol conformance tables. Avoid using incremental links with Visual
Original file line number Diff line number Diff line change @@ -258,11 +258,7 @@ endmacro()
258
258
macro (swift_common_cxx_warnings )
259
259
# Make unhandled switch cases be an error in assert builds
260
260
if (DEFINED LLVM_ENABLE_ASSERTIONS )
261
- check_cxx_compiler_flag ("-Werror=switch" CXX_SUPPORTS_WERROR_SWITCH_FLAG )
262
- append_if (CXX_SUPPORTS_WERROR_SWITCH_FLAG "-Werror=switch" CMAKE_CXX_FLAGS )
263
-
264
- check_cxx_compiler_flag ("/we4062" CXX_SUPPORTS_WE4062 )
265
- append_if (CXX_SUPPORTS_WE4062 "/we4062" CMAKE_CXX_FLAGS )
261
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=switch" )
266
262
endif ()
267
263
268
264
check_cxx_compiler_flag ("-Werror -Wdocumentation" CXX_SUPPORTS_DOCUMENTATION_FLAG )
You can’t perform that action at this time.
0 commit comments