Skip to content

Commit

Permalink
Merge pull request #10 from compnerd/fix
Browse files Browse the repository at this point in the history
build: enable C11 globally and C11 atomics on MSVC
  • Loading branch information
compnerd authored Dec 18, 2024
2 parents aa026f5 + ed08913 commit 35f2434
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ cmake_minimum_required(VERSION 3.24)
project(LMDB
LANGUAGES C)

set(CMAKE_C_STANDARD 11)

if("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" OR "${CMAKE_C_COMPILER_SIMULATE_ID}" STREQUAL "MSVC")
add_compile_options(/experimental:c11atomics)
endif()

# Set the build artifact directories to ensure that the generated products are
# colocated and findable for wiring up into the test suites across repositories.
# This pattern is applied to all Swift and LLVM repositories.
Expand Down

0 comments on commit 35f2434

Please sign in to comment.