-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
33 lines (29 loc) · 1017 Bytes
/
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
cmake_minimum_required(VERSION 3.14)
project(Dining-Philosophers-Problem)
add_executable(${PROJECT_NAME} src/main.cpp
src/Fork.cpp
src/Logger.cpp
src/Philosopher.cpp
src/PhilosophyMeeting.cpp)
if (NOT WIN32)
target_link_libraries(${PROJECT_NAME}
pthread
-fsanitize=thread)
target_compile_options(${PROJECT_NAME}
PRIVATE
-Wall
-Wextra
-Wpedantic
-Wconversion
-Werror
-fsanitize=thread)
else()
target_compile_options(${PROJECT_NAME}
PRIVATE
-Wall
-Wextra
-Wpedantic
-Wconversion
-Werror)
endif()
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)