• Brad King's avatar
    Refactor VTK version handling · ebf6777d
    Brad King authored
    Move VTK_(MAJOR|MINOR|BUILD)_VERSION out of "CMakeLists.txt" into
    dedicated file "CMake/vtkVersion.cmake".  Move the preprocessor macros
    from "vtkConfigure.h" to new configured header "vtkVersionMacros.h".
    This avoids rebuilding everything when the version number changes.
    Include the new header from the old location to provide the macros for
    compatibility unless VTK_LEGACY_REMOVE is ON.
    Define the BUILD version to be a date during development and the patch
    level for releases (or during preparation of one as we are currently).
    The CMake package version file (VTKConfigVersion.cmake) already does
    this so make the C++-presented version consistent with it.  Add a
    "CMake/vtkVersion.bash" script to help a nightly robot update the build
    version when it is a date.  This replaces KWSys DateStamp for VTK.
    Compile the wrapping parser with only the major and minor version number
    components instead of the full version number.  This avoids causing a
    full rebuild of all wrappers whenever the build version component
    changes.  The wrapper only needs the version to provide its --version
    option anyway.
    Teach the documentation generation scripts to extract the VTK version
    numbers from the new version file.  Drop the separate revision file
    infrastructure because everything is now in one version file.
    Also remove unused file CMake/VTKVersionMacros.cmake.
    Change-Id: If988b32c738e6161237f7e3edaff49e75cb15b25
vtkVersion.bash 356 Bytes