-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
47 lines (33 loc) · 1.08 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
cmake_minimum_required(VERSION 3.14)
project(
Cyclop
VERSION 1.0
DESCRIPTION "A Ray Tracer Experiment"
LANGUAGES CXX
)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(DEFINED ENV{COVERAGE})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
endif()
set(TBB /usr/include/tbb)
find_package(Eigen3 3.3.7 REQUIRED NO_MODULE)
add_definitions(-DEIGEN_INITIALIZE_MATRICES_BY_ZERO=1)
add_executable(main main.cpp)
add_subdirectory(src)
target_compile_features(main PRIVATE cxx_std_17)
target_link_libraries(main PUBLIC Eigen3::Eigen)
target_link_libraries(main PRIVATE core)
target_link_libraries(main PRIVATE cameras core)
target_link_libraries(main PRIVATE hitables core)
target_link_libraries(main PRIVATE samplers core)
target_link_libraries(main PRIVATE filters core)
target_link_libraries(main PRIVATE integrators core)
include(cmake/googletest.cmake)
fetch_googletest(
${PROJECT_SOURCE_DIR}/cmake
${PROJECT_BINARY_DIR}/googletest
)
enable_testing()
add_subdirectory(test)