Skip to content

Commit

Permalink
cpm test setup a global state for disabling 'Werror=dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
robertmaynard committed Nov 4, 2024
1 parent 25ebdc0 commit 5a8b40a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
28 changes: 16 additions & 12 deletions testing/cpm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,28 @@
#=============================================================================
add_cmake_config_test( rapids-cpm.cmake )

add_cmake_config_test( cpm_find-add-pkg-source NO_DEV_ERRORS)
add_cmake_config_test( cpm_find-and-find_package NO_DEV_ERRORS)
# Do to https://github.com/rapidsai/rapids-cmake/issues/680 we need
# to suppress dev warning as errors for all the rapids_cpm tests
set(RAPIDS_TEST_DISABLE_DEV_ERRORS ON)

add_cmake_config_test( cpm_find-add-pkg-source )
add_cmake_config_test( cpm_find-and-find_package )
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 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-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-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 NO_DEV_ERRORS)
add_cmake_config_test( cpm_find-restore-cpm-vars )
add_cmake_config_test( cpm_find-version-explicit-install.cmake )

add_cmake_build_test( cpm_generate_pins-format-patches NO_CPM_CACHE NO_DEV_ERRORS)
add_cmake_build_test( cpm_generate_pins-format-patches NO_CPM_CACHE )
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 NO_DEV_ERRORS)
add_cmake_build_test( cpm_generate_pins-override NO_CPM_CACHE )
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 )
Expand All @@ -50,7 +54,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 NO_DEV_ERRORS)
add_cmake_config_test( cpm_package_override-add-new-project.cmake )
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 )
Expand All @@ -74,9 +78,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 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-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-preserve-custom-install-loc )

add_cmake_config_test( cpm_cuco-simple.cmake )
Expand Down
2 changes: 1 addition & 1 deletion testing/utils/cmake_test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function(add_cmake_test mode source_or_dir)
if(NOT RAPIDS_TEST_NO_RAPIDS_CMAKE_HOOKS)
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)
if(NOT (RAPIDS_TEST_NO_DEV_ERRORS OR RAPIDS_TEST_DISABLE_DEV_ERRORS) )
list(APPEND extra_configure_flags "-Werror=dev")
endif()
if(DEFINED CPM_SOURCE_CACHE AND NOT RAPIDS_TEST_NO_CPM_CACHE)
Expand Down

0 comments on commit 5a8b40a

Please sign in to comment.