@@ -10,8 +10,8 @@ option(DBOT_BUILD_GPU "Compile CUDA enabled trackers" ON)
10
10
# Flags #
11
11
############################
12
12
# Enable c++11 GCC 4.7 or greater required
13
- add_definitions (-std=c++11 -fno-omit-frame-pointer )
14
- add_definitions (-DPROFILING_ON=1 -fPIC ) #print profiling output
13
+ add_definitions (-std=c++11 -fno-omit-frame-pointer -fPIC )
14
+ add_definitions (-DPROFILING_ON=1 ) #print profiling output
15
15
16
16
#add_definitions(-Wall)
17
17
#add_definitions(-Wno-unused-local-typedefs)
@@ -43,14 +43,13 @@ set(dbot_LIBRARIES ${dbot_LIBRARY})
43
43
# Dependencies #
44
44
############################
45
45
46
- find_package (Eigen REQUIRED )
47
- find_package (Boost REQUIRED COMPONENTS system filesystem )
46
+ find_package (Eigen3 3.2 EXACT REQUIRED )
47
+ include_directories (${EIGEN3_INCLUDE_DIR} )
48
+ # add_definitions(${EIGEN3_DEFINITIONS})
48
49
49
- include_directories ( ${Eigen_INCLUDE_DIRS} )
50
+ find_package ( Boost REQUIRED COMPONENTS system filesystem )
50
51
include_directories (${Boost_INCLUDE_DIRS} )
51
52
52
- add_definitions (${Eigen_DEFINITIONS} )
53
-
54
53
# GPU libs
55
54
set (GLEW_DIR ${CMAKE_MODULE_PATH} )
56
55
find_package (CUDA QUIET )
@@ -60,7 +59,6 @@ find_package(OpenGL QUIET)
60
59
if (DBOT_BUILD_GPU AND CUDA_FOUND AND GLEW_FOUND AND OPENGL_FOUND )
61
60
include_directories (${GLEW_INCLUDE_DIRS} )
62
61
include_directories (${OpenGL_INCLUDE_DIRS} )
63
- cuda_include_directories (${CUDA_CUT_INCLUDE_DIRS} )
64
62
65
63
link_directories (${OpenGL_LIBRARY_DIRS} )
66
64
link_directories (${GLEW_LIBRARY_DIRS} )
@@ -71,8 +69,8 @@ if(DBOT_BUILD_GPU AND CUDA_FOUND AND GLEW_FOUND AND OPENGL_FOUND)
71
69
# enable cuda debug information with -g -G -O0, to use with cuda-dbg use
72
70
# --ptxas-options=-v to see number of registers, local, shared and constant
73
71
# memory used in kernels
74
- set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -O2 -arch=sm_20 )
75
- list (APPEND dbot_LIBRARIES ${dbot_LIBRARY_GPU} )
72
+ set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -O2 -arch=sm_30 )
73
+ list (APPEND dbot_LIBRARIES ${dbot_LIBRARY_GPU} ${CUDA_CUDART_LIBRARY} )
76
74
77
75
# activate gpu implementations
78
76
add_definitions (-DDBOT_BUILD_GPU=1 )
@@ -127,7 +125,9 @@ if(catkin_FOUND)
127
125
CATKIN_DEPENDS
128
126
fl
129
127
DEPENDS
130
- Eigen )
128
+ Boost
129
+ # CUDA
130
+ )
131
131
list (APPEND dbot_INCLUDE_DIRS ${catkin_INCLUDE_DIRS} )
132
132
else (catkin_FOUND )
133
133
find_package (fl REQUIRED )
@@ -190,6 +190,7 @@ if(DBOT_BUILD_GPU)
190
190
${OPENGL_LIBRARIES}
191
191
${GLFW_LIBRARY}
192
192
${GLEW_LIBRARIES} )
193
+ # ${CUDA_CUDART_LIBRARY})
193
194
endif (DBOT_BUILD_GPU )
194
195
195
196
############################
0 commit comments