chore: Use C99 on MSVC instead of C11.

The windows sdk has buggy headers in C11.
This commit is contained in:
iphydf 2023-11-22 19:55:28 +00:00
parent 7155f7f60e
commit 47e77d1bb0
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9

View File

@ -80,7 +80,12 @@ enable_testing()
set(CMAKE_MACOSX_RPATH ON)
# Set standard version for compiler.
set(CMAKE_C_STANDARD 11)
if(MSVC)
# https://developercommunity.visualstudio.com/t/older-winsdk-headers-are-incompatible-with-zcprepr/1593479
set(CMAKE_C_STANDARD 99)
else()
set(CMAKE_C_STANDARD 11)
endif()
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_C_EXTENSIONS OFF)
set(CMAKE_CXX_EXTENSIONS OFF)