Skip to content

Commit

Permalink
Correct style issues found by CI
Browse files Browse the repository at this point in the history
  • Loading branch information
robertmaynard committed Oct 24, 2024
1 parent 3202164 commit 3b32d6f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 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
@@ -1,5 +1,5 @@
#=============================================================================
# Copyright (c) 2021, NVIDIA CORPORATION.
# Copyright (c) 2021-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion rapids-cmake/cpm/detail/get_override_json.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#=============================================================================
# Copyright (c) 2021, NVIDIA CORPORATION.
# Copyright (c) 2021-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions rapids-cmake/cpm/detail/load_preset_versions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ function(rapids_cpm_load_preset_versions)
string(JSON package_name MEMBER "${json_data}" packages ${index})
string(JSON data GET "${json_data}" packages "${package_name}")

# Normalize the names all to lower case. This will allow us to better
# support overrides with different package name casing
# 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)
get_property(already_exists GLOBAL PROPERTY rapids_cpm_${normalized_pkg_name}_json SET)
if(NOT already_exists)
Expand Down
13 changes: 8 additions & 5 deletions rapids-cmake/cpm/package_override.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,20 @@ function(rapids_cpm_package_override _rapids_override_filepath)
foreach(index RANGE ${package_count})
string(JSON package_name MEMBER "${json_data}" packages ${index})
string(TOLOWER package_name normalized_pkg_name)
get_property(override_exists GLOBAL PROPERTY rapids_cpm_${normalized_pkg_name}_override_json DEFINED)
get_property(override_exists GLOBAL PROPERTY rapids_cpm_${normalized_pkg_name}_override_json
DEFINED)

if(override_exists OR DEFINED CPM_${package_name}_SOURCE)
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)
# 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")
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
Expand Down

0 comments on commit 3b32d6f

Please sign in to comment.