Skip to content

Commit 77593b3

Browse files
authored
Merge pull request #226 from robertmaynard/improve_install_rules
Correct issues when `INSTALL_CUCO` is set to OFF
2 parents cc1ef71 + 660de97 commit 77593b3

2 files changed

Lines changed: 22 additions & 20 deletions

File tree

CMakeLists.txt

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,9 @@ endif(BUILD_EXAMPLES)
111111
###################################################################################################
112112
# - Install targets -------------------------------------------------------------------------------
113113

114-
if(INSTALL_CUCO)
115-
install(TARGETS cuco EXPORT cuco-exports)
116-
install(DIRECTORY include/cuco/ DESTINATION include/cuco)
117-
install(FILES ${CUCO_BINARY_DIR}/include/cuco/version_config.hpp DESTINATION include/cuco)
114+
install(TARGETS cuco EXPORT cuco-exports)
118115

119-
set(doc_string
116+
set(doc_string
120117
[=[
121118
Provide targets for cuCollections.
122119
@@ -131,27 +128,30 @@ structures tailored for efficient use with GPUs.
131128
132129
]=])
133130

134-
# build install targets
135-
rapids_export(
136-
INSTALL cuco
137-
EXPORT_SET cuco-exports
138-
GLOBAL_TARGETS cuco
139-
NAMESPACE cuco::
140-
DOCUMENTATION doc_string)
141-
142-
set(code_string
143-
[=[
131+
set(code_string
132+
[=[
144133
if(NOT TARGET cuco::Thrust)
145-
thrust_create_target(cuco::Thrust FROM_OPTIONS)
134+
thrust_create_target(cuco::Thrust FROM_OPTIONS)
146135
endif()
147136
]=])
148137

149-
# build export targets
138+
# build directory cuco-config generation
139+
rapids_export(
140+
BUILD cuco
141+
EXPORT_SET cuco-exports
142+
GLOBAL_TARGETS cuco
143+
NAMESPACE cuco::
144+
DOCUMENTATION doc_string
145+
FINAL_CODE_BLOCK code_string)
146+
147+
if(INSTALL_CUCO)
148+
install(DIRECTORY include/cuco/ DESTINATION include/cuco)
149+
install(FILES ${CUCO_BINARY_DIR}/include/cuco/version_config.hpp DESTINATION include/cuco)
150+
# install directory cuco-config generation
150151
rapids_export(
151-
BUILD cuco
152+
INSTALL cuco
152153
EXPORT_SET cuco-exports
153154
GLOBAL_TARGETS cuco
154155
NAMESPACE cuco::
155-
DOCUMENTATION doc_string
156-
FINAL_CODE_BLOCK code_string)
156+
DOCUMENTATION doc_string)
157157
endif()

benchmarks/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,15 @@ CPMAddPackage(
2525
# Additionally, attempting to set the CMAKE_CXX_VERSION here doesn't propogate to the feature test build
2626
# Therefore, we just disable the feature test and assume platforms we care about have a regex impl available
2727
"RUN_HAVE_STD_REGEX 0" #
28+
"BENCHMARK_ENABLE_INSTALL OFF"
2829
)
2930

3031
CPMAddPackage(
3132
NAME nvbench
3233
GITHUB_REPOSITORY NVIDIA/nvbench
3334
GIT_TAG main
3435
GIT_SHALLOW TRUE
36+
EXCLUDE_FROM_ALL YES
3537
)
3638

3739
###################################################################################################

0 commit comments

Comments
 (0)