-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
38 lines (30 loc) · 1.04 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
cmake_minimum_required (VERSION 3.24)
project ("CppMemoryModel")
if (WIN32)
add_compile_definitions(_WIN32_WINNT=0x0A00 _UNICODE UNICODE)
endif ()
if (MSVC)
add_compile_options(/utf-8)
endif ()
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<IF:$<AND:$<C_COMPILER_ID:MSVC>,$<CXX_COMPILER_ID:MSVC>>,$<$<CONFIG:Debug,RelWithDebInfo>:EditAndContinue>,$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>>")
find_package(Catch2 CONFIG REQUIRED)
find_package(fmt CONFIG REQUIRED)
find_package(spdlog CONFIG REQUIRED)
find_package(TBB CONFIG REQUIRED)
find_package(benchmark CONFIG REQUIRED)
add_library(CppMemoryModel)
target_sources(CppMemoryModel PUBLIC
"AtomicMinMax.h"
"ConcurrentStack.h"
"DekkersAlgorithm.cpp"
"DekkersAlgorithm.h"
"MemoryFence.h"
"MutexConcept.h"
"StupidSelfishMutex.h")
if (WIN32)
target_sources(CppMemoryModel PUBLIC "utf8.manifest")
endif()
target_compile_features(CppMemoryModel PUBLIC cxx_std_23)
target_include_directories(CppMemoryModel PUBLIC ".")
add_subdirectory(benchmark)
add_subdirectory(test)