Skip to content
Snippets Groups Projects
Commit 56c06d45 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

cmake: allow testing when forbidding downloads

The testing data might be available locally through the data tarballs
made with releases.

This mostly reverts !5079 but still makes noise in the situation since
it can be easy to forget it.

Fixes: #18692
parent bf393124
No related branches found
No related tags found
No related merge requests found
......@@ -267,10 +267,10 @@ mark_as_advanced(VTK_TARGET_SPECIFIC_COMPONENTS)
set(_vtk_module_group_default_StandAlone "WANT")
set(_vtk_module_group_default_Rendering "WANT")
set(vtk_enable_tests "${VTK_BUILD_TESTING}")
if (VTK_FORBID_DOWNLOADS)
message(STATUS "Module testing disabled due to `VTK_FORBID_DOWNLOADS` being set.")
set(vtk_enable_tests "OFF")
if (VTK_FORBID_DOWNLOADS AND VTK_BUILD_TESTING)
message(STATUS
"Module testing will fail due to `VTK_FORBID_DOWNLOADS` without a local "
"copy of the testing data.")
endif ()
include(vtkModule)
......@@ -336,7 +336,7 @@ vtk_module_scan(
REQUIRES_MODULES vtk_required_modules
UNRECOGNIZED_MODULES vtk_unrecognized_modules
WANT_BY_DEFAULT "${VTK_BUILD_ALL_MODULES}"
ENABLE_TESTS "${vtk_enable_tests}")
ENABLE_TESTS "${VTK_BUILD_TESTING}")
if (vtk_required_modules OR vtk_unrecognized_modules)
message(FATAL_ERROR
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment