[vtk-developers] Renaming ExternalData.cmake into VTKExternalData.cmake

Brad King brad.king at kitware.com
Fri Dec 12 09:32:35 EST 2014


On 12/11/2014 04:53 PM, Jean-Christophe Fillion-Robin wrote:
> Similarly to what was done in ITK [1], would it be possible to
> rename the ExternalData module provided by VTK into "VTKExternalData.cmake" ?

The ITKExternalData.cmake file holds project-specific configuration
information but ITK still has its own ExternalData.cmake file as well.
A module called vtkExternalData already exists for the same purpose.

ITK and VTK have their own ExternalData module because it backports fixes
from versions of the module in CMake versions larger than what the
projects specify in cmake_minimum_required(VERSION).  Also they originally
had their own copies prior to introduction of the module into CMake.

> Doing so would ensure the module provided by CMake is always used.

Yes, renaming the ExternalData modules in VTK and ITK would prevent
conflicts when applications try to use the one from CMake.  Currently
vtkExternalData.cmake starts with:

> get_filename_component(_VTKExternalData_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
> include(${_VTKExternalData_DIR}/ExternalData.cmake)

No other code mentions the name "ExternalData" directly.  One simply
needs to rename the module file and update this include line.

-Brad K



More information about the vtk-developers mailing list