-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathCMakeLists.txt
39 lines (28 loc) · 1.1 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
# ESSENTIAL MATRIX BENCHMARK
# minimum version of cmake
cmake_minimum_required(VERSION 2.8)
set(CMAKE_CXX_STANDARD "17")
if(NOT CMAKE_CXX_STANDARD_REQUIRED)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif()
# release
set(CMAKE_BUILD_TYPE "Release")
# faster evaluation
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG -march=native -ffast-math -fno-unsafe-math-optimizations -funroll-loops -fprefetch-loop-arrays -funswitch-loops -fPIC -Wno-ignored-optimization-argument" CACHE STRING "" FORCE)
# faster evaluation of math
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ffast-math" CACHE STRING "" FORCE)
# faster evaluation of Eigen
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mavx -mfma")
# build in bin folder
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
SET(CMAKE_INSTALL_RUNTIME_DESTINATION bin)
# set the project
project( TWO_VIEW_MINIMAL_SOLVER_PIPELINE )
target_link_libraries(ceres)
# add packages
find_package(Eigen3 REQUIRED)
#find_package(Ceres REQUIRED)
include_directories( ${EIGEN3_INCLUDE_DIRS} )
include_directories(src)
# add subdirectories
add_subdirectory(src)