Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't enable C11 for MSVC #44

Merged
merged 1 commit into from
Apr 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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