summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-06-28 13:19:22 (GMT)
committerBrad King <brad.king@kitware.com>2023-06-29 13:49:51 (GMT)
commit9ede4cab2ba8a405749c09922a7fe54c70ecc190 (patch)
tree283d7965429baf61d5360189c6a7512aa6ed9501 /Tests
parentf9fe9099ab1b02239f5904c8c4ca477f63de1f2c (diff)
downloadCMake-9ede4cab2ba8a405749c09922a7fe54c70ecc190.zip
CMake-9ede4cab2ba8a405749c09922a7fe54c70ecc190.tar.gz
CMake-9ede4cab2ba8a405749c09922a7fe54c70ecc190.tar.bz2
FetchContent: Protect ExternalProject keywords from unknown arguments
`ExternalProject_Add` treats all keyword arguments as multi-valued. FetchContent re-orders some keyword arguments w.r.t. unparsed arguments. Add an internal keyword argument to separate the keyword values from following unparsed arguments. This was exposed by commit 550f63447d (ExternalProject/FetchContent: Support relative remote URLs, 2023-04-21, v3.27.0-rc1~156^2) by adding `GIT_REPOSITORY` to the set of re-ordered keyword arguments. This caused its value to absorb following unparsed arguments. Fixes: #25029
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/DependencyProviders/FetchContentSerial-stdout.txt2
-rw-r--r--Tests/RunCMake/DependencyProviders/PassThroughProvider-stdout.txt2
-rw-r--r--Tests/RunCMake/DependencyProviders/Recurse-stdout.txt2
-rw-r--r--Tests/RunCMake/DependencyProviders/RedirectFetchContentSerial-stdout.txt2
4 files changed, 4 insertions, 4 deletions
diff --git a/Tests/RunCMake/DependencyProviders/FetchContentSerial-stdout.txt b/Tests/RunCMake/DependencyProviders/FetchContentSerial-stdout.txt
index fa4a794..5cda903 100644
--- a/Tests/RunCMake/DependencyProviders/FetchContentSerial-stdout.txt
+++ b/Tests/RunCMake/DependencyProviders/FetchContentSerial-stdout.txt
@@ -2,6 +2,6 @@
-- After cmake_language
-- AThing_FOUND = 0
-- Intercepted FetchContent_MakeAvailable\(SomeDep\)
--- Provider invoked for method FETCHCONTENT_MAKEAVAILABLE_SERIAL with args: SOURCE_DIR;.*/Tests/RunCMake/DependencyProviders;BINARY_DIR;.*/Tests/RunCMake/DependencyProviders/FetchContentSerial-build/_deps/somedep-build;SOURCE_SUBDIR;DoesNotExist
+-- Provider invoked for method FETCHCONTENT_MAKEAVAILABLE_SERIAL with args: SOURCE_DIR;.*/Tests/RunCMake/DependencyProviders;BINARY_DIR;.*/Tests/RunCMake/DependencyProviders/FetchContentSerial-build/_deps/somedep-build;EXTERNALPROJECT_INTERNAL_ARGUMENT_SEPARATOR;SOURCE_SUBDIR;DoesNotExist
-- FetchContent_MakeAvailable\(\) succeeded
-- Configuring done
diff --git a/Tests/RunCMake/DependencyProviders/PassThroughProvider-stdout.txt b/Tests/RunCMake/DependencyProviders/PassThroughProvider-stdout.txt
index 0c9303a..5e412c4 100644
--- a/Tests/RunCMake/DependencyProviders/PassThroughProvider-stdout.txt
+++ b/Tests/RunCMake/DependencyProviders/PassThroughProvider-stdout.txt
@@ -4,4 +4,4 @@
-- Provider invoked for method FIND_PACKAGE with args: AThing;QUIET
-- AThing_FOUND = 0
-- Null provider called
--- Provider invoked for method FETCHCONTENT_MAKEAVAILABLE_SERIAL with args: SomeDep;SOURCE_DIR;.*/Tests/RunCMake/DependencyProviders;BINARY_DIR;.*/Tests/RunCMake/DependencyProviders/PassThroughProvider-build/_deps/somedep-build;SOURCE_SUBDIR;DoesNotExist
+-- Provider invoked for method FETCHCONTENT_MAKEAVAILABLE_SERIAL with args: SomeDep;SOURCE_DIR;.*/Tests/RunCMake/DependencyProviders;BINARY_DIR;.*/Tests/RunCMake/DependencyProviders/PassThroughProvider-build/_deps/somedep-build;EXTERNALPROJECT_INTERNAL_ARGUMENT_SEPARATOR;SOURCE_SUBDIR;DoesNotExist
diff --git a/Tests/RunCMake/DependencyProviders/Recurse-stdout.txt b/Tests/RunCMake/DependencyProviders/Recurse-stdout.txt
index 2c2035a..25824cb 100644
--- a/Tests/RunCMake/DependencyProviders/Recurse-stdout.txt
+++ b/Tests/RunCMake/DependencyProviders/Recurse-stdout.txt
@@ -1,7 +1,7 @@
-- Before cmake_language
-- After cmake_language
-- Intercepted FetchContent_MakeAvailable\(SomeDep\)
--- Provider invoked for method FETCHCONTENT_MAKEAVAILABLE_SERIAL with args: SOURCE_DIR;.*/Tests/RunCMake/DependencyProviders/Recurse-build/_deps/somedep-src;BINARY_DIR;.*/Tests/RunCMake/DependencyProviders/Recurse-build/_deps/somedep-build;DOWNLOAD_COMMAND;.*/cmake(\.exe)?;-E;echo;Download command called
+-- Provider invoked for method FETCHCONTENT_MAKEAVAILABLE_SERIAL with args: SOURCE_DIR;.*/Tests/RunCMake/DependencyProviders/Recurse-build/_deps/somedep-src;BINARY_DIR;.*/Tests/RunCMake/DependencyProviders/Recurse-build/_deps/somedep-build;EXTERNALPROJECT_INTERNAL_ARGUMENT_SEPARATOR;DOWNLOAD_COMMAND;.*/cmake(\.exe)?;-E;echo;Download command called
.*Download command called
.*-- Should now be handled
-- Configuring done
diff --git a/Tests/RunCMake/DependencyProviders/RedirectFetchContentSerial-stdout.txt b/Tests/RunCMake/DependencyProviders/RedirectFetchContentSerial-stdout.txt
index a293324..06f94e5 100644
--- a/Tests/RunCMake/DependencyProviders/RedirectFetchContentSerial-stdout.txt
+++ b/Tests/RunCMake/DependencyProviders/RedirectFetchContentSerial-stdout.txt
@@ -2,4 +2,4 @@
-- After cmake_language
-- AThing_FOUND = 0
-- Redirecting FetchContent_MakeAvailable\(SomeDep\) to find_package\(\)
--- Provider invoked for method FETCHCONTENT_MAKEAVAILABLE_SERIAL with args: SOURCE_DIR;.*/Tests/RunCMake/DependencyProviders;BINARY_DIR;.*/Tests/RunCMake/DependencyProviders/RedirectFetchContentSerial-build/_deps/somedep-build;SOURCE_SUBDIR;DoesNotExist
+-- Provider invoked for method FETCHCONTENT_MAKEAVAILABLE_SERIAL with args: SOURCE_DIR;.*/Tests/RunCMake/DependencyProviders;BINARY_DIR;.*/Tests/RunCMake/DependencyProviders/RedirectFetchContentSerial-build/_deps/somedep-build;EXTERNALPROJECT_INTERNAL_ARGUMENT_SEPARATOR;SOURCE_SUBDIR;DoesNotExist