Commit 1c7d9a87 authored by Brad King's avatar Brad King
Browse files

Reject application requests for missing modules

When an application writes

  find_package(VTK ... vtkMissingModule)

vtk_module_config (invoked from VTKConfig.cmake) should reject the
missing module if it is not enabled.  The current vtk_module_load check
incorrectly accepts modules that have been previously enabled in a build
tree but are no longer available.  Test against VTK_MODULES_ENABLED.

Change-Id: If0769b6192bf9c5878b7ef1e581d04df18b6bbef
parent f087f3a6
...@@ -67,6 +67,18 @@ endmacro() ...@@ -67,6 +67,18 @@ endmacro()
# <namespace>_LIBRARY_DIRS = Library search path (for outside dependencies) # <namespace>_LIBRARY_DIRS = Library search path (for outside dependencies)
# Do not name a module as the namespace. # Do not name a module as the namespace.
macro(vtk_module_config ns) macro(vtk_module_config ns)
set(_${ns}_MISSING ${ARGN})
set(msg "")
foreach(mod ${_${ns}_MISSING})
set(msg "${msg}\n ${mod}")
message(FATAL_ERROR "Requested modules not available:${msg}")
set(${ns}_DEFINITIONS "") set(${ns}_DEFINITIONS "")
set(${ns}_LIBRARIES "") set(${ns}_LIBRARIES "")
set(${ns}_INCLUDE_DIRS "") set(${ns}_INCLUDE_DIRS "")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment