summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/ExternalProject
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2021-02-04 20:32:58 (GMT)
committerCraig Scott <craig.scott@crascit.com>2021-02-04 20:33:38 (GMT)
commit4f3d1abbb4dca3d1e6b019471fa5d8be296492e3 (patch)
treef3614845c0e2c7c904cb0be116462f8d80f1af47 /Tests/RunCMake/ExternalProject
parent23aab9ecce264b7ea198fc9d36f382a4bb4fbe28 (diff)
downloadCMake-4f3d1abbb4dca3d1e6b019471fa5d8be296492e3.zip
CMake-4f3d1abbb4dca3d1e6b019471fa5d8be296492e3.tar.gz
CMake-4f3d1abbb4dca3d1e6b019471fa5d8be296492e3.tar.bz2
ExternalProject: Refactor pre-configure steps to support no-target uses
The mkdir, download, update and patch steps are used by FetchContent during the configure phase of the main build. Because these steps need a target, this has so far required a sub-build to be set up. The changes here factor out the preparation of the scripts from the creation of the targets, allowing future work to leverage these steps without a sub-build (see #21703). As part of the refactoring, some rationalisation of the stamp files, repository info files and script names was done to make things more consistent between download methods and step implementations. Every download method now records its own specific repository info in a file and that file is a dependency of the download step. The source directory is also written to that file, so if the SOURCE_DIR changes, the download will be retriggered (the existing implementation fails in this scenario). Each download method now also has just one driver script that implements the whole step (it may pull in other scripts to do its task though). The patch step gained support for USES_TERMINAL as a result of generalising the implementation for custom commands. Fixes: #21748
Diffstat (limited to 'Tests/RunCMake/ExternalProject')
-rw-r--r--Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW-stderr.txt2
-rw-r--r--Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-WARN-stderr.txt4
-rw-r--r--Tests/RunCMake/ExternalProject/NoOptions-stderr.txt2
-rw-r--r--Tests/RunCMake/ExternalProject/SourceEmpty-stderr.txt2
-rw-r--r--Tests/RunCMake/ExternalProject/SourceMissing-stderr.txt2
-rw-r--r--Tests/RunCMake/ExternalProject/UsesTerminal-check.cmake2
6 files changed, 7 insertions, 7 deletions
diff --git a/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW-stderr.txt b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW-stderr.txt
index 5a5ba89..22d7ac0 100644
--- a/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW-stderr.txt
+++ b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-NEW-stderr.txt
@@ -10,7 +10,7 @@ Call Stack \(most recent call first\):
[^
]*/Modules/ExternalProject.cmake:[0-9]+ \(ExternalProject_Add_Step\)
[^
-]*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_mkdir_command\)
+]*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_preconfigure_command\)
NO_DEPENDS-CMP0114-Common.cmake:[0-9]+ \(ExternalProject_Add\)
NO_DEPENDS-CMP0114-NEW.cmake:[0-9]+ \(include\)
CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-WARN-stderr.txt b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-WARN-stderr.txt
index bbf7178..0172e3f 100644
--- a/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-WARN-stderr.txt
+++ b/Tests/RunCMake/ExternalProject/NO_DEPENDS-CMP0114-WARN-stderr.txt
@@ -13,7 +13,7 @@ Call Stack \(most recent call first\):
[^
]*/Modules/ExternalProject.cmake:[0-9]+ \(ExternalProject_Add_Step\)
[^
-]*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_mkdir_command\)
+]*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_preconfigure_command\)
NO_DEPENDS-CMP0114-Common.cmake:[0-9]+ \(ExternalProject_Add\)
NO_DEPENDS-CMP0114-WARN.cmake:[0-9]+ \(include\)
CMakeLists.txt:[0-9]+ \(include\)
@@ -68,7 +68,7 @@ Call Stack \(most recent call first\):
[^
]*/Modules/ExternalProject.cmake:[0-9]+ \(ExternalProject_Add_Step\)
[^
-]*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_mkdir_command\)
+]*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_preconfigure_command\)
NO_DEPENDS-CMP0114-Common.cmake:[0-9]+ \(ExternalProject_Add\)
NO_DEPENDS-CMP0114-WARN.cmake:[0-9]+ \(include\)
CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/ExternalProject/NoOptions-stderr.txt b/Tests/RunCMake/ExternalProject/NoOptions-stderr.txt
index 2fc7d29..9576ae1 100644
--- a/Tests/RunCMake/ExternalProject/NoOptions-stderr.txt
+++ b/Tests/RunCMake/ExternalProject/NoOptions-stderr.txt
@@ -13,6 +13,6 @@
\* HG_REPOSITORY
\* CVS_REPOSITORY and CVS_MODULE
Call Stack \(most recent call first\):
- .*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_download_command\)
+ .*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_prepare_download\)
NoOptions.cmake:[0-9]+ \(ExternalProject_Add\)
CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/ExternalProject/SourceEmpty-stderr.txt b/Tests/RunCMake/ExternalProject/SourceEmpty-stderr.txt
index 07c6e87..648f28b 100644
--- a/Tests/RunCMake/ExternalProject/SourceEmpty-stderr.txt
+++ b/Tests/RunCMake/ExternalProject/SourceEmpty-stderr.txt
@@ -13,6 +13,6 @@
\* HG_REPOSITORY
\* CVS_REPOSITORY and CVS_MODULE
Call Stack \(most recent call first\):
- .*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_download_command\)
+ .*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_prepare_download\)
SourceEmpty.cmake:[0-9]+ \(ExternalProject_Add\)
CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/ExternalProject/SourceMissing-stderr.txt b/Tests/RunCMake/ExternalProject/SourceMissing-stderr.txt
index 373f6e3..e061cf6 100644
--- a/Tests/RunCMake/ExternalProject/SourceMissing-stderr.txt
+++ b/Tests/RunCMake/ExternalProject/SourceMissing-stderr.txt
@@ -13,6 +13,6 @@
\* HG_REPOSITORY
\* CVS_REPOSITORY and CVS_MODULE
Call Stack \(most recent call first\):
- .*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_download_command\)
+ .*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_prepare_download\)
SourceMissing.cmake:[0-9]+ \(ExternalProject_Add\)
CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/ExternalProject/UsesTerminal-check.cmake b/Tests/RunCMake/ExternalProject/UsesTerminal-check.cmake
index 201d822..2850bed 100644
--- a/Tests/RunCMake/ExternalProject/UsesTerminal-check.cmake
+++ b/Tests/RunCMake/ExternalProject/UsesTerminal-check.cmake
@@ -19,7 +19,7 @@ cmake_minimum_required(VERSION 3.3)
# console pool.
macro(CheckNinjaStep _target _step _require)
if("${_build}" MATCHES
-" DESC = Performing ${_step} step for '${_target}'
+" DESC = Performing ${_step} step (\\([a-zA-Z0-9 ]*\\) )?for '${_target}'
pool = console"
)
if(NOT ${_require})