Skip to content

Commit

Permalink
Correct lack of var expansion in TOLOWER
Browse files Browse the repository at this point in the history
  • Loading branch information
robertmaynard committed Oct 24, 2024
1 parent 3b32d6f commit 4bb794f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rapids-cmake/cpm/detail/get_default_json.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ get_default_json
#]=======================================================================]
function(get_default_json package_name output_variable)
list(APPEND CMAKE_MESSAGE_CONTEXT "rapids.cpm.get_default_json")
string(TOLOWER package_name package_name)
string(TOLOWER "${package_name}" package_name)
get_property(json_data GLOBAL PROPERTY rapids_cpm_${package_name}_json)
set(${output_variable} "${json_data}" PARENT_SCOPE)
endfunction()
2 changes: 1 addition & 1 deletion rapids-cmake/cpm/detail/get_override_json.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ get_override_json
#]=======================================================================]
function(get_override_json package_name output_variable)
list(APPEND CMAKE_MESSAGE_CONTEXT "rapids.cpm.get_override_json")
string(TOLOWER package_name package_name)
string(TOLOWER "${package_name}" package_name)
get_property(json_data GLOBAL PROPERTY rapids_cpm_${package_name}_override_json)
set(${output_variable} "${json_data}" PARENT_SCOPE)
endfunction()
2 changes: 1 addition & 1 deletion rapids-cmake/cpm/detail/load_preset_versions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function(rapids_cpm_load_preset_versions)

# Normalize the names all to lower case. This will allow us to better support overrides with
# different package name casing
string(TOLOWER package_name normalized_pkg_name)
string(TOLOWER "${package_name}" normalized_pkg_name)
get_property(already_exists GLOBAL PROPERTY rapids_cpm_${normalized_pkg_name}_json SET)
if(NOT already_exists)
set_property(GLOBAL PROPERTY rapids_cpm_${normalized_pkg_name}_json "${data}")
Expand Down
3 changes: 2 additions & 1 deletion rapids-cmake/cpm/package_override.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function(rapids_cpm_package_override _rapids_override_filepath)
# cmake-lint: disable=E1120
foreach(index RANGE ${package_count})
string(JSON package_name MEMBER "${json_data}" packages ${index})
string(TOLOWER package_name normalized_pkg_name)
string(TOLOWER "${package_name}" normalized_pkg_name)
get_property(override_exists GLOBAL PROPERTY rapids_cpm_${normalized_pkg_name}_override_json
DEFINED)

Expand Down Expand Up @@ -137,6 +137,7 @@ function(rapids_cpm_package_override _rapids_override_filepath)
GIT_TAG ${tag}
GIT_SHALLOW ${shallow}
${patch_command} ${exclude_from_all})
unset(package_proper_name)
endforeach()
endif()
endfunction()

0 comments on commit 4bb794f

Please sign in to comment.