Skip to content

Commit

Permalink
build: enable C11 globally and C11 atomics on MSVC
Browse files Browse the repository at this point in the history
This accounts for local changes to the repository that are unguarded and
undocumented.
  • Loading branch information
compnerd committed Dec 17, 2024
1 parent 1672f06 commit ed08913
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 ed08913

Please sign in to comment.