diff --git a/cmake-format-rapids-cmake.json b/cmake-format-rapids-cmake.json index 0d002ebd..bfd44c22 100644 --- a/cmake-format-rapids-cmake.json +++ b/cmake-format-rapids-cmake.json @@ -53,8 +53,17 @@ "rapids_cpm_init": { "pargs": { "nargs": 0 + }, + "kwargs": { + "OVERRIDE": 1 + } + }, + "rapids_cpm_package_override": { + "pargs": { + "nargs": 1 } }, + "rapids_cpm_gtest": { "pargs": { "nargs": 0 @@ -64,7 +73,6 @@ "INSTALL_EXPORT_SET": 1 } }, - "rapids_cpm_nvbench": { "pargs": { "nargs": 0 @@ -73,7 +81,6 @@ "BUILD_EXPORT_SET": 1 } }, - "rapids_cpm_rmm": { "pargs": { "nargs": 0 @@ -83,7 +90,6 @@ "INSTALL_EXPORT_SET": 1 } }, - "rapids_cpm_spdlog": { "pargs": { "nargs": 0 @@ -93,7 +99,6 @@ "INSTALL_EXPORT_SET": 1 } }, - "rapids_cpm_thrust": { "pargs": { "nargs": 2 diff --git a/docs/api.rst b/docs/api.rst index 4d3af4f1..a1a2ab5e 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -48,6 +48,8 @@ package uses :ref:`can be found here. ` /packages/rapids_cpm_rmm /packages/rapids_cpm_spdlog /packages/rapids_cpm_thrust + /command/rapids_cpm_package_override + Find diff --git a/docs/command/rapids_cpm_package_override.rst b/docs/command/rapids_cpm_package_override.rst new file mode 100644 index 00000000..a059e0af --- /dev/null +++ b/docs/command/rapids_cpm_package_override.rst @@ -0,0 +1 @@ +.. cmake-module:: ../../rapids-cmake/cpm/package_override.cmake diff --git a/docs/packages/rapids_cpm_versions.rst b/docs/packages/rapids_cpm_versions.rst index 3e2c543e..206649b5 100644 --- a/docs/packages/rapids_cpm_versions.rst +++ b/docs/packages/rapids_cpm_versions.rst @@ -1,5 +1,5 @@ :orphan: - +.. _cpm_version_format: rapids-cmake package version format ################################### diff --git a/rapids-cmake/cpm/detail/package_details.cmake b/rapids-cmake/cpm/detail/package_details.cmake index 94bd79c8..e2fe47a3 100644 --- a/rapids-cmake/cpm/detail/package_details.cmake +++ b/rapids-cmake/cpm/detail/package_details.cmake @@ -30,18 +30,28 @@ function(rapids_cpm_package_details package_name version_var url_var tag_var sha include("${rapids-cmake-dir}/cpm/detail/load_preset_versions.cmake") rapids_cpm_load_preset_versions() + get_property(override_json_data GLOBAL PROPERTY rapids_cpm_${package_name}_override_json) get_property(json_data GLOBAL PROPERTY rapids_cpm_${package_name}_json) # Parse required fields - string(JSON version GET "${json_data}" version) - string(JSON git_url GET "${json_data}" git_url) - string(JSON git_tag GET "${json_data}" git_tag) - - # Parse optional fields - string(JSON git_shallow ERROR_VARIABLE git_shallow_error GET "${json_data}" git_shallow) - if(git_shallow_error) - set(git_shallow ON) - endif() + function(rapids_cpm_json_get_value name) + string(JSON value ERROR_VARIABLE have_error GET "${override_json_data}" ${name}) + if(have_error) + string(JSON value ERROR_VARIABLE have_error GET "${json_data}" ${name}) + endif() + + if(NOT have_error) + set(${name} ${value} PARENT_SCOPE) + endif() + endfunction() + + rapids_cpm_json_get_value(version) + rapids_cpm_json_get_value(git_url) + rapids_cpm_json_get_value(git_tag) + + # Parse optional fields, set the variable to the 'default' value first + set(git_shallow ON) + rapids_cpm_json_get_value(git_shallow) # Evaluate any magic placeholders in the version or tag components including the # `rapids-cmake-version` value diff --git a/rapids-cmake/cpm/init.cmake b/rapids-cmake/cpm/init.cmake index 77fb98a2..4eefa36d 100644 --- a/rapids-cmake/cpm/init.cmake +++ b/rapids-cmake/cpm/init.cmake @@ -25,13 +25,21 @@ Establish the `CPM` and preset package infrastructure for the project. .. code-block:: cmake - rapids_cpm_init() + rapids_cpm_init( [OVERRIDE ] ) The CPM module will be downloaded based on the state of :cmake:variable:`CPM_SOURCE_CACHE` and :cmake:variable:`ENV{CPM_SOURCE_CACHE}`. This allows multiple nested projects to share the same download of CPM. If those variables aren't set the file will be cached in the build tree of the calling project +``OVERRIDE`` +.. versionadded:: v21.10.00 + Override the `CPM` preset package information for the project. The user provided + json file must follow the `versions.json` format, which is :ref:`documented here`. + + If the override file doesn't specify a value or package entry the default + version will be used. + .. note:: Must be called before any invocation of :cmake:command:`rapids_cpm_find`. @@ -39,9 +47,19 @@ in the build tree of the calling project function(rapids_cpm_init) list(APPEND CMAKE_MESSAGE_CONTEXT "rapids.cpm.init") + set(options) + set(one_value OVERRIDE) + set(multi_value) + cmake_parse_arguments(RAPIDS "${options}" "${one_value}" "${multi_value}" ${ARGN}) + include("${rapids-cmake-dir}/cpm/detail/load_preset_versions.cmake") rapids_cpm_load_preset_versions() + if(RAPIDS_OVERRIDE) + include("${rapids-cmake-dir}/cpm/package_override.cmake") + rapids_cpm_package_override("${RAPIDS_OVERRIDE}") + endif() + include("${rapids-cmake-dir}/cpm/detail/download.cmake") rapids_cpm_download() diff --git a/rapids-cmake/cpm/package_override.cmake b/rapids-cmake/cpm/package_override.cmake new file mode 100644 index 00000000..cc929f28 --- /dev/null +++ b/rapids-cmake/cpm/package_override.cmake @@ -0,0 +1,65 @@ +#============================================================================= +# Copyright (c) 2021, 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_guard(GLOBAL) + +#[=======================================================================[.rst: +rapids_cpm_package_override +--------------------------- + +.. versionadded:: v21.10.00 + +Override `CPM` preset package information for the project. + +.. code-block:: cmake + + rapids_cpm_package_override() + +Allows projects to override the default values for any rapids-cmake +pre-configured cpm package. + +The user provided json file must follow the `versions.json` format, +which is :ref:`documented here` and shown in the below +example: + +.. literalinclude:: /packages/example.json + :language: json + +If the override file doesn't specify a value or package entry the default +version will be used. + +#]=======================================================================] +function(rapids_cpm_package_override filepath) + list(APPEND CMAKE_MESSAGE_CONTEXT "rapids.cpm.rapids_cpm_package_override") + + if(NOT EXISTS "${filepath}") + message(FATAL_ERROR "rapids_cpm_package_override can't load "${filepath}", verify it exists") + endif() + file(READ "${filepath}" json_data) + + # Determine all the projects that exist in the json file + string(JSON package_count LENGTH "${json_data}" packages) + math(EXPR package_count "${package_count} - 1") + + # For each project cache the subset of the json for that project in a global property + + # cmake-lint: disable=E1120 + foreach(index RANGE ${package_count}) + string(JSON package_name MEMBER "${json_data}" packages ${index}) + string(JSON data GET "${json_data}" packages "${package_name}") + set_property(GLOBAL PROPERTY rapids_cpm_${package_name}_override_json "${data}") + endforeach() + +endfunction() diff --git a/testing/cpm/CMakeLists.txt b/testing/cpm/CMakeLists.txt index f703ff19..ba18a9bb 100644 --- a/testing/cpm/CMakeLists.txt +++ b/testing/cpm/CMakeLists.txt @@ -20,6 +20,15 @@ add_cmake_config_test( cpm_find-existing-target ) add_cmake_config_test( cpm_find-existing-target-to-export-sets ) add_cmake_config_test( cpm_find-options-escaped ) +add_cmake_config_test( cpm_init-bad-override-path.cmake SHOULD_FAIL ) +add_cmake_config_test( cpm_init-override-multiple.cmake ) +add_cmake_config_test( cpm_init-override-simple.cmake ) + +add_cmake_config_test( cpm_package_override-bad-path.cmake SHOULD_FAIL ) +add_cmake_config_test( cpm_package_override-before-init.cmake ) +add_cmake_config_test( cpm_package_override-multiple.cmake ) +add_cmake_config_test( cpm_package_override-simple.cmake ) + add_cmake_config_test( cpm_gtest-export.cmake SERIAL ) add_cmake_config_test( cpm_gtest-simple.cmake SERIAL ) diff --git a/testing/cpm/cpm_init-bad-override-path.cmake b/testing/cpm/cpm_init-bad-override-path.cmake new file mode 100644 index 00000000..14c79b87 --- /dev/null +++ b/testing/cpm/cpm_init-bad-override-path.cmake @@ -0,0 +1,19 @@ +#============================================================================= +# Copyright (c) 2021, 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}/cpm/init.cmake) + +include("${rapids-cmake-testing-dir}/cpm/setup_cpm_cache.cmake") +rapids_cpm_init(OVERRIDE ${CMAKE_CURRENT_LIST_DIR}/bad_path.cmake) diff --git a/testing/cpm/cpm_init-override-multiple.cmake b/testing/cpm/cpm_init-override-multiple.cmake new file mode 100644 index 00000000..ba5e4ab3 --- /dev/null +++ b/testing/cpm/cpm_init-override-multiple.cmake @@ -0,0 +1,64 @@ +#============================================================================= +# Copyright (c) 2021, 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}/cpm/init.cmake) + +include("${rapids-cmake-testing-dir}/cpm/setup_cpm_cache.cmake") + + +rapids_cpm_init() + +# Load the default values for nvbench and GTest projects +include("${rapids-cmake-dir}/cpm/detail/package_details.cmake") +rapids_cpm_package_details(nvbench nvbench_version nvbench_repository nvbench_tag nvbench_shallow) +rapids_cpm_package_details(GTest GTest_version GTest_repository GTest_tag GTest_shallow) + + +# Need to write out an override file +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/override.json + [=[ +{ + "packages" : { + "nvbench" : { + "git_tag" : "my_tag" + }, + "GTest" : { + "version" : "2.99" + } + } +} + ]=]) + +rapids_cpm_init(OVERRIDE "${CMAKE_CURRENT_BINARY_DIR}/override.json") + +# Verify that the override works +rapids_cpm_package_details(nvbench version repository tag shallow) +if(NOT version STREQUAL nvbench_version) + message(FATAL_ERROR "default version field was removed.") +endif() +if(NOT repository STREQUAL nvbench_repository) + message(FATAL_ERROR "default repository field was removed.") +endif() +if(NOT tag STREQUAL "my_tag") + message(FATAL_ERROR "custom git_tag field was ignored. ${tag} found instead of my_url") +endif() + +rapids_cpm_package_details(GTest version repository tag shallow) +if(NOT version STREQUAL "2.99") + message(FATAL_ERROR "custom version field was removed. ${version} was found instead") +endif() +if(NOT tag MATCHES "2.99") + message(FATAL_ERROR "custom version field not used when computing git_tag value. ${tag} was found instead") +endif() diff --git a/testing/cpm/cpm_init-override-simple.cmake b/testing/cpm/cpm_init-override-simple.cmake new file mode 100644 index 00000000..d7008755 --- /dev/null +++ b/testing/cpm/cpm_init-override-simple.cmake @@ -0,0 +1,49 @@ +#============================================================================= +# Copyright (c) 2021, 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}/cpm/init.cmake) + +include("${rapids-cmake-testing-dir}/cpm/setup_cpm_cache.cmake") + +# Need to write out an override file +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/override.json + [=[ +{ + "packages" : { + "nvbench" : { + "version" : "custom_version", + "git_url" : "my_url", + "git_tag" : "my_tag" + } + } +} + ]=]) + +rapids_cpm_init(OVERRIDE "${CMAKE_CURRENT_BINARY_DIR}/override.json") + +# Verify that the override works +include("${rapids-cmake-dir}/cpm/detail/package_details.cmake") +rapids_cpm_package_details(nvbench version repository tag shallow) + +if(NOT version STREQUAL "custom_version") + message(FATAL_ERROR "custom version field was ignored. ${version} found instead of custom_version") +endif() +if(NOT repository STREQUAL "my_url") + message(FATAL_ERROR "custom git_url field was ignored. ${repository} found instead of my_url") +endif() +if(NOT tag STREQUAL "my_tag") + message(FATAL_ERROR "custom git_tag field was ignored. ${tag} found instead of my_tag") +endif() + diff --git a/testing/cpm/cpm_package_override-bad-path.cmake b/testing/cpm/cpm_package_override-bad-path.cmake new file mode 100644 index 00000000..283c2146 --- /dev/null +++ b/testing/cpm/cpm_package_override-bad-path.cmake @@ -0,0 +1,20 @@ +#============================================================================= +# Copyright (c) 2021, 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}/cpm/init.cmake) +include(${rapids-cmake-dir}/cpm/package_override.cmake) + +rapids_cpm_init() +rapids_cpm_package_override(${CMAKE_CURRENT_LIST_DIR}/bad_path.cmake) diff --git a/testing/cpm/cpm_package_override-before-init.cmake b/testing/cpm/cpm_package_override-before-init.cmake new file mode 100644 index 00000000..0892569b --- /dev/null +++ b/testing/cpm/cpm_package_override-before-init.cmake @@ -0,0 +1,49 @@ +#============================================================================= +# Copyright (c) 2021, 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}/cpm/init.cmake) +include(${rapids-cmake-dir}/cpm/package_override.cmake) + +# Need to write out an override file +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/simple_override.json + [=[ +{ + "packages" : { + "nvbench" : { + "version" : "custom_version", + "git_url" : "my_url2", + "git_tag" : "my_tag" + } + } +} + ]=]) +rapids_cpm_package_override(${CMAKE_CURRENT_BINARY_DIR}/simple_override.json) + +rapids_cpm_init() + +# Verify that the override works +include("${rapids-cmake-dir}/cpm/detail/package_details.cmake") +rapids_cpm_package_details(nvbench version repository tag shallow) + +if(NOT version STREQUAL "custom_version") + message(FATAL_ERROR "custom version field was ignored. ${version} found instead of custom_version") +endif() +if(NOT repository STREQUAL "my_url2") + message(FATAL_ERROR "custom git_url field was ignored. ${repository} found instead of my_url2") +endif() +if(NOT tag STREQUAL "my_tag") + message(FATAL_ERROR "custom git_tag field was ignored. ${tag} found instead of my_tag") +endif() + diff --git a/testing/cpm/cpm_package_override-multiple.cmake b/testing/cpm/cpm_package_override-multiple.cmake new file mode 100644 index 00000000..16daa763 --- /dev/null +++ b/testing/cpm/cpm_package_override-multiple.cmake @@ -0,0 +1,82 @@ +#============================================================================= +# Copyright (c) 2021, 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}/cpm/init.cmake) +include(${rapids-cmake-dir}/cpm/package_override.cmake) + +rapids_cpm_init() + +# Load the default values for nvbench and GTest projects +include("${rapids-cmake-dir}/cpm/detail/package_details.cmake") +rapids_cpm_package_details(nvbench nvbench_version nvbench_repository nvbench_tag nvbench_shallow) +rapids_cpm_package_details(GTest GTest_version GTest_repository GTest_tag GTest_shallow) +rapids_cpm_package_details(rmm rmm_version rmm_repository rmm_tag rmm_shallow) + +# Need to write out an override file +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/override1.json + [=[ +{ + "packages" : { + "nvbench" : { + "git_tag" : "my_tag" + }, + "GTest" : { + "version" : "2.99" + } + } +} + ]=]) + +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/override2.json + [=[ +{ + "packages" : { + "rmm" : { + "git_tag" : "new_rmm_tag" + }, + "GTest" : { + "version" : "3.99" + } + } +} + ]=]) + +rapids_cpm_package_override(${CMAKE_CURRENT_BINARY_DIR}/override1.json) +rapids_cpm_package_override(${CMAKE_CURRENT_BINARY_DIR}/override2.json) + +# Verify that the override works +rapids_cpm_package_details(nvbench version repository tag shallow) +if(NOT version STREQUAL nvbench_version) + message(FATAL_ERROR "default version field was removed.") +endif() +if(NOT repository STREQUAL nvbench_repository) + message(FATAL_ERROR "default repository field was removed.") +endif() +if(NOT tag STREQUAL "my_tag") + message(FATAL_ERROR "custom git_tag field was ignored. ${tag} found instead of my_url") +endif() + +rapids_cpm_package_details(GTest version repository tag shallow) +if(NOT version STREQUAL "3.99") + message(FATAL_ERROR "custom version field was removed. ${version} was found instead") +endif() +if(NOT tag MATCHES "3.99") + message(FATAL_ERROR "custom version field not used when computing git_tag value. ${tag} was found instead") +endif() + +rapids_cpm_package_details(rmm version repository tag shallow) +if(NOT tag MATCHES "new_rmm_tag") + message(FATAL_ERROR "custom version field not used when computing git_tag value. ${tag} was found instead") +endif() \ No newline at end of file diff --git a/testing/cpm/cpm_package_override-simple.cmake b/testing/cpm/cpm_package_override-simple.cmake new file mode 100644 index 00000000..eb4c6b56 --- /dev/null +++ b/testing/cpm/cpm_package_override-simple.cmake @@ -0,0 +1,56 @@ +#============================================================================= +# Copyright (c) 2021, 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}/cpm/init.cmake) +include(${rapids-cmake-dir}/cpm/package_override.cmake) + +rapids_cpm_init() + +# Need to write out an override file +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/override.json + [=[ +{ + "packages" : { + "rmm" : { + "git_tag" : "new_rmm_tag", + "git_shallow" : "OFF" + }, + "GTest" : { + "version" : "3.00.A1" + } + } +} + ]=]) + +rapids_cpm_package_override(${CMAKE_CURRENT_BINARY_DIR}/override.json) + +# Verify that the override works +include("${rapids-cmake-dir}/cpm/detail/package_details.cmake") + +rapids_cpm_package_details(GTest version repository tag shallow) +if(NOT version STREQUAL "3.00.A1") + message(FATAL_ERROR "custom version field was removed. ${version} was found instead") +endif() +if(NOT tag MATCHES "3.00.A1") + message(FATAL_ERROR "custom version field not used when computing git_tag value. ${tag} was found instead") +endif() + +rapids_cpm_package_details(rmm version repository tag shallow) +if(NOT tag MATCHES "new_rmm_tag") + message(FATAL_ERROR "custom version field not used when computing git_tag value. ${tag} was found instead") +endif() +if(NOT shallow MATCHES "OFF") + message(FATAL_ERROR "custom version field not used when computing git_shallow value. ${shallow} was found instead") +endif() \ No newline at end of file diff --git a/testing/utils/cmake_test.cmake b/testing/utils/cmake_test.cmake index 1c5ff7cb..3ffe2b9d 100644 --- a/testing/utils/cmake_test.cmake +++ b/testing/utils/cmake_test.cmake @@ -35,6 +35,7 @@ adds a test for each generator: add_cmake_build_test( (config|build|run|install) [SERIAL] + [SHOULD_FAIL] ) ``config`` @@ -52,7 +53,7 @@ adds a test for each generator: #]=======================================================================] function(add_cmake_test mode source_or_dir) - set(options SERIAL) + set(options SERIAL SHOULD_FAIL) set(one_value) set(multi_value) cmake_parse_arguments(RAPIDS_TEST "${options}" "${one_value}" "${multi_value}" ${ARGN}) @@ -111,6 +112,10 @@ function(add_cmake_test mode source_or_dir) set_tests_properties(${test_name} PROPERTIES RUN_SERIAL ON) endif() + if(RAPIDS_TEST_SHOULD_FAIL) + set_tests_properties(${test_name} PROPERTIES WILL_FAIL ON) + endif() + # Apply a label to the test based on the folder it is in and the generator used get_filename_component(label_name ${CMAKE_CURRENT_LIST_DIR} NAME_WE) string(TOLOWER "${label_name}" lower_case_label )