summaryrefslogtreecommitdiff
path: root/Tests/RunCMake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-03-03 14:22:37 +0000
committerKitware Robot <kwrobot@kitware.com>2023-03-03 09:22:45 -0500
commitcb1b95886b64ad21f0aa0f777f6703ec4a5ba613 (patch)
tree3dda29f908d68627bf29e5e5e064db769c84ad65 /Tests/RunCMake
parentcbaf334598608f22574fffe0189aec23dc34bc5b (diff)
parent771387523a02e0c1ef5f68d20e9efc210b19c868 (diff)
downloadcmake-cb1b95886b64ad21f0aa0f777f6703ec4a5ba613.tar.gz
Merge topic 'ExternalProject-revert-install' into release-3.26
771387523a ExternalProject: Restore driving install through build system Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Acked-by: Craig Scott <craig.scott@crascit.com> Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !8279
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/ExternalProject/InstallBuilds-build-stdout.txt2
-rw-r--r--Tests/RunCMake/ExternalProject/InstallBuilds.cmake7
-rw-r--r--Tests/RunCMake/ExternalProject/InstallBuilds/CMakeLists.txt4
-rw-r--r--Tests/RunCMake/ExternalProject/RunCMakeTest.cmake1
4 files changed, 14 insertions, 0 deletions
diff --git a/Tests/RunCMake/ExternalProject/InstallBuilds-build-stdout.txt b/Tests/RunCMake/ExternalProject/InstallBuilds-build-stdout.txt
new file mode 100644
index 0000000000..9618ee3cc6
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/InstallBuilds-build-stdout.txt
@@ -0,0 +1,2 @@
+.*build command suppressed
+.*always builds
diff --git a/Tests/RunCMake/ExternalProject/InstallBuilds.cmake b/Tests/RunCMake/ExternalProject/InstallBuilds.cmake
new file mode 100644
index 0000000000..405a61afff
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/InstallBuilds.cmake
@@ -0,0 +1,7 @@
+include(ExternalProject)
+
+ExternalProject_Add(InstallBuilds
+ SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/InstallBuilds
+ DOWNLOAD_COMMAND ""
+ BUILD_COMMAND "${CMAKE_COMMAND}" -E echo "build command suppressed"
+ )
diff --git a/Tests/RunCMake/ExternalProject/InstallBuilds/CMakeLists.txt b/Tests/RunCMake/ExternalProject/InstallBuilds/CMakeLists.txt
new file mode 100644
index 0000000000..2158cdd914
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/InstallBuilds/CMakeLists.txt
@@ -0,0 +1,4 @@
+cmake_minimum_required(VERSION 3.24)
+project(InstallBuilds NONE)
+add_custom_target(always ALL COMMAND ${CMAKE_COMMAND} -E echo "always builds")
+install(CODE "")
diff --git a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
index f152f5b2b4..4afdef86e2 100644
--- a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
@@ -147,6 +147,7 @@ endfunction()
__ep_test_with_build(MultiCommand)
set(RunCMake_TEST_OUTPUT_MERGE 1)
+__ep_test_with_build(InstallBuilds)
__ep_test_with_build(PreserveEmptyArgs)
set(RunCMake_TEST_OUTPUT_MERGE 0)