Skip to content

Commit

Permalink
Don't enable C11 for MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
athre0z committed Apr 21, 2022
1 parent ee78456 commit c58d7fb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmake/zyan-functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
# =============================================================================================== #

function (zyan_set_common_flags target)
set_target_properties("${target}" PROPERTIES C_STANDARD 11)
if (MSVC)
# MSVC support for C11 is still pretty lacking, so we instead just disable the warnings
# about using non-standard C extensions.
target_compile_options("${target}" PUBLIC "/wd4201")
else ()
# For the more civilized compilers, we go with C11.
set_target_properties("${target}" PROPERTIES C_STANDARD 11)
endif ()

if (ZYAN_DEV_MODE)
# If in developer mode, be pedantic.
Expand Down

0 comments on commit c58d7fb

Please sign in to comment.