Skip to content

Commit 9071f56

Browse files
committed
[C] Set C standard to C11 without extensions.
1 parent ee64afa commit 9071f56

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ if(NOT DEFINED CMAKE_CXX_EXTENSIONS)
5252
set(CMAKE_CXX_EXTENSIONS OFF)
5353
endif()
5454

55+
if(NOT DEFINED CMAKE_C_STANDARD)
56+
set(CMAKE_C_STANDARD 11)
57+
endif()
58+
59+
if(NOT DEFINED CMAKE_C_EXTENSIONS)
60+
set(CMAKE_C_EXTENSIONS OFF)
61+
endif()
62+
5563
if(SBE_TESTS)
5664
set(SBE_THIRDPARTY_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/thirdparty")
5765

0 commit comments

Comments
 (0)