-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
48 lines (42 loc) · 1.9 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
39
40
41
42
43
44
45
46
47
48
cmake_minimum_required(VERSION 3.14)
project(RSEConUK2019CppWorkshop LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
add_executable(checkpoint_0 checkpoint_0/main.cpp)
add_executable(checkpoint_1 checkpoint_1/main.cpp)
add_executable(checkpoint_2 checkpoint_2/main.cpp)
add_executable(checkpoint_3 checkpoint_3/main.cpp)
add_executable(checkpoint_4 checkpoint_4/main.cpp)
add_executable(checkpoint_5 checkpoint_5/main.cpp)
add_executable(checkpoint_6 checkpoint_6/main.cpp)
add_executable(checkpoint_7 checkpoint_7/main.cpp)
add_executable(checkpoint_0_chrono checkpoint_0/main_chrono.cpp)
add_executable(checkpoint_7_chrono checkpoint_7/main_chrono.cpp)
# Currently need to link in TBB for parallel STL
find_library(TBB NAMES libtbb.so)
target_link_libraries(checkpoint_0 ${TBB})
target_link_libraries(checkpoint_1 ${TBB})
target_link_libraries(checkpoint_2 ${TBB})
target_link_libraries(checkpoint_3 ${TBB})
target_link_libraries(checkpoint_4 ${TBB})
target_link_libraries(checkpoint_5 ${TBB})
target_link_libraries(checkpoint_6 ${TBB})
target_link_libraries(checkpoint_7 ${TBB})
target_link_libraries(checkpoint_0_chrono ${TBB})
target_link_libraries(checkpoint_7_chrono ${TBB})
option(SLIDES "Add target for making slides" OFF)
if (SLIDES)
find_program(PANDOC pandoc)
find_path(SLIDES_DIR RSEConUK2019CppWorkshop.md PATHS ${CMAKE_CURRENT_SOURCE_DIR}/slides NO_DEFAULT_PATH)
set(SLIDES_MD ${SLIDES_DIR}/RSEConUK2019CppWorkshop.md)
set(SLIDES_PDF ${SLIDES_DIR}/RSEConUK2019CppWorkshop.pdf)
add_custom_target(
slides COMMAND
${PANDOC} -f markdown -t beamer --highlight-style ${SLIDES_DIR}/pygments_custom.theme
${SLIDES_MD} -V theme:metropolis -V aspectratio:169 -o ${SLIDES_PDF}
)
find_package (Python3 COMPONENTS Interpreter)
add_custom_target(
test_slides COMMAND
Python3::Interpreter ${SLIDES_DIR}/test_slides.py ${CMAKE_CXX_COMPILER}
)
endif ()