Skip to content

Commit 35f2434

Browse files
authored
Merge pull request #10 from compnerd/fix
build: enable C11 globally and C11 atomics on MSVC
2 parents aa026f5 + ed08913 commit 35f2434

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ cmake_minimum_required(VERSION 3.24)
1212
project(LMDB
1313
LANGUAGES C)
1414

15+
set(CMAKE_C_STANDARD 11)
16+
17+
if("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" OR "${CMAKE_C_COMPILER_SIMULATE_ID}" STREQUAL "MSVC")
18+
add_compile_options(/experimental:c11atomics)
19+
endif()
20+
1521
# Set the build artifact directories to ensure that the generated products are
1622
# colocated and findable for wiring up into the test suites across repositories.
1723
# This pattern is applied to all Swift and LLVM repositories.

0 commit comments

Comments
 (0)