CMakeLists.txt 949 Bytes
Newer Older
Tobias Lasser's avatar
Tobias Lasser committed
1
2
cmake_minimum_required(VERSION 3.9)

3
4
5
# define a target for all examples
add_custom_target(examples)

Tobias Lasser's avatar
Tobias Lasser committed
6
7
# build the 2d example program
add_executable(example2d example2d.cpp)
8
target_link_libraries(example2d elsa::all)
9
target_compile_features(example2d PUBLIC cxx_std_17)
10
11
add_dependencies(examples example2d)

12

13
if(ELSA_BUILD_CUDA_PROJECTORS)
14
    check_language(CUDA)
15
    if(CMAKE_CUDA_COMPILER)
16
        enable_language(CUDA)
Tobias Lasser's avatar
Tobias Lasser committed
17
18
19

        # build the 3d example program
        add_executable(example3d example3d.cpp)
20
        target_link_libraries(example3d elsa::all)
Tobias Lasser's avatar
Tobias Lasser committed
21
        target_compile_features(example3d PUBLIC cxx_std_17)
22
        add_dependencies(examples example3d)
Tobias Lasser's avatar
Tobias Lasser committed
23
24

        # build the GPU projector speed test program
25
        add_executable(speed_test speed_test.cpp)
26
        target_link_libraries(speed_test elsa::all)
Nikola Dinev's avatar
Nikola Dinev committed
27
        target_compile_features(speed_test PUBLIC cxx_std_17)
28
        add_dependencies(examples speed_test)
29
30
    endif()
endif()