-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
80 lines (70 loc) · 2.42 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
cmake_minimum_required(VERSION 3.9)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
project(plsm
VERSION 2.0.2
LANGUAGES CXX
)
list(APPEND CMAKE_PREFIX_PATH ${Kokkos_DIR})
find_package(Kokkos 3 REQUIRED)
set(PLSM_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/include")
set(PLSM_HEADER_DIR "${PLSM_INCLUDE_DIR}/plsm")
set(PLSM_HEADERS
${PLSM_HEADER_DIR}/detail/Refiner.h
${PLSM_HEADER_DIR}/detail/Refiner.inl
${PLSM_HEADER_DIR}/detail/SpaceVectorBase.h
${PLSM_HEADER_DIR}/detail/SubdivisionInfo.h
${PLSM_HEADER_DIR}/refine/BallDetector.h
${PLSM_HEADER_DIR}/refine/Detector.h
${PLSM_HEADER_DIR}/refine/MultiDetector.h
${PLSM_HEADER_DIR}/refine/PolylineDetector.h
${PLSM_HEADER_DIR}/refine/RegionDetector.h
${PLSM_HEADER_DIR}/CompactFlat.h
${PLSM_HEADER_DIR}/EnumIndexed.h
${PLSM_HEADER_DIR}/Interval.h
${PLSM_HEADER_DIR}/IntervalRange.h
${PLSM_HEADER_DIR}/MultiIndex.h
${PLSM_HEADER_DIR}/Region.h
${PLSM_HEADER_DIR}/Region.inl
${PLSM_HEADER_DIR}/Segment.h
${PLSM_HEADER_DIR}/SpaceVector.h
${PLSM_HEADER_DIR}/Subpaving.h
${PLSM_HEADER_DIR}/Subpaving.inl
${PLSM_HEADER_DIR}/Tile.h
${PLSM_HEADER_DIR}/Utility.h
${PLSM_HEADER_DIR}/Zone.h
)
set(PLSM_BINARY_INCLUDE_DIR ${CMAKE_BINARY_DIR}/include)
option(PLSM_USE_64BIT_INDEX_TYPE "" FALSE)
configure_file(${CMAKE_CURRENT_LIST_DIR}/config.h.in
${PLSM_BINARY_INCLUDE_DIR}/plsm/config.h
)
add_library(plsm INTERFACE)
target_include_directories(plsm INTERFACE
$<INSTALL_INTERFACE:include>
$<BUILD_INTERFACE:${PLSM_INCLUDE_DIR}>
$<BUILD_INTERFACE:${PLSM_BINARY_INCLUDE_DIR}>
)
target_link_libraries(plsm INTERFACE Kokkos::kokkos)
include(CTest)
add_subdirectory(test)
add_subdirectory(doc)
install(DIRECTORY include/plsm DESTINATION include)
install(FILES ${PLSM_BINARY_INCLUDE_DIR}/plsm/config.h DESTINATION include/plsm)
install(TARGETS plsm EXPORT plsm)
install(EXPORT plsm DESTINATION lib/plsm)
include(CMakePackageConfigHelpers)
configure_package_config_file(CMake/plsmConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/CMake/plsmConfig.cmake
INSTALL_DESTINATION lib/plsm
)
write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/CMake/plsmConfigVersion.cmake
COMPATIBILITY SameMajorVersion
)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/CMake/plsmConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/CMake/plsmConfigVersion.cmake
DESTINATION lib/plsm
)