Skip to content

Commit

Permalink
Pass GLOBAL_TARGETS to rapids_cpm_find in rapids_cpm_bs_thread_pool()
Browse files Browse the repository at this point in the history
Because the GLOBAL_TARGETS option was not being passed,
rapids_cpm_bs_thread_pool() was accidentally calling CPMAddPackage()
twice for bs_thread_pool, resulting in invalid pinned versions output.
Pass GLOBAL_TARGETS to ensure CPMAddPackage() is only called once.
  • Loading branch information
KyleFromNVIDIA committed Jul 24, 2024
1 parent 26aacf9 commit 5af1ecb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions rapids-cmake/cpm/bs_thread_pool.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ function(rapids_cpm_bs_thread_pool)

include("${rapids-cmake-dir}/cpm/find.cmake")
rapids_cpm_find(bs_thread_pool ${version} ${ARGN}
GLOBAL_TARGETS rapids_bs_thread_pool
CPM_ARGS
GIT_REPOSITORY ${repository}
GIT_TAG ${tag}
Expand Down
3 changes: 3 additions & 0 deletions testing/cpm/cpm_bs_thread_pool-simple.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ if(NOT TARGET BS::thread_pool)
endif()

rapids_cpm_bs_thread_pool()

include(${rapids-cmake-dir}/cpm/generate_pinned_versions.cmake)
rapids_cpm_generate_pinned_versions(OUTPUT ${CMAKE_BINARY_DIR}/versions.json)

0 comments on commit 5af1ecb

Please sign in to comment.