diff --git a/rapids-cmake/cpm/detail/load_preset_versions.cmake b/rapids-cmake/cpm/detail/load_preset_versions.cmake index cf05b8b3..6ead9343 100644 --- a/rapids-cmake/cpm/detail/load_preset_versions.cmake +++ b/rapids-cmake/cpm/detail/load_preset_versions.cmake @@ -82,6 +82,8 @@ function(rapids_cpm_load_preset_versions) if(NOT already_exists) set_property(GLOBAL PROPERTY rapids_cpm_${normalized_pkg_name}_json "${data}") set_property(GLOBAL PROPERTY rapids_cpm_${normalized_pkg_name}_json_file "${filepath}") + + set_property(GLOBAL PROPERTY rapids_cpm_${normalized_pkg_name}_proper_name "${package_name}") endif() endforeach() diff --git a/rapids-cmake/cpm/package_override.cmake b/rapids-cmake/cpm/package_override.cmake index 14249386..9d8e6fd0 100644 --- a/rapids-cmake/cpm/package_override.cmake +++ b/rapids-cmake/cpm/package_override.cmake @@ -101,6 +101,13 @@ function(rapids_cpm_package_override _rapids_override_filepath) continue() endif() + # Warn if our name all lower case matches a default package, but our + # case sensitive names doesn't ( ABC vs abc ) + get_property(package_proper_name GLOBAL PROPERTY rapids_cpm_${normalized_pkg_name}_proper_name) + 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() + # only add the first override for a project we encounter string(JSON data GET "${json_data}" packages "${package_name}") set_property(GLOBAL PROPERTY rapids_cpm_${normalized_pkg_name}_override_json "${data}")