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

cmake: move VTK_FORBID_DOWNLOADS to its own module

parent 911230ce
No related merge requests found
# Forbid downloading resources from the network during a build. This helps
# when building on systems without network connectivity to determine which
# resources much be obtained manually and made available to the build.
option(VTK_FORBID_DOWNLOADS "Do not download source code or data from the network" OFF)
mark_as_advanced(VTK_FORBID_DOWNLOADS)
macro(vtk_download_attempt_check _name)
if(VTK_FORBID_DOWNLOADS)
message(SEND_ERROR "Attempted to download ${_name} when VTK_FORBID_DOWNLOADS is ON")
endif()
endmacro()
......@@ -14,6 +14,7 @@ include(vtkInitializeBuildType)
include(vtkVersion)
set(VTK_VERSION
"${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}")
include(vtkDownload)
# Objective-C++ compile flags.
# CMake has no equivalent of CMAKE_CXX_FLAGS for Objective-C++ (bug #4756)
......@@ -29,18 +30,6 @@ endif()
include(vtkModuleMacros)
include(vtkExternalData)
#-----------------------------------------------------------------------------
# Forbid downloading resources from the network during a build. This helps
# when building on systems without network connectivity to determine which
# resources much be obtained manually and made available to the build.
option(VTK_FORBID_DOWNLOADS "Do not download source code or data from the network" OFF)
mark_as_advanced(VTK_FORBID_DOWNLOADS)
macro(vtk_download_attempt_check _name)
if(VTK_FORBID_DOWNLOADS)
message(SEND_ERROR "Attempted to download ${_name} when VTK_FORBID_DOWNLOADS is ON")
endif()
endmacro()
# Test input data staging directory.
file(RELATIVE_PATH vtk_reldir "${CMAKE_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
set(VTK_TEST_DATA_DIR "${ExternalData_BINARY_ROOT}/${vtk_reldir}/Testing")
......
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