From 005530c9c08510539584b2f73eec605470f290d6 Mon Sep 17 00:00:00 2001 From: bjorn Date: Wed, 27 Apr 2022 20:31:10 -0700 Subject: [PATCH] CMake: Add C_STANDARD_REQUIRED; When you set C_STANDARD, CMake won't listen and will decay to older C versions if the one you asked for isn't supported. You can set C_STANDARD_REQUIRED, but it won't work in VS 2017 and below. I guess this is better than nothing. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5bc8a5b1..299434dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -323,6 +323,7 @@ endif() set_target_properties(lovr PROPERTIES C_VISIBILITY_PRESET ${LOVR_SYMBOL_VISIBILITY}) set_target_properties(lovr PROPERTIES C_STANDARD 11) +set_target_properties(lovr PROPERTIES C_STANDARD_REQUIRED ON) target_include_directories(lovr PRIVATE src src/modules src/lib/stdatomic etc) target_link_libraries(lovr ${LOVR_GLFW}