-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
50 lines (41 loc) · 1.02 KB
/
CMakeLists.txt
File metadata and controls
50 lines (41 loc) · 1.02 KB
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
49
50
cmake_minimum_required(VERSION 3.10)
project(dbscan VERSION 0.0.1)
set (CMAKE_CXX_STANDARD 17)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
# ------------------------------------------------
# cpu library
# ------------------------------------------------
add_library(dbscan
INTERFACE
)
target_include_directories(dbscan
INTERFACE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
target_compile_options(dbscan
INTERFACE
$<$<CONFIG:Debug>:-O0 -g -Wall -Werror>
$<$<CONFIG:Release>:-O3>
)
# ------------------------------------------------
# gpu library
# ------------------------------------------------
if(USE_GPU)
include(CheckLanguage)
check_language(CUDA)
if (CMAKE_CUDA_COMPILER)
enable_language(CUDA)
add_subdirectory(cuda)
else()
message(STATUS "CUDA not found")
return()
endif()
endif()
if(BUILD_EXAMPLES)
add_subdirectory(examples)
endif(BUILD_EXAMPLES)
if(BUILDING_TEST)
enable_testing()
add_subdirectory(tests)
endif()