summaryrefslogtreecommitdiffstats
path: root/04_exercise/CMakeLists.txt
blob: 4e89060cd32d4134505c335d9d67b9e0cf185739 (plain) (blame)
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
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

add_executable(quicksort quicksort.c)
target_link_libraries(quicksort PRIVATE threadpool)

add_library(threadpool threadpool.c)
target_link_libraries(threadpool PRIVATE Threads::Threads slotmap)
target_link_libraries(threadpool INTERFACE warnings)
target_link_libraries(threadpool PUBLIC ppmlib)


add_executable(fibonacci main.c)
target_link_libraries(fibonacci PRIVATE threadpool)
target_link_libraries(fibonacci INTERFACE warnings)

add_library(arena_list arena/arena_list.c)
target_include_directories(arena_list PUBLIC arena)
target_link_libraries(arena_list INTERFACE warnings)
target_link_libraries(arena_list PRIVATE rwlock)

add_executable(arena_test arena/arena_test.c)
target_link_libraries(arena_test PRIVATE arena_list)

add_library(rwlock rwlock/rwlock.c)
target_include_directories(rwlock PUBLIC rwlock)
target_link_libraries(rwlock INTERFACE warnings)

add_library(ppmlib INTERFACE)
target_include_directories(ppmlib INTERFACE ppmlib)

add_library(slotmap slotmap/slotmap.c)
target_include_directories(slotmap PUBLIC slotmap)
target_link_libraries(slotmap INTERFACE warnings)

add_executable(slotmap_test slotmap/slomap_test.c)
target_link_libraries(slotmap_test PRIVATE slotmap)