From 07651caebf1678085e4df3d5df9071abad36d589 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Fri, 2 Aug 2024 11:18:40 -0400 Subject: [PATCH 1/2] Remove deprecated rapids_export_find_package_* signatures --- rapids-cmake/export/find_package_file.cmake | 11 ++-------- rapids-cmake/export/find_package_root.cmake | 11 ++-------- testing/export/CMakeLists.txt | 4 ---- .../export/find_package_file-deprecated.cmake | 20 ------------------- .../export/find_package_root-deprecated.cmake | 20 ------------------- 5 files changed, 4 insertions(+), 62 deletions(-) delete mode 100644 testing/export/find_package_file-deprecated.cmake delete mode 100644 testing/export/find_package_root-deprecated.cmake diff --git a/rapids-cmake/export/find_package_file.cmake b/rapids-cmake/export/find_package_file.cmake index c4b93257..954fdcf4 100644 --- a/rapids-cmake/export/find_package_file.cmake +++ b/rapids-cmake/export/find_package_file.cmake @@ -28,7 +28,7 @@ the associated export set. rapids_export_find_package_file( (BUILD|INSTALL) - ( | EXPORT_SET [ExportSetName]) + EXPORT_SET [CONDITION ] ) @@ -68,14 +68,7 @@ function(rapids_export_find_package_file type file_path) set(one_value EXPORT_SET CONDITION) set(multi_value "") cmake_parse_arguments(_RAPIDS "${options}" "${one_value}" "${multi_value}" ${ARGN}) - # handle when we are given just an export set name and not `EXPORT_SET ` - if(_RAPIDS_UNPARSED_ARGUMENTS AND NOT _RAPIDS_COMPONENTS_EXPORT_SET) - rapids_cmake_policy(DEPRECATED_IN 23.12 - REMOVED_IN 24.02 - MESSAGE [=[Usage of `rapids_export_find_package_file` without an explicit `EXPORT_SET` key has been deprecated.]=] - ) - set(_RAPIDS_EXPORT_SET ${_RAPIDS_UNPARSED_ARGUMENTS}) - endif() + # Early terminate conditions if(NOT _RAPIDS_EXPORT_SET OR NOT ${_RAPIDS_CONDITION}) return() diff --git a/rapids-cmake/export/find_package_root.cmake b/rapids-cmake/export/find_package_root.cmake index 71deffa3..ba37e697 100644 --- a/rapids-cmake/export/find_package_root.cmake +++ b/rapids-cmake/export/find_package_root.cmake @@ -29,7 +29,7 @@ needs to be set to the provided path. rapids_export_find_package_root( (BUILD|INSTALL) - ( | EXPORT_SET [ExportSetName]) + EXPORT_SET [CONDITION ] ) @@ -65,14 +65,7 @@ function(rapids_export_find_package_root type name dir_path) set(one_value EXPORT_SET CONDITION) set(multi_value "") cmake_parse_arguments(_RAPIDS "${options}" "${one_value}" "${multi_value}" ${ARGN}) - # handle when we are given just an export set name and not `EXPORT_SET ` - if(_RAPIDS_UNPARSED_ARGUMENTS AND NOT _RAPIDS_COMPONENTS_EXPORT_SET) - rapids_cmake_policy(DEPRECATED_IN 23.12 - REMOVED_IN 24.02 - MESSAGE [=[Usage of `rapids_export_find_package_root` without an explicit `EXPORT_SET` key has been deprecated.]=] - ) - set(_RAPIDS_EXPORT_SET ${_RAPIDS_UNPARSED_ARGUMENTS}) - endif() + # Early terminate conditions if(NOT _RAPIDS_EXPORT_SET OR NOT ${_RAPIDS_CONDITION}) return() diff --git a/testing/export/CMakeLists.txt b/testing/export/CMakeLists.txt index fd48524c..3fd7e670 100644 --- a/testing/export/CMakeLists.txt +++ b/testing/export/CMakeLists.txt @@ -72,7 +72,3 @@ add_cmake_config_test( write_dependencies-root-dirs.cmake ) add_cmake_build_test( write_language-multiple-nested-enables ) add_cmake_build_test( write_language-nested-dirs ) - -set(deprecated_message [=[rapids-cmake policy [deprecated=23.12 removed=24.02]: Usage of ]=]) -add_cmake_config_test( find_package_file-deprecated.cmake SHOULD_FAIL "${deprecated_message}") -add_cmake_config_test( find_package_root-deprecated.cmake SHOULD_FAIL "${deprecated_message}") diff --git a/testing/export/find_package_file-deprecated.cmake b/testing/export/find_package_file-deprecated.cmake deleted file mode 100644 index 64da1dd5..00000000 --- a/testing/export/find_package_file-deprecated.cmake +++ /dev/null @@ -1,20 +0,0 @@ -#============================================================================= -# Copyright (c) 2023, NVIDIA CORPORATION. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#============================================================================= -include(${rapids-cmake-dir}/export/find_package_file.cmake) - -project(rapids-project LANGUAGES CUDA) -set(CMAKE_ERROR_DEPRECATED ON) -rapids_export_find_package_file(BUILD [=[${CMAKE_CURRENT_LIST_DIR}/fake/build/path]=] test_set) diff --git a/testing/export/find_package_root-deprecated.cmake b/testing/export/find_package_root-deprecated.cmake deleted file mode 100644 index 8e635fa1..00000000 --- a/testing/export/find_package_root-deprecated.cmake +++ /dev/null @@ -1,20 +0,0 @@ -#============================================================================= -# Copyright (c) 2023, NVIDIA CORPORATION. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#============================================================================= -include(${rapids-cmake-dir}/export/find_package_root.cmake) - -project(rapids-project LANGUAGES CUDA) -set(CMAKE_ERROR_DEPRECATED ON) -rapids_export_find_package_root(BUILD RMM [=[${CMAKE_CURRENT_LIST_DIR}/fake/build/path]=] test_set) From bdbd24fe0751851b398e4b35bb30fbbc4bf29f38 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Fri, 2 Aug 2024 11:42:09 -0400 Subject: [PATCH 2/2] Correct issues found by CI --- rapids-cmake/export/find_package_file.cmake | 2 +- rapids-cmake/export/find_package_root.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rapids-cmake/export/find_package_file.cmake b/rapids-cmake/export/find_package_file.cmake index 954fdcf4..40b4a6a8 100644 --- a/rapids-cmake/export/find_package_file.cmake +++ b/rapids-cmake/export/find_package_file.cmake @@ -1,5 +1,5 @@ #============================================================================= -# Copyright (c) 2021-2023, 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. diff --git a/rapids-cmake/export/find_package_root.cmake b/rapids-cmake/export/find_package_root.cmake index ba37e697..4fe062eb 100644 --- a/rapids-cmake/export/find_package_root.cmake +++ b/rapids-cmake/export/find_package_root.cmake @@ -1,5 +1,5 @@ #============================================================================= -# Copyright (c) 2021-2023, 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.