Skip to content

Commit

Permalink
build is now robust to presence of inc/GL in CUDA toolkit sample dire…
Browse files Browse the repository at this point in the history
…ctory
  • Loading branch information
tschmidt23 committed Jun 26, 2017
1 parent 445b75e commit bdc2ea4
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 10 deletions.
11 changes: 10 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,17 @@ set(CUDA_NVCC_FLAGS "-arch=sm_35" "--use_fast_math" "-O3" "--ptxas-options=--ve

# add library
if(CUDA_FOUND)
include_directories(${CUDA_TOOLKIT_ROOT_DIR}/samples/common/inc)
#include_directories(${CUDA_TOOLKIT_ROOT_DIR}/samples/common)

add_custom_target(linkTarget COMMAND ln -sf ${CUDA_TOOLKIT_ROOT_DIR}/samples/common/inc/helper_math.h ${PROJECT_SOURCE_DIR}/src/util/helper_math.h)

add_definitions(-DCUDA_BUILD)
cuda_add_library(${PROJECT_NAME} ${dart_src} ${point_cloud_srcs} ${depth_source_src} ${gpu_specific_src})
add_dependencies(${PROJECT_NAME} linkTarget)

message(STATUS "ln -s ${CUDA_TOOLKIT_ROOT_DIR}/samples/common/inc/helper_math.h ${PROJECT_SOURCE_DIR}/src/util/helper_math.h")


else()
add_library(${PROJECT_NAME} ${dart_src} ${point_cloud_srcs} ${depth_source_src} ${cpu_specific_src})
endif()
Expand Down Expand Up @@ -267,4 +275,5 @@ if(${BUILD_TESTS} AND ${GTEST_FOUND})
${gpu_test_sources}
)
target_link_libraries(test dart)

endif()
2 changes: 1 addition & 1 deletion src/geometry/geometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <map>
#include <iostream>
#include <vector_functions.h>
#include <helper_math.h>
#include <util/helper_math.h>
#include <Eigen/Eigen>

namespace dart {
Expand Down
2 changes: 1 addition & 1 deletion src/geometry/grid_3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <vector_types.h>
#include <vector_functions.h>
#include <helper_math.h>
#include <util/helper_math.h>

#include "util/vector_type_template.h"
#include "util/prefix.h"
Expand Down
2 changes: 1 addition & 1 deletion src/geometry/plane_fitting.cu
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <iostream>
#include <stdio.h>
#include <vector_functions.h>
#include <helper_math.h>
#include <util/helper_math.h>

namespace dart {

Expand Down
2 changes: 1 addition & 1 deletion src/img_proc/organized_point_cloud.cu
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <iostream>
#include <stdio.h>
#include <helper_math.h>
#include <util/helper_math.h>

namespace dart {

Expand Down
2 changes: 1 addition & 1 deletion src/img_proc/resampling.cu
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <iostream>
#include <vector_functions.h>
#include <helper_math.h>
#include <util/helper_math.h>

namespace dart {

Expand Down
2 changes: 1 addition & 1 deletion src/mesh/mesh_sample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <iostream>

#include <vector_functions.h>
#include <helper_math.h>
#include <util/helper_math.h>

namespace dart {

Expand Down
2 changes: 1 addition & 1 deletion src/mesh/primitive_meshing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <vector_types.h>
#include <vector_functions.h>
#include <helper_math.h>
#include <util/helper_math.h>

namespace dart {

Expand Down
2 changes: 1 addition & 1 deletion src/optimization/kernels/kernel_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "util/dart_types.h"

#include <vector_functions.h>
#include <helper_math.h>
#include <util/helper_math.h>

namespace dart {

Expand Down
2 changes: 1 addition & 1 deletion src/visualization/gradient_viz.cu
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "gradient_viz.h"

#include <helper_math.h>
#include <util/helper_math.h>

namespace dart {

Expand Down

0 comments on commit bdc2ea4

Please sign in to comment.