Commit 129e5659 authored by Ben Boeckel's avatar Ben Boeckel

vtkCMakeBackports: add a module to support backporting CMake modules

parent 562b9999
# CMake backports
This directory contains backports from newer CMake versions to help support
actually using older CMake versions for building VTK. The directory name is the
minimum version of CMake for which the contained files are no longer necessary.
For example, the files under the `3.12` directory are not needed for 3.12 or
3.13, but are for 3.11.
The `99` directory contains files which are not in any CMake version yet and
once they are, they should be moved to an appropriately named directory.
file(GLOB cmake_version_backports
LIST_DIRECTORIES true
RELATIVE "${CMAKE_CURRENT_LIST_DIR}/patches"
"${CMAKE_CURRENT_LIST_DIR}/patches/*")
foreach (cmake_version_backport IN LISTS cmake_version_backports)
if (NOT IS_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/patches/${cmake_version_backport}")
continue ()
endif ()
if (CMAKE_VERSION VERSION_LESS "${cmake_version_backport}")
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_LIST_DIR}/patches/${cmake_version_backport}")
endif ()
endforeach ()
Markdown is supported
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