Skip to content

Commit 47e77d1

Browse files
committed
chore: Use C99 on MSVC instead of C11.
The windows sdk has buggy headers in C11.
1 parent 7155f7f commit 47e77d1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,12 @@ enable_testing()
8080
set(CMAKE_MACOSX_RPATH ON)
8181

8282
# Set standard version for compiler.
83-
set(CMAKE_C_STANDARD 11)
83+
if(MSVC)
84+
# https://developercommunity.visualstudio.com/t/older-winsdk-headers-are-incompatible-with-zcprepr/1593479
85+
set(CMAKE_C_STANDARD 99)
86+
else()
87+
set(CMAKE_C_STANDARD 11)
88+
endif()
8489
set(CMAKE_CXX_STANDARD 17)
8590
set(CMAKE_C_EXTENSIONS OFF)
8691
set(CMAKE_CXX_EXTENSIONS OFF)

0 commit comments

Comments
 (0)