Skip to content

Commit

Permalink
Remove deprecated rapids_export_find_package_* signatures (#666)
Browse files Browse the repository at this point in the history
Remove deprecated sigantures of `rapids_export_find_package_file` and `rapids_export_find_package_root`

Authors:
  - Robert Maynard (https://github.com/robertmaynard)

Approvers:
  - Bradley Dice (https://github.com/bdice)

URL: #666
  • Loading branch information
robertmaynard authored Aug 5, 2024
1 parent 120d1fa commit 45e4597
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 64 deletions.
13 changes: 3 additions & 10 deletions rapids-cmake/export/find_package_file.cmake
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -28,7 +28,7 @@ the associated export set.

rapids_export_find_package_file( (BUILD|INSTALL)
<file_path>
(<ExportSetName> | EXPORT_SET [ExportSetName])
EXPORT_SET <ExportSetName>
[CONDITION <variableName>]
)

Expand Down Expand Up @@ -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 <name>`
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()
Expand Down
13 changes: 3 additions & 10 deletions rapids-cmake/export/find_package_root.cmake
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -29,7 +29,7 @@ needs to be set to the provided path.
rapids_export_find_package_root( (BUILD|INSTALL)
<PackageName>
<directory_path>
(<ExportSetName> | EXPORT_SET [ExportSetName])
EXPORT_SET <ExportSetName>
[CONDITION <variableName>]
)

Expand Down Expand Up @@ -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 <name>`
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()
Expand Down
4 changes: 0 additions & 4 deletions testing/export/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
20 changes: 0 additions & 20 deletions testing/export/find_package_file-deprecated.cmake

This file was deleted.

20 changes: 0 additions & 20 deletions testing/export/find_package_root-deprecated.cmake

This file was deleted.

0 comments on commit 45e4597

Please sign in to comment.