summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-02-05 12:00:59 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-02-05 12:01:05 (GMT)
commitacb33d0904121f10891cb3aa0622b11d4e527304 (patch)
tree4cf342d713d859cecef126274865129d905f2ec3 /Tests/RunCMake
parent2c2eb777f4def3c82b198f9a51533aebcd8e78bc (diff)
parent17e5516e608ba5c9c1f2dfad3d64f8f90874f108 (diff)
downloadCMake-acb33d0904121f10891cb3aa0622b11d4e527304.zip
CMake-acb33d0904121f10891cb3aa0622b11d4e527304.tar.gz
CMake-acb33d0904121f10891cb3aa0622b11d4e527304.tar.bz2
Merge topic 'fetchcontent-performance'
17e5516e60 FetchContent: Invoke steps directly and avoid a separate sub-build 4f3d1abbb4 ExternalProject: Refactor pre-configure steps to support no-target uses 23aab9ecce ExternalProject: Avoid scanning docs for keywords, use include_guard() Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Robert Maynard <robertjmaynard@gmail.com> Acked-by: Michael Hirsch, Ph.D. <michael@scivision.dev> Acked-by: Lars Melchior <lars.melchior@gmail.com> Merge-request: !5749
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/ExternalProject/IncludeScope-Add-result.txt1
-rw-r--r--Tests/RunCMake/ExternalProject/IncludeScope-Add-stderr.txt7
-rw-r--r--Tests/RunCMake/ExternalProject/IncludeScope-Add.cmake12
-rw-r--r--Tests/RunCMake/ExternalProject/IncludeScope-Add_Step-result.txt1
-rw-r--r--Tests/RunCMake/ExternalProject/IncludeScope-Add_Step-stderr.txt7
-rw-r--r--Tests/RunCMake/ExternalProject/IncludeScope-Add_Step.cmake13
-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/RunCMakeTest.cmake2
-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
-rw-r--r--Tests/RunCMake/FetchContent/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/FetchContent/SameGenerator.cmake17
15 files changed, 7 insertions, 68 deletions
diff --git a/Tests/RunCMake/ExternalProject/IncludeScope-Add-result.txt b/Tests/RunCMake/ExternalProject/IncludeScope-Add-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/ExternalProject/IncludeScope-Add-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/ExternalProject/IncludeScope-Add-stderr.txt b/Tests/RunCMake/ExternalProject/IncludeScope-Add-stderr.txt
deleted file mode 100644
index ff3e5c1..0000000
--- a/Tests/RunCMake/ExternalProject/IncludeScope-Add-stderr.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-^CMake Error at .*/Modules/ExternalProject.cmake:[0-9]+ \(message\):
- error: ExternalProject module must be explicitly included before using
- ExternalProject_Add function
-Call Stack \(most recent call first\):
- .*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_parse_arguments\)
- IncludeScope-Add.cmake:[0-9]+ \(ExternalProject_Add\)
- CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/ExternalProject/IncludeScope-Add.cmake b/Tests/RunCMake/ExternalProject/IncludeScope-Add.cmake
deleted file mode 100644
index 1061ffd..0000000
--- a/Tests/RunCMake/ExternalProject/IncludeScope-Add.cmake
+++ /dev/null
@@ -1,12 +0,0 @@
-function(IncludeScope_IncludeOnly)
- include(ExternalProject)
-endfunction()
-
-IncludeScope_IncludeOnly()
-
-ExternalProject_Add(MyProj
- SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
- CONFIGURE_COMMAND ""
- BUILD_COMMAND ""
- INSTALL_COMMAND ""
-)
diff --git a/Tests/RunCMake/ExternalProject/IncludeScope-Add_Step-result.txt b/Tests/RunCMake/ExternalProject/IncludeScope-Add_Step-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/ExternalProject/IncludeScope-Add_Step-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/ExternalProject/IncludeScope-Add_Step-stderr.txt b/Tests/RunCMake/ExternalProject/IncludeScope-Add_Step-stderr.txt
deleted file mode 100644
index cbad4be..0000000
--- a/Tests/RunCMake/ExternalProject/IncludeScope-Add_Step-stderr.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-^CMake Error at .*/Modules/ExternalProject.cmake:[0-9]+ \(message\):
- error: ExternalProject module must be explicitly included before using
- ExternalProject_Add_Step function
-Call Stack \(most recent call first\):
- .*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_parse_arguments\)
- IncludeScope-Add_Step.cmake:[0-9]+ \(ExternalProject_Add_Step\)
- CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/ExternalProject/IncludeScope-Add_Step.cmake b/Tests/RunCMake/ExternalProject/IncludeScope-Add_Step.cmake
deleted file mode 100644
index 2a820f8..0000000
--- a/Tests/RunCMake/ExternalProject/IncludeScope-Add_Step.cmake
+++ /dev/null
@@ -1,13 +0,0 @@
-function(IncludeScope_DefineProj)
- include(ExternalProject)
- ExternalProject_Add(MyProj
- SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
- CONFIGURE_COMMAND ""
- BUILD_COMMAND ""
- INSTALL_COMMAND ""
- )
-endfunction()
-
-IncludeScope_DefineProj()
-
-ExternalProject_Add_Step(MyProj extraStep COMMENT "Foo")
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/RunCMakeTest.cmake b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
index 976655a..3205dd5 100644
--- a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
@@ -8,8 +8,6 @@ unset(ENV{https_proxy})
run_cmake(BadIndependentStep1)
run_cmake(BadIndependentStep2)
-run_cmake(IncludeScope-Add)
-run_cmake(IncludeScope-Add_Step)
run_cmake(NoOptions)
run_cmake(SourceEmpty)
run_cmake(SourceMissing)
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})
diff --git a/Tests/RunCMake/FetchContent/RunCMakeTest.cmake b/Tests/RunCMake/FetchContent/RunCMakeTest.cmake
index 9baeab7..b497382 100644
--- a/Tests/RunCMake/FetchContent/RunCMakeTest.cmake
+++ b/Tests/RunCMake/FetchContent/RunCMakeTest.cmake
@@ -7,7 +7,6 @@ run_cmake(DirectIgnoresDetails)
run_cmake(FirstDetailsWin)
run_cmake(DownloadTwice)
run_cmake(DownloadFile)
-run_cmake(SameGenerator)
run_cmake(VarDefinitions)
run_cmake(GetProperties)
run_cmake(UsesTerminalOverride)
diff --git a/Tests/RunCMake/FetchContent/SameGenerator.cmake b/Tests/RunCMake/FetchContent/SameGenerator.cmake
deleted file mode 100644
index 58204ef..0000000
--- a/Tests/RunCMake/FetchContent/SameGenerator.cmake
+++ /dev/null
@@ -1,17 +0,0 @@
-include(FetchContent)
-
-FetchContent_Declare(
- t1
- DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E echo "Download command executed"
-)
-
-FetchContent_Populate(t1)
-
-file(STRINGS "${FETCHCONTENT_BASE_DIR}/t1-subbuild/CMakeCache.txt"
- matchLine REGEX "^CMAKE_GENERATOR:.*="
- LIMIT_COUNT 1
-)
-if(NOT matchLine MATCHES "${CMAKE_GENERATOR}")
- message(FATAL_ERROR "Generator line mismatch: ${matchLine}\n"
- " Expected type: ${CMAKE_GENERATOR}")
-endif()