Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
update install rules to install cmake into lib
Browse files Browse the repository at this point in the history
  • Loading branch information
kkraus14 authored and alliepiper committed Nov 11, 2020
1 parent d336fdd commit 35f5492
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
12 changes: 11 additions & 1 deletion cmake/ThrustInstallRules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ install(DIRECTORY "${Thrust_SOURCE_DIR}/thrust"
FILES_MATCHING
PATTERN "*.h"
PATTERN "*.inl"
PATTERN "*.cmake"
PATTERN "*.md"
)

install(DIRECTORY "${Thrust_SOURCE_DIR}/thrust"
TYPE LIB
FILES_MATCHING
PATTERN "*.cmake"
)

# Depending on how Thrust is configured, CUB's CMake scripts may or may not be
# included, so maintain a set of CUB install rules in both projects. By default
# CUB headers are installed alongside Thrust -- this may be disabled by turning
Expand All @@ -20,6 +25,11 @@ if (THRUST_INSTALL_CUB_HEADERS)
TYPE INCLUDE
FILES_MATCHING
PATTERN "*.cuh"
)

install(DIRECTORY "${Thrust_SOURCE_DIR}/dependencies/cub/cub"
TYPE LIB
FILES_MATCHING
PATTERN "*.cmake"
)
endif()
2 changes: 1 addition & 1 deletion thrust/cmake/thrust-config-version.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Parse version information from version.h:
file(READ "${CMAKE_CURRENT_LIST_DIR}/../version.h" THRUST_VERSION_HEADER)
file(READ "${CMAKE_CURRENT_LIST_DIR}/../../../include/thrust/version.h" THRUST_VERSION_HEADER)
string(REGEX MATCH "#define[ \t]+THRUST_VERSION[ \t]+([0-9]+)" DUMMY "${THRUST_VERSION_HEADER}")
set(THRUST_VERSION_FLAT ${CMAKE_MATCH_1})
# Note that Thrust calls this the PATCH number, CMake calls it the TWEAK number:
Expand Down
2 changes: 1 addition & 1 deletion thrust/cmake/thrust-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ set(_THRUST_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}" CACHE INTERNAL "Location of th
if (NOT TARGET Thrust::Thrust)
_thrust_declare_interface_alias(Thrust::Thrust _Thrust_Thrust)
# Strip out the 'thrust/cmake/' from '[thrust_include_path]/thrust/cmake/':
get_filename_component(_THRUST_INCLUDE_DIR "../.." ABSOLUTE BASE_DIR "${_THRUST_CMAKE_DIR}")
get_filename_component(_THRUST_INCLUDE_DIR "../../../include" ABSOLUTE BASE_DIR "${_THRUST_CMAKE_DIR}")
set(_THRUST_INCLUDE_DIR "${_THRUST_INCLUDE_DIR}"
CACHE INTERNAL "Location of thrust headers."
)
Expand Down

0 comments on commit 35f5492

Please sign in to comment.