提交 5cfef40e 编写于 作者: M Marius Muja

Merge.

......@@ -45,6 +45,7 @@ option(BUILD_MATLAB_BINDINGS "Build Matlab bindings" ON)
option(BUILD_CUDA_LIB "Build CUDA library" ON)
option(USE_MPI "Use MPI" OFF)
set(NVCC_COMPILER_BINDIR "" CACHE PATH "Directory where nvcc should look for C++ compiler. This is passed to nvcc through the --compiler-bindir option.")
if (NOT BUILD_C_BINDINGS)
set(BUILD_PYTHON_BINDINGS OFF)
......
......@@ -22,7 +22,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
# set_target_properties(flann_cuda_s PROPERTIES COMPILE_FLAGS -fPIC)
if (BUILD_CUDA_LIB)
# hack: cuda_add_libraries doesn't seem to add the -fPIC option if defined like above...
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-Xcompiler;-fPIC" )
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-Xcompiler;-fPIC;-arch=sm_13;--compiler-bindir=${NVCC_COMPILER_BINDIR}" )
endif()
endif()
......
......@@ -19,7 +19,7 @@ if (PYTHON_EXECUTABLE)
endif()
if (GTEST_FOUND AND HDF5_FOUND)
include_directories(${HDF5_INCLUDE_DIR})
include_directories(${HDF5_INCLUDE_DIR})
flann_add_gtest(flann_simple_test flann_simple_test.cpp)
if(TBB_FOUND)
add_definitions(-DTBB)
......@@ -28,14 +28,19 @@ if (GTEST_FOUND AND HDF5_FOUND)
target_link_libraries(flann_simple_test ${TBB_LIBRARIES})
endif()
target_link_libraries(flann_simple_test flann_cpp ${HDF5_LIBRARIES})
target_link_libraries(flann_multithreaded_test flann_cpp ${HDF5_LIBRARIES})
if(TBB_FOUND)
target_link_libraries(flann_multithreaded_test flann_cpp ${HDF5_LIBRARIES})
endif()
if (HDF5_IS_PARALLEL)
target_link_libraries(flann_simple_test ${MPI_LIBRARIES})
target_link_libraries(flann_multithreaded_test ${MPI_LIBRARIES})
if(TBB_FOUND)
target_link_libraries(flann_multithreaded_test ${MPI_LIBRARIES})
endif()
endif()
endif()
if (GTEST_FOUND AND HDF5_FOUND AND BUILD_CUDA_LIB)
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-Xcompiler;-fPIC;-arch=sm_13;--compiler-bindir=${NVCC_COMPILER_BINDIR}" )
flann_add_cuda_gtest(flann_cuda_test flann_cuda_test.cu)
target_link_libraries(flann_cuda_test flann_cpp ${HDF5_LIBRARIES} flann_cuda)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册