forked from ORNL-Fusion/plsm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
62 lines (53 loc) · 1.9 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
cmake_minimum_required(VERSION 3.9)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
project(plsm 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/KokkosExtension.h
${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/PolylineDetector.h
${PLSM_HEADER_DIR}/refine/RegionDetector.h
${PLSM_HEADER_DIR}/CompactFlat.h
${PLSM_HEADER_DIR}/ContextUtility.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
)
add_library(plsm INTERFACE)
target_include_directories(plsm INTERFACE
$<BUILD_INTERFACE:${PLSM_INCLUDE_DIR}>
$<INSTALL_INTERFACE:include>
)
target_link_libraries(plsm INTERFACE Kokkos::kokkos)
include(CTest)
add_subdirectory(test)
add_subdirectory(doc)
install(DIRECTORY include/plsm DESTINATION include)
install(TARGETS plsm EXPORT plsm)
install(EXPORT plsm DESTINATION lib/plsm)
include(CMakePackageConfigHelpers)
configure_package_config_file(CMake/plsm-config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/CMake/plsm-config.cmake
INSTALL_DESTINATION lib/plsm
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CMake/plsm-config.cmake DESTINATION lib/plsm)