diff --git a/testing/cpm/CMakeLists.txt b/testing/cpm/CMakeLists.txt index 95dfaa8c..1ff4f476 100644 --- a/testing/cpm/CMakeLists.txt +++ b/testing/cpm/CMakeLists.txt @@ -15,24 +15,24 @@ #============================================================================= add_cmake_config_test( rapids-cpm.cmake ) -add_cmake_config_test( cpm_find-add-pkg-source ) -add_cmake_config_test( cpm_find-and-find_package ) +add_cmake_config_test( cpm_find-add-pkg-source NO_DEV_ERRORS) +add_cmake_config_test( cpm_find-and-find_package NO_DEV_ERRORS) add_cmake_config_test( cpm_find-components ) add_cmake_config_test( cpm_find-existing-build-dir ) 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-gtest-no-gmock ) -add_cmake_config_test( cpm_find-options-escaped ) -add_cmake_config_test( cpm_find-patch-command NO_CPM_CACHE) -add_cmake_config_test( cpm_find-patch-command-required NO_CPM_CACHE ) +add_cmake_config_test( cpm_find-options-escaped NO_DEV_ERRORS) +add_cmake_config_test( cpm_find-patch-command NO_CPM_CACHE NO_DEV_ERRORS) +add_cmake_config_test( cpm_find-patch-command-required NO_CPM_CACHE NO_DEV_ERRORS) add_cmake_config_test( cpm_find-patch-command-required-fails NO_CPM_CACHE SHOULD_FAIL "rapids-cmake [fmt]: failed to apply patch") -add_cmake_config_test( cpm_find-restore-cpm-vars ) +add_cmake_config_test( cpm_find-restore-cpm-vars NO_DEV_ERRORS) add_cmake_config_test( cpm_find-version-explicit-install.cmake ) -add_cmake_build_test( cpm_generate_pins-format-patches NO_CPM_CACHE) +add_cmake_build_test( cpm_generate_pins-format-patches NO_CPM_CACHE NO_DEV_ERRORS) add_cmake_build_test( cpm_generate_pins-nested ) add_cmake_build_test( cpm_generate_pins-no-src-dir ) -add_cmake_build_test( cpm_generate_pins-override NO_CPM_CACHE) +add_cmake_build_test( cpm_generate_pins-override NO_CPM_CACHE NO_DEV_ERRORS) add_cmake_build_test( cpm_generate_pins-pure-cpm ) add_cmake_build_test( cpm_generate_pins-simple ) add_cmake_build_test( cpm_generate_pins-simple-via-variable ) @@ -50,7 +50,7 @@ add_cmake_config_test( cpm_init-override-multiple.cmake) add_cmake_config_test( cpm_init-override-via-cmake-var.cmake) -add_cmake_config_test( cpm_package_override-add-new-project.cmake ) +add_cmake_config_test( cpm_package_override-add-new-project.cmake NO_DEV_ERRORS) add_cmake_config_test( cpm_package_override-bad-path.cmake SHOULD_FAIL "rapids_cpm_package_override can't load") add_cmake_config_test( cpm_package_override-before-init.cmake ) add_cmake_config_test( cpm_package_override-empty.cmake ) @@ -74,9 +74,9 @@ add_cmake_build_test( cpm_bs_thread_pool-install-config-works.cmake ) add_cmake_config_test( cpm_cccl-simple.cmake ) add_cmake_config_test( cpm_cccl-export.cmake ) -add_cmake_build_test( cpm_cccl-version-2-5.cmake ) -add_cmake_build_test( cpm_cccl-version-2-7.cmake ) -add_cmake_build_test( cpm_cccl-version-2-8.cmake ) +add_cmake_build_test( cpm_cccl-version-2-5.cmake NO_DEV_ERRORS) +add_cmake_build_test( cpm_cccl-version-2-7.cmake NO_DEV_ERRORS) +add_cmake_build_test( cpm_cccl-version-2-8.cmake NO_DEV_ERRORS) add_cmake_build_test( cpm_cccl-preserve-custom-install-loc ) add_cmake_config_test( cpm_cuco-simple.cmake ) diff --git a/testing/test/CMakeLists.txt b/testing/test/CMakeLists.txt index e62d1d6a..1fa7c2b8 100644 --- a/testing/test/CMakeLists.txt +++ b/testing/test/CMakeLists.txt @@ -46,7 +46,7 @@ add_cmake_build_test(install_relocatable-no-tests.cmake) add_cmake_build_test(install_relocatable-simple.cmake) add_cmake_build_test(install_relocatable-installed-tests-run) add_cmake_build_test(install_relocatable-installed-tests-run-lazy-msg) -add_cmake_build_test(install_relocatable-with-gtest_discover_tests.cmake) +add_cmake_build_test(install_relocatable-with-gtest_discover_tests.cmake NO_DEV_ERRORS) add_cmake_config_test(install_relocatable-wrong-component.cmake SHOULD_FAIL "${wrong_component_message}") add_cmake_ctest_test(add-impossible-allocation SHOULD_FAIL "Insufficient resources for test") diff --git a/testing/utils/cmake_test.cmake b/testing/utils/cmake_test.cmake index 8a5bacf2..094af793 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|test|install) [SERIAL] + [NO_DEV_ERRORS] [NO_CPM_CACHE] [NO_RAPIDS_CMAKE_HOOKS] [SHOULD_FAIL ] @@ -60,7 +61,7 @@ adds a test for each generator: #]=======================================================================] function(add_cmake_test mode source_or_dir) - set(options SERIAL NO_CPM_CACHE NO_RAPIDS_CMAKE_HOOKS) + set(options SERIAL NO_DEV_ERRORS NO_CPM_CACHE NO_RAPIDS_CMAKE_HOOKS) set(one_value SHOULD_FAIL) set(multi_value) cmake_parse_arguments(RAPIDS_TEST "${options}" "${one_value}" "${multi_value}" ${ARGN}) @@ -84,7 +85,10 @@ function(add_cmake_test mode source_or_dir) endif() if(NOT RAPIDS_TEST_NO_RAPIDS_CMAKE_HOOKS) - set(extra_configure_flags "-DCMAKE_PROJECT_INCLUDE_BEFORE=${PROJECT_SOURCE_DIR}/utils/emulate_fetching_rapids_cmake.cmake") + list(APPEND extra_configure_flags "-DCMAKE_PROJECT_INCLUDE_BEFORE=${PROJECT_SOURCE_DIR}/utils/emulate_fetching_rapids_cmake.cmake") + endif() + if(NOT RAPIDS_TEST_NO_DEV_ERRORS) + list(APPEND extra_configure_flags "-Werror=dev") endif() if(DEFINED CPM_SOURCE_CACHE AND NOT RAPIDS_TEST_NO_CPM_CACHE) list(APPEND extra_configure_flags "-DCPM_SOURCE_CACHE=${CPM_SOURCE_CACHE}")