-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
46 lines (41 loc) · 1.5 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
cmake_minimum_required(VERSION 3.20)
project(
wrenfold-benchmarks
VERSION 0.1
DESCRIPTION "Benchmark wrenfold, symforce, and handwritten methods."
LANGUAGES CXX)
add_subdirectory(dependencies)
if(MSVC)
set(WARNING_FLAGS /W4 /WX /wd4244 /wd4702)
else()
set(WARNING_FLAGS -Wall -Wextra -pedantic -Werror -Wno-sign-compare
-Wno-unused-parameter)
endif()
add_executable(
run_benchmarks
benchmarks/ceres_utils.h
benchmarks/imu_integration.cc
benchmarks/imu_integration_handwritten.h
benchmarks/imu_integration_ceres.h
benchmarks/quat_interpolation_ceres.h
benchmarks/quat_interpolation_handwritten.h
benchmarks/quat_interpolation.cc
benchmarks/rolling_shutter_camera.cc
benchmarks/rolling_shutter_camera_ceres.h
benchmarks/camera_params_t.h)
target_link_libraries(run_benchmarks benchmark::benchmark_main eigen symforce
Ceres::ceres wrenfold_runtime)
target_compile_options(run_benchmarks PRIVATE ${WARNING_FLAGS})
target_compile_features(run_benchmarks PRIVATE cxx_std_17)
target_include_directories(run_benchmarks PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
if(NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug")
message(STATUS "Adding release mode optimization flags.")
if(NOT MSVC)
target_compile_options(run_benchmarks PRIVATE -O3)
else()
target_compile_options(run_benchmarks PRIVATE /fp:fast)
endif()
endif()
target_compile_definitions(
run_benchmarks PRIVATE -DSKYMARSHAL_PRINTING_ENABLED -DWF_SPAN_EIGEN_SUPPORT
-DNDEBUG)