Skip to content

Commit

Permalink
Warn when the default versions.json has duplicate entries
Browse files Browse the repository at this point in the history
  • Loading branch information
robertmaynard committed Nov 4, 2024
1 parent 74a9498 commit 8aa1e30
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rapids-cmake/cpm/detail/load_preset_versions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ function(rapids_cpm_load_preset_versions)
# different package name casing
string(TOLOWER "${package_name}" normalized_pkg_name)
get_property(already_exists GLOBAL PROPERTY rapids_cpm_${normalized_pkg_name}_json SET)
if(NOT already_exists)
if(already_exists)
# Warn that we have duplicate entries in the default json file
message(AUTHOR_WARNING "RAPIDS-CMake has detected two entries for ${package_name} in ${_rapids_preset_version_file}. Please ensure a single entry as all names are cased insensitive")
else()
set_property(GLOBAL PROPERTY rapids_cpm_${normalized_pkg_name}_json "${data}")
set_property(GLOBAL PROPERTY rapids_cpm_${normalized_pkg_name}_json_file "${filepath}")

Expand Down

0 comments on commit 8aa1e30

Please sign in to comment.