Add CMake install rules.
This addresses thrust/thrust#1210.
MODIFY
CMakeLists.txt
CMakeLists.txt
@@ -16,6 +16,7 @@ include(cmake/AppendOptionIfAvailable.cmake)
include(cmake/ThrustBuildCompilerTargets.cmake)
include(cmake/ThrustBuildTargetList.cmake)
include(cmake/ThrustMultiConfig.cmake)
+include(cmake/ThrustInstallRules.cmake)
include(cmake/ThrustUtilities.cmake)
# Add cache string options for CMAKE_BUILD_TYPE and default to RelWithDebInfo.

ADD
cmake/ThrustInstallRules.cmake
+# Thrust is a header library; no need to build anything before installing:
+set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY TRUE)
+
+install(DIRECTORY "${Thrust_SOURCE_DIR}/thrust"
+ TYPE INCLUDE
+ FILES_MATCHING
+ PATTERN "*.h"
+ PATTERN "*.inl"
+ PATTERN "*.cmake"
+ PATTERN "*.md"
+)
+
+# 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
+# off THRUST_INSTALL_CUB_HEADERS.
+option(THRUST_INSTALL_CUB_HEADERS "Include cub headers when installing." ON)
+if (THRUST_INSTALL_CUB_HEADERS)
+ install(DIRECTORY "${Thrust_SOURCE_DIR}/dependencies/cub/cub"
+ TYPE INCLUDE
+ FILES_MATCHING
+ PATTERN "*.cuh"
+ PATTERN "*.cmake"
+ )
+endif()

MODIFY
dependencies/cub
dependencies/cub
-Subproject commit cae0ac9d1e24a47507f2f5d48f53c2e4efe1bdc6
+Subproject commit eb55a52a1cf5927fc717e57f5a2017f66f744a7c

Add CMake install rules.

This addresses thrust/thrust#1210.