forked from asherikov/qpmad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
executable file
·75 lines (66 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
cmake_minimum_required(VERSION 3.5.1)
project(qpmad)
# Set compiler flags
set(CMAKE_CXX_STANDARD 17)
add_compile_options(-Wall -Wextra -Wpedantic)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Find catkin macros and libraries
find_package(catkin REQUIRED)
find_package(Eigen3 REQUIRED)
# Catkin package macro
catkin_package(
INCLUDE_DIRS
include
CATKIN_DEPENDS
${CATKIN_PACKAGE_DEPENDENCIES}
)
install(
DIRECTORY
include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
install(
FILES
LICENSE
README.md
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
##############
## Test ##
##############
if(CATKIN_ENABLE_TESTING)
catkin_add_gtest(test_${PROJECT_NAME}
test/empty_test.cpp
)
add_dependencies(test_${PROJECT_NAME}
${catkin_EXPORTED_TARGETS}
)
target_include_directories(test_${PROJECT_NAME} PRIVATE
${${PROJECT_NAME}_INCLUDE_DIRECTORIES}
)
target_include_directories(test_${PROJECT_NAME} SYSTEM PUBLIC
${catkin_INCLUDE_DIRS}
)
target_link_libraries(test_${PROJECT_NAME}
gtest_main
)
###################
## Code_coverage ##
###################
find_package(cmake_code_coverage QUIET)
if(cmake_code_coverage_FOUND)
add_gtest_coverage(
TEST_BUILD_TARGETS
test_${PROJECT_NAME}
)
endif()
endif()
#################
## Clang_tools ##
#################
find_package(cmake_clang_tools QUIET)
if(cmake_clang_tools_FOUND)
add_default_clang_tooling(
DISABLE_CLANG_FORMAT
)
endif(cmake_clang_tools_FOUND)