Skip to content
Snippets Groups Projects
Commit a8b96839 authored by Marcus D. Hanwell's avatar Marcus D. Hanwell
Browse files

Only enable backends for interface modules being built

Make the backend mechanism more flexible by only enabling backends
when the interface module being built has been enabled. This now
enables empty builds where no modules are enabled, and will only
enable modules claiming to implement vtkRenderingCore if that is
the only module being built. This prevents a backend from enabling
a whole series of modules, such as vtkRenderingVolume,
vtkRenderingContext2D, etc, when the only requested module was
vtkRenderingCore.

Change-Id: I96a5abca3e1a71a796479d2ab6ec8207441b27c9
parent 534e0085
No related branches found
No related tags found
No related merge requests found
......@@ -26,9 +26,7 @@ foreach(backend ${VTK_BACKENDS})
if(${backend} STREQUAL "${VTK_RENDERING_BACKEND}")
message(STATUS "Enabling modules for ${backend}.")
foreach(module ${VTK_BACKEND_${backend}_MODULES})
list(APPEND ${module}_REQUEST_BY VTK_BACKEND_${backend})
list(APPEND ${${module}_IMPLEMENTS}_IMPLEMENTATIONS ${module})
endforeach()
else()
message(STATUS "Disabling modules for ${backend}.")
endif()
endforeach()
......@@ -112,6 +112,9 @@ macro(vtk_module_enable vtk-module _needed_by)
foreach(dep IN LISTS ${vtk-module}_DEPENDS)
vtk_module_enable(${dep} ${vtk-module})
endforeach()
foreach(imp IN LISTS ${vtk-module}_IMPLEMENTATIONS)
vtk_module_enable(${imp} ${vtk-module})
endforeach()
# If VTK_BUILD_ALL_MODULES_FOR_TESTS is true, then and then
# alone do we include the test modules in building build the dependency
......
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