@@ -7,21 +7,20 @@ set(CMAKE_CXX_FLAGS "-msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2")
7
7
8
8
set (CMAKE_BUILD_TYPE "Release" )
9
9
10
+ find_package (GTest)
10
11
find_package (catkin)
12
+
11
13
find_package (PCL REQUIRED)
12
14
find_package (Eigen3 REQUIRED)
13
15
14
- # for test
15
- find_package (GTest REQUIRED)
16
-
17
16
find_package (OpenMP)
18
17
if (OPENMP_FOUND)
19
18
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS} " )
20
19
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} " )
21
20
endif ()
22
21
23
22
# if you want to use GPU-powered implementation, uncomment the following line
24
- find_package (CUDA)
23
+ # find_package(CUDA)
25
24
if (CUDA_FOUND)
26
25
include_directories (${CUDA_INCLUDE_DIRS} )
27
26
link_directories (${CUDA_LIBRARY_DIRS} )
@@ -32,10 +31,8 @@ endif()
32
31
###################################
33
32
if (catkin_FOUND)
34
33
catkin_package(
35
- INCLUDE_DIRS include thirdparty/Sophus
34
+ INCLUDE_DIRS include
36
35
LIBRARIES fast_gicp
37
- # CATKIN_DEPENDS other_catkin_pkg
38
- # DEPENDS system_lib
39
36
)
40
37
endif ()
41
38
@@ -49,39 +46,29 @@ add_library(fast_gicp
49
46
src/fast_gicp/gicp/fast_gicp_st.cpp
50
47
src/fast_gicp/gicp/fast_vgicp.cpp
51
48
)
52
-
53
49
target_link_libraries (fast_gicp
54
50
${PCL_LIBRARIES}
55
51
)
56
52
target_include_directories (fast_gicp PUBLIC
57
53
include
58
54
${PCL_INCLUDE_DIRS}
59
55
${EIGEN3_INCLUDE_DIR}
60
- ${catkin_INCLUDE_DIRS}
61
56
)
62
57
63
58
add_executable (gicp_align src/align.cpp)
64
59
add_dependencies (gicp_align fast_gicp)
65
60
target_link_libraries (gicp_align
66
- ${catkin_LIBRARIES}
67
61
${PCL_LIBRARIES}
68
62
fast_gicp
69
63
)
70
64
71
65
add_executable (gicp_kitti src/kitti.cpp)
72
66
add_dependencies (gicp_kitti fast_gicp)
73
67
target_link_libraries (gicp_kitti
74
- ${catkin_LIBRARIES}
75
68
${PCL_LIBRARIES}
76
69
fast_gicp
77
70
)
78
71
79
- if (GTEST_FOUND)
80
- add_executable (gicp_test src/test /gicp_test.cpp)
81
- target_link_libraries (gicp_test ${GTEST_BOTH_LIBRARIES} ${PCL_LIBRARIES} fast_gicp)
82
- gtest_add_tests(TARGET gicp_test WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} )
83
- endif ()
84
-
85
72
if (CUDA_FOUND)
86
73
set (CUDA_NVCC_FLAGS "--expt-relaxed-constexpr" )
87
74
add_definitions (-DUSE_VGICP_CUDA)
@@ -112,3 +99,10 @@ if(CUDA_FOUND)
112
99
)
113
100
add_dependencies (fast_gicp fast_vgicp_cuda)
114
101
endif ()
102
+
103
+ if (GTEST_FOUND)
104
+ add_executable (gicp_test src/test /gicp_test.cpp)
105
+ add_dependencies (gicp_test fast_gicp)
106
+ target_link_libraries (gicp_test ${GTEST_LIBRARIES} ${PCL_LIBRARIES} fast_gicp)
107
+ gtest_add_tests(TARGET gicp_test WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} EXTRA_ARGS "${CMAKE_SOURCE_DIR} /data" )
108
+ endif ()
0 commit comments