Skip to content

Commit

Permalink
chore: Use C99 on MSVC instead of C11.
Browse files Browse the repository at this point in the history
The windows sdk has buggy headers in C11.
  • Loading branch information
iphydf committed Nov 22, 2023
1 parent 7155f7f commit 47e77d1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 47e77d1

Please sign in to comment.