From 75a57d9badd2a36657a334692659eeb2342eae9e Mon Sep 17 00:00:00 2001 From: "Alfred E. Heggestad" Date: Mon, 2 Oct 2023 13:23:35 +0200 Subject: [PATCH] cmake: enable C11 for Windows (not MINGW) Downstream patch: https://github.com/microsoft/vcpkg/blob/master/ports/baresip-libre/use-c11.patch --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 073e5e6c6..87b9adf01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,6 +32,10 @@ else() set(PROJECT_VERSION_FULL ${PROJECT_VERSION}) endif() +if(WIN32 AND NOT MINGW) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std:c11" ) +endif() + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake) ##############################################################################