Skip to content

Commit 78ec9a7

Browse files
authored
Merge pull request swiftlang#78774 from compnerd/unknown-silence
build: silence C4067 on Windows (NFCI)
2 parents fc397de + 6b58947 commit 78ec9a7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

cmake/modules/SwiftSharedCMakeConfig.cmake

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,15 @@ macro(swift_common_cxx_warnings)
327327
# dynamic libraries with this flag.
328328
check_cxx_compiler_flag("-fapplication-extension" CXX_SUPPORTS_FAPPLICATION_EXTENSION)
329329

330-
# Disable C4068: unknown pragma. This means that MSVC doesn't report hundreds of warnings across
331-
# the repository for IDE features such as #pragma mark "Title".
330+
# Disable C4067: expected tokens following preprocessor directive - expected a
331+
# newline.
332+
#
333+
# Disable C4068: unknown pragma.
334+
#
335+
# This means that MSVC doesn't report hundreds of warnings across the
336+
# repository for IDE features such as #pragma mark "Title".
332337
if("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
338+
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:/wd4067>)
333339
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:/wd4068>)
334340

335341
check_cxx_compiler_flag("/permissive-" CXX_SUPPORTS_PERMISSIVE_FLAG)

0 commit comments

Comments
 (0)