-
Notifications
You must be signed in to change notification settings - Fork 17
/
pplkernelcuda-config.cmake.in
32 lines (24 loc) · 1.25 KB
/
pplkernelcuda-config.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
cmake_minimum_required(VERSION 3.10)
if(TARGET "pplkernelcuda_static")
return()
endif()
add_library(pplkernelcuda_static STATIC IMPORTED)
if(NOT TARGET "pplcommon_static")
include(${CMAKE_CURRENT_LIST_DIR}/pplcommon-config.cmake)
endif()
# set `PPLNN_CUDA_TOOLKIT_LINK_LIBRARIES` to overwrite the default options, i.e. use static libraries instead.
if(PPLNN_CUDA_TOOLKIT_LINK_LIBRARIES)
set(__PPLNN_CUDA_TOOLKIT_LINK_LIBRARIES__ ${PPLNN_CUDA_TOOLKIT_LINK_LIBRARIES})
else()
set(__PPLNN_CUDA_TOOLKIT_LINK_LIBRARIES__ "@PPLNN_CUDA_TOOLKIT_LINK_LIBRARIES@")
endif()
set_target_properties(pplkernelcuda_static PROPERTIES
INTERFACE_LINK_LIBRARIES "pplcommon_static;${__PPLNN_CUDA_TOOLKIT_LINK_LIBRARIES__}")
target_compile_definitions(pplkernelcuda_static PUBLIC @PPLNN_CUDA_BINARY_DEFINITIONS@)
unset(__PPLNN_CUDA_TOOLKIT_LINK_LIBRARIES__)
get_filename_component(__PPLNN_CUDA_LIB_PATH__ "${CMAKE_CURRENT_LIST_DIR}/../../../lib/@HPCC_STATIC_LIB_PREFIX@pplkernelcuda_static@HPCC_STATIC_LIB_SUFFIX@" ABSOLUTE)
set_target_properties(pplkernelcuda_static PROPERTIES
IMPORTED_LOCATION "${__PPLNN_CUDA_LIB_PATH__}"
IMPORTED_LOCATION_DEBUG "${__PPLNN_CUDA_LIB_PATH__}"
IMPORTED_LOCATION_RELEASE "${__PPLNN_CUDA_LIB_PATH__}")
unset(__PPLNN_CUDA_LIB_PATH__)