Skip to content

Commit 0ecd850

Browse files
committed
Fix Windows CI build.
The Windows SDK versions present on our CI options (GitHub Actions hosted runners, AppVeyor) have headers that cause compilation warnings when included with MSVC operating in modern C modes (C11+). This PR disables the compilation warning caused by the Windows SDK headers, so we can get Windows feedback from CI. The warnings can be re-enabled when the Windows SDK used by our CI is upgraded to a version that doesn't trigger warnings.
1 parent db08d22 commit 0ecd850

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,12 @@ if(CRC32C_BUILD_TESTS)
362362
# Warnings as errors in Visual Studio for this project's targets.
363363
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
364364
set_property(TARGET crc32c_capi_tests APPEND PROPERTY COMPILE_OPTIONS "/WX")
365+
366+
# The Windows SDK version currently on CI produces warnings when some
367+
# headers are #included using C99 compatibity mode or above. This workaround
368+
# can be removed once the Windows SDK on our CI is upgraded.
369+
set_property(TARGET crc32c_capi_tests
370+
APPEND PROPERTY COMPILE_OPTIONS "/wd5105")
365371
endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
366372

367373
add_test(NAME crc32c_capi_tests COMMAND crc32c_capi_tests)

0 commit comments

Comments
 (0)