-
Notifications
You must be signed in to change notification settings - Fork 30
/
CMakeLists.txt
32 lines (24 loc) · 1.39 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
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
project(benchmark VERSION 0.0.1 LANGUAGES CXX)
find_package(Eigen3 REQUIRED)
add_library(eigen3-dep INTERFACE IMPORTED)
target_compile_features(eigen3-dep INTERFACE cxx_std_11)
target_link_libraries(eigen3-dep INTERFACE Eigen3::Eigen)
find_package(yaml-cpp REQUIRED)
add_library(yaml-cpp-dep INTERFACE IMPORTED)
target_compile_features(yaml-cpp-dep INTERFACE cxx_std_11)
target_include_directories(yaml-cpp-dep INTERFACE ${YAML_CPP_INCLUDE_DIR})
target_link_libraries(yaml-cpp-dep INTERFACE ${YAML_CPP_LIBRARIES})
add_library(benchmark-dep INTERFACE IMPORTED)
target_sources(benchmark-dep INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/src/benchmark.h)
target_compile_features(benchmark-dep INTERFACE cxx_std_17)
target_link_libraries(benchmark-dep INTERFACE eigen3-dep yaml-cpp-dep)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
add_executable(accuracy ${CMAKE_CURRENT_SOURCE_DIR}/src/accuracy.cpp)
target_link_libraries(accuracy PUBLIC benchmark-dep)
add_executable(initialization ${CMAKE_CURRENT_SOURCE_DIR}/src/initialization.cpp)
target_link_libraries(initialization PUBLIC benchmark-dep)
add_executable(robustness ${CMAKE_CURRENT_SOURCE_DIR}/src/robustness.cpp)
target_link_libraries(robustness PUBLIC benchmark-dep)
add_executable(relocalization ${CMAKE_CURRENT_SOURCE_DIR}/src/relocalization.cpp)
target_link_libraries(relocalization PUBLIC benchmark-dep)