Skip to content

Commit

Permalink
cmake: enable C11 for Windows (not MINGW) (#970)
Browse files Browse the repository at this point in the history
* cmake: enable C11 for Windows (not MINGW)

Downstream patch:

    https://github.com/microsoft/vcpkg/blob/master/ports/baresip-libre/use-c11.patch

* fix cmakelint
  • Loading branch information
alfredh authored Oct 3, 2023
1 parent 177f3f5 commit aeff9e5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

##############################################################################
Expand Down

0 comments on commit aeff9e5

Please sign in to comment.