-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhcoreppConfig.cmake.in
62 lines (55 loc) · 2.14 KB
/
hcoreppConfig.cmake.in
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
# defined since 2.8.3
if (CMAKE_VERSION VERSION_LESS 2.8.3)
get_filename_component(CMAKE_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
endif ()
# Compute the installation prefix relative to this file.
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
if (_IMPORT_PREFIX STREQUAL "/")
set(_IMPORT_PREFIX "")
endif ()
set(USE_CUDA "@USE_CUDA@")
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/Modules/cmake)
set(ENV{PKG_CONFIG_PATH} "${_IMPORT_PREFIX}/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}")
include_directories(${_IMPORT_PREFIX}/include)
link_directories(${_IMPORT_PREFIX}/lib)
set(BLA_PREFER_PKGCONFIG "ON")
find_package(OpenMP REQUIRED)
if (USE_CUDA)
message("-- HCore++ built CUDA Support")
find_package(CUDAToolkit REQUIRED)
find_package(BLAS REQUIRED)
find_package(blaspp REQUIRED)
unset(BLA_VENDOR)
find_package(LAPACK REQUIRED)
else ()
message("-- HCore++ built x86 Support")
set(gpu_backend CACHE "none" FORCE)
find_package(blaspp REQUIRED)
find_package(lapackpp REQUIRED)
endif ()
# Add component-configs.
include("${CMAKE_CURRENT_LIST_DIR}/hcoreppCoreConfig.cmake")
# Compute the installation prefix relative to this file.
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
if (_IMPORT_PREFIX STREQUAL "/")
set(_IMPORT_PREFIX "")
endif ()
set(hcorepp_LIBRARIES hcorepp)
set(hcorepp_LIBRARY_DIRS "${_IMPORT_PREFIX}/lib")
set(hcorepp_INCLUDE_DIRS "${_IMPORT_PREFIX}/include")
find_package_handle_standard_args(hcorepp
NAME_MISMATCHED
REQUIRED_VARS hcorepp_INCLUDE_DIRS hcorepp_LIBRARY_DIRS hcorepp_LIBRARIES
VERSION_VAR hcorepp_VERSION
)
# Cleanup temporary variables.
set(_IMPORT_PREFIX)
if (CMAKE_VERSION VERSION_LESS 2.8.3)
set(CMAKE_CURRENT_LIST_DIR)
endif ()