Skip to content

Commit

Permalink
Make sure we use proper package name for FetchContent
Browse files Browse the repository at this point in the history
  • Loading branch information
robertmaynard committed Oct 24, 2024
1 parent 657fd55 commit 3202164
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rapids-cmake/cpm/package_override.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ function(rapids_cpm_package_override _rapids_override_filepath)
if(package_proper_name AND NOT package_proper_name STREQUAL package_name)
message(AUTHOR_WARNING "RAPIDS-CMake is assuming the override ${package_name} is meant for the ${package_proper_name} package. For correctness please use the correctly cased name")
endif()
if(NOT package_proper_name)
set(package_proper_name ${package_name}) # Required for FetchContent_Declare
endif()

# only add the first override for a project we encounter
string(JSON data GET "${json_data}" packages "${package_name}")
Expand All @@ -126,7 +129,7 @@ function(rapids_cpm_package_override _rapids_override_filepath)
if(exclude AND CMAKE_VERSION VERSION_GREATER_EQUAL 3.28.0)
set(exclude_from_all EXCLUDE_FROM_ALL)
endif()
FetchContent_Declare(${package_name}
FetchContent_Declare(${package_proper_name}
GIT_REPOSITORY ${repository}
GIT_TAG ${tag}
GIT_SHALLOW ${shallow}
Expand Down

0 comments on commit 3202164

Please sign in to comment.