Skip to content

ExternalProject: Move existing step scripts to separate subdirectory

Craig Scott requested to merge craig.scott/cmake:ep-refactor-scripts into master

Having these blocks of CMake code in separate files in a dedicated ExternalProject subdirectory will make them easier to find and work with. The separate files don't require the extra level of escaping that the inlined code did. This also means the scripts can be rendered with appropriate syntax highlighting in IDEs, etc.

A minor change was also included to ensure paths stored for the directories are expressed as CMake paths. This transforms backslashes to forward slashes, so when the paths are substituted into the script files, we don't have to worry about escaping backslashes.

Most of the changes in this MR were originally part of 4f3d1abb (ExternalProject: Refactor pre-configure steps to support no-target uses, 2021-02-05), but that change was reverted by !5898 (merged). The changes brought back here do not reintroduce any of the problems that motivated that revert.

Edited by Craig Scott

Merge request reports