-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
52 lines (40 loc) · 1.66 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
48
49
50
51
52
cmake_minimum_required(VERSION 3.0.2)
project(sotg)
if ( CMAKE_COMPILER_IS_GNUCXX )
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wconversion -Wsign-conversion") # too noisy for now
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic -Wpedantic -Wnull-dereference")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wcast-align -Wformat-nonliteral -Wformat=2 -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wredundant-decls -Wswitch-default -Wswitch-enum -Wno-comment")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wold-style-cast -Wunused -Woverloaded-virtual -Wuseless-cast")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wimplicit-fallthrough")
endif()
add_compile_options(-std=c++17)
###########
## Build ##
###########
find_package (Eigen3 3.3 REQUIRED NO_MODULE)
include_directories(
include
)
add_library(${PROJECT_NAME} SHARED
src/trajectory_generator.cpp
src/logger.cpp
src/constant_acceleration_solver.cpp
src/path_manager.cpp
src/point.cpp
src/path.cpp
src/section_constraint.cpp
src/section.cpp
src/linear_segment.cpp
src/blend_segment.cpp
src/segment_constraint.cpp
src/utility_functions.cpp
)
target_link_libraries (${PROJECT_NAME} Eigen3::Eigen)
install(TARGETS sotg DESTINATION lib)
#add_definitions(-DVERBOSE) # Enable printing info and warn messages to cout using default logger
###########
## Debug ##
###########
#add_definitions(-DDEBUG) #uncomment for additional debug output
#add_definitions(-DVERBOSE_TESTS) # print all calculated values