-
Notifications
You must be signed in to change notification settings - Fork 8
/
CMakeLists.txt
48 lines (38 loc) · 1.35 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
cmake_minimum_required(VERSION 2.8)
project(VolumeVoronoiGPU)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
set(CMAKE_DEBUG_POSTFIX "d")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_CXX_STANDARD 11)
find_package(CUDA REQUIRED)
link_directories(${CUDA_TOOLKIT_ROOT_DIR}/lib/x64)
find_package(OpenMP)
if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
cuda_add_executable(VolumeVoronoiGPU
test_voronoi voronoi.cu knearests.cu test_voronoi.cu
OPTIONS "-arch sm_61 -lineinfo"
)
target_compile_definitions(VolumeVoronoiGPU PUBLIC -Dgeogram_EXPORTS)
if (${MSVC})
if (${CMAKE_VERSION} VERSION_GREATER 3.6.0)
set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT "VolumeVoronoiGPU")
endif()
endif()
add_subdirectory(extern/tetgen)
add_subdirectory(extern/kNN-CUDA)
target_link_directories(VolumeVoronoiGPU PUBLIC "${CMAKE_BINARY_DIR}/lib")
target_link_libraries(VolumeVoronoiGPU
debug tetd
debug kNN-CUDAd
optimized tet
optimized kNN-CUDA
general ${CUDA_LIBRARIES}
general cuda
general cublas
)