summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-03-03 16:46:21 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-03-03 16:46:28 (GMT)
commit77804f63580fc47bc155aeff07f9b6753c083e11 (patch)
treee449c3ead90ea763740f4080be7549e94201119e /Tests/RunCMake
parent9c48040ffbe41a56338ff9948666ce63023ab258 (diff)
parentd2e9478321813fc7633b9fddd6fd4190dbd705ec (diff)
downloadCMake-77804f63580fc47bc155aeff07f9b6753c083e11.zip
CMake-77804f63580fc47bc155aeff07f9b6753c083e11.tar.gz
CMake-77804f63580fc47bc155aeff07f9b6753c083e11.tar.bz2
Merge topic 'cmake-dir-args' into release-3.23
d2e9478321 Tests: Add RunCMake.CommandLine ExplicitiDirs explicit work directory 78e8f11456 cmake: Correct regression in `-B <dir> <src_dir>` 4091d5c58c Tests: Verify RunCMake.CommandLine ExplicitDirs source/build dirs 1b97f8f35c Tests: Clarify RunCMake.CommandLine ExplicitDirs case names Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7030
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-B-S-extra-path-stderr.txt (renamed from Tests/RunCMake/CommandLine/S-B-extra-path-stderr.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-B-S-extra-path-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-B-S-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-B-arg-reverse-order-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-B-arg-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg-result.txt (renamed from Tests/RunCMake/CommandLine/S-no-arg3-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg-stderr.txt (renamed from Tests/RunCMake/CommandLine/B-no-arg2-stderr.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg2-result.txt (renamed from Tests/RunCMake/CommandLine/S-no-arg2-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg2-stderr.txt (renamed from Tests/RunCMake/CommandLine/B-no-arg-stderr.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg3-result.txt (renamed from Tests/RunCMake/CommandLine/S-no-arg-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg3-stderr.txt (renamed from Tests/RunCMake/CommandLine/B-no-arg3-stderr.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-C_buildsrcdir-stderr.txt (renamed from Tests/RunCMake/CommandLine/C_buildsrcdir-stderr.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-C_buildsrcdir-stdout.txt (renamed from Tests/RunCMake/CommandLine/C_buildsrcdir-stdout.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-C_buildsrcdir.cmake (renamed from Tests/RunCMake/CommandLine/C_buildsrcdir.cmake)0
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-B-extra-path-stderr.txt (renamed from Tests/RunCMake/CommandLine/B-S-extra-path-stderr.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-B-extra-path-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path-stderr.txt (renamed from Tests/RunCMake/CommandLine/S-B-non-path2-stderr.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path2-stderr.txt (renamed from Tests/RunCMake/CommandLine/S-B-non-path-stderr.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path2-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-B-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Sdiffers-stderr.txt (renamed from Tests/RunCMake/CommandLine/S-S-Simplicit-stderr.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Sdiffers-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Simplicit-stderr.txt (renamed from Tests/RunCMake/CommandLine/S-S-Sdiffers-stderr.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Simplicit-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-S-differs-stderr.txt (renamed from Tests/RunCMake/CommandLine/S-implicit-differs3-stderr.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-S-differs-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-S-same-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-build-dir-empty-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-build-dir-not-created-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-reverse-build-dir-not-created-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-reverse-order-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs-stderr.txt (renamed from Tests/RunCMake/CommandLine/S-implicit-differs-stderr.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs2-stderr.txt (renamed from Tests/RunCMake/CommandLine/S-implicit-differs2-stderr.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs2-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs3-stderr.txt (renamed from Tests/RunCMake/CommandLine/S-S-differs-stderr.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs3-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-same-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg-result.txt (renamed from Tests/RunCMake/CommandLine/B-no-arg3-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg-stderr.txt (renamed from Tests/RunCMake/CommandLine/S-no-arg2-stderr.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg2-result.txt (renamed from Tests/RunCMake/CommandLine/B-no-arg2-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg2-stderr.txt (renamed from Tests/RunCMake/CommandLine/S-no-arg-stderr.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg3-result.txt (renamed from Tests/RunCMake/CommandLine/B-no-arg-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg3-stderr.txt (renamed from Tests/RunCMake/CommandLine/S-no-arg3-stderr.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs-no-S-B-stderr.txt (renamed from Tests/RunCMake/CommandLine/no-S-B-stderr.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/ExplicitDirs/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake69
49 files changed, 84 insertions, 30 deletions
diff --git a/Tests/RunCMake/CommandLine/S-B-extra-path-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-B-S-extra-path-stderr.txt
index e168a1b..e168a1b 100644
--- a/Tests/RunCMake/CommandLine/S-B-extra-path-stderr.txt
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-B-S-extra-path-stderr.txt
diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-B-S-extra-path-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-B-S-extra-path-stdout.txt
new file mode 100644
index 0000000..618dcd8
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-B-S-extra-path-stdout.txt
@@ -0,0 +1,2 @@
+-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs'
+-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build'
diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-B-S-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-B-S-stdout.txt
new file mode 100644
index 0000000..618dcd8
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-B-S-stdout.txt
@@ -0,0 +1,2 @@
+-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs'
+-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build'
diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-B-arg-reverse-order-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-B-arg-reverse-order-stdout.txt
new file mode 100644
index 0000000..618dcd8
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-B-arg-reverse-order-stdout.txt
@@ -0,0 +1,2 @@
+-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs'
+-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build'
diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-B-arg-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-B-arg-stdout.txt
new file mode 100644
index 0000000..618dcd8
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-B-arg-stdout.txt
@@ -0,0 +1,2 @@
+-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs'
+-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build'
diff --git a/Tests/RunCMake/CommandLine/S-no-arg3-result.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/CommandLine/S-no-arg3-result.txt
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg-result.txt
diff --git a/Tests/RunCMake/CommandLine/B-no-arg2-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg-stderr.txt
index 2309c5e..2309c5e 100644
--- a/Tests/RunCMake/CommandLine/B-no-arg2-stderr.txt
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg-stderr.txt
diff --git a/Tests/RunCMake/CommandLine/S-no-arg2-result.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg2-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/CommandLine/S-no-arg2-result.txt
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg2-result.txt
diff --git a/Tests/RunCMake/CommandLine/B-no-arg-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg2-stderr.txt
index 2309c5e..2309c5e 100644
--- a/Tests/RunCMake/CommandLine/B-no-arg-stderr.txt
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg2-stderr.txt
diff --git a/Tests/RunCMake/CommandLine/S-no-arg-result.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg3-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/CommandLine/S-no-arg-result.txt
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg3-result.txt
diff --git a/Tests/RunCMake/CommandLine/B-no-arg3-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg3-stderr.txt
index cf63fdd..cf63fdd 100644
--- a/Tests/RunCMake/CommandLine/B-no-arg3-stderr.txt
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg3-stderr.txt
diff --git a/Tests/RunCMake/CommandLine/C_buildsrcdir-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-C_buildsrcdir-stderr.txt
index 4720a6f..4720a6f 100644
--- a/Tests/RunCMake/CommandLine/C_buildsrcdir-stderr.txt
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-C_buildsrcdir-stderr.txt
diff --git a/Tests/RunCMake/CommandLine/C_buildsrcdir-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-C_buildsrcdir-stdout.txt
index 862cfeb..862cfeb 100644
--- a/Tests/RunCMake/CommandLine/C_buildsrcdir-stdout.txt
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-C_buildsrcdir-stdout.txt
diff --git a/Tests/RunCMake/CommandLine/C_buildsrcdir.cmake b/Tests/RunCMake/CommandLine/ExplicitDirs-C_buildsrcdir.cmake
index e69de29..e69de29 100644
--- a/Tests/RunCMake/CommandLine/C_buildsrcdir.cmake
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-C_buildsrcdir.cmake
diff --git a/Tests/RunCMake/CommandLine/B-S-extra-path-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-extra-path-stderr.txt
index e168a1b..e168a1b 100644
--- a/Tests/RunCMake/CommandLine/B-S-extra-path-stderr.txt
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-extra-path-stderr.txt
diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-extra-path-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-extra-path-stdout.txt
new file mode 100644
index 0000000..618dcd8
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-extra-path-stdout.txt
@@ -0,0 +1,2 @@
+-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs'
+-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build'
diff --git a/Tests/RunCMake/CommandLine/S-B-non-path2-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path-stderr.txt
index 6fa4341..6fa4341 100644
--- a/Tests/RunCMake/CommandLine/S-B-non-path2-stderr.txt
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path-stderr.txt
diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path-stdout.txt
new file mode 100644
index 0000000..618dcd8
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path-stdout.txt
@@ -0,0 +1,2 @@
+-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs'
+-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build'
diff --git a/Tests/RunCMake/CommandLine/S-B-non-path-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path2-stderr.txt
index 6fa4341..6fa4341 100644
--- a/Tests/RunCMake/CommandLine/S-B-non-path-stderr.txt
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path2-stderr.txt
diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path2-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path2-stdout.txt
new file mode 100644
index 0000000..618dcd8
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path2-stdout.txt
@@ -0,0 +1,2 @@
+-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs'
+-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build'
diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-stdout.txt
new file mode 100644
index 0000000..618dcd8
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-stdout.txt
@@ -0,0 +1,2 @@
+-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs'
+-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build'
diff --git a/Tests/RunCMake/CommandLine/S-S-Simplicit-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Sdiffers-stderr.txt
index 43869db..43869db 100644
--- a/Tests/RunCMake/CommandLine/S-S-Simplicit-stderr.txt
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Sdiffers-stderr.txt
diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Sdiffers-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Sdiffers-stdout.txt
new file mode 100644
index 0000000..618dcd8
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Sdiffers-stdout.txt
@@ -0,0 +1,2 @@
+-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs'
+-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build'
diff --git a/Tests/RunCMake/CommandLine/S-S-Sdiffers-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Simplicit-stderr.txt
index 43869db..43869db 100644
--- a/Tests/RunCMake/CommandLine/S-S-Sdiffers-stderr.txt
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Simplicit-stderr.txt
diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Simplicit-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Simplicit-stdout.txt
new file mode 100644
index 0000000..618dcd8
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Simplicit-stdout.txt
@@ -0,0 +1,2 @@
+-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs'
+-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build'
diff --git a/Tests/RunCMake/CommandLine/S-implicit-differs3-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-differs-stderr.txt
index 5714130..5714130 100644
--- a/Tests/RunCMake/CommandLine/S-implicit-differs3-stderr.txt
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-differs-stderr.txt
diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-differs-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-differs-stdout.txt
new file mode 100644
index 0000000..618dcd8
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-differs-stdout.txt
@@ -0,0 +1,2 @@
+-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs'
+-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build'
diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-same-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-same-stdout.txt
new file mode 100644
index 0000000..618dcd8
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-same-stdout.txt
@@ -0,0 +1,2 @@
+-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs'
+-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build'
diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-build-dir-empty-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-build-dir-empty-stdout.txt
new file mode 100644
index 0000000..a9be616
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-build-dir-empty-stdout.txt
@@ -0,0 +1,2 @@
+-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirsMissing'
+-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirsMissing/build'
diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-build-dir-not-created-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-build-dir-not-created-stdout.txt
new file mode 100644
index 0000000..a9be616
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-build-dir-not-created-stdout.txt
@@ -0,0 +1,2 @@
+-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirsMissing'
+-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirsMissing/build'
diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-reverse-build-dir-not-created-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-reverse-build-dir-not-created-stdout.txt
new file mode 100644
index 0000000..a9be616
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-reverse-build-dir-not-created-stdout.txt
@@ -0,0 +1,2 @@
+-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirsMissing'
+-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirsMissing/build'
diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-reverse-order-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-reverse-order-stdout.txt
new file mode 100644
index 0000000..618dcd8
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-reverse-order-stdout.txt
@@ -0,0 +1,2 @@
+-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs'
+-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build'
diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-stdout.txt
new file mode 100644
index 0000000..618dcd8
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-stdout.txt
@@ -0,0 +1,2 @@
+-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs'
+-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build'
diff --git a/Tests/RunCMake/CommandLine/S-implicit-differs-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs-stderr.txt
index 18f0d16..18f0d16 100644
--- a/Tests/RunCMake/CommandLine/S-implicit-differs-stderr.txt
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs-stderr.txt
diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs-stdout.txt
new file mode 100644
index 0000000..618dcd8
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs-stdout.txt
@@ -0,0 +1,2 @@
+-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs'
+-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build'
diff --git a/Tests/RunCMake/CommandLine/S-implicit-differs2-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs2-stderr.txt
index 5714130..5714130 100644
--- a/Tests/RunCMake/CommandLine/S-implicit-differs2-stderr.txt
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs2-stderr.txt
diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs2-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs2-stdout.txt
new file mode 100644
index 0000000..618dcd8
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs2-stdout.txt
@@ -0,0 +1,2 @@
+-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs'
+-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build'
diff --git a/Tests/RunCMake/CommandLine/S-S-differs-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs3-stderr.txt
index 5714130..5714130 100644
--- a/Tests/RunCMake/CommandLine/S-S-differs-stderr.txt
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs3-stderr.txt
diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs3-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs3-stdout.txt
new file mode 100644
index 0000000..618dcd8
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs3-stdout.txt
@@ -0,0 +1,2 @@
+-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs'
+-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build'
diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-same-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-same-stdout.txt
new file mode 100644
index 0000000..618dcd8
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-same-stdout.txt
@@ -0,0 +1,2 @@
+-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs'
+-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build'
diff --git a/Tests/RunCMake/CommandLine/B-no-arg3-result.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/CommandLine/B-no-arg3-result.txt
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg-result.txt
diff --git a/Tests/RunCMake/CommandLine/S-no-arg2-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg-stderr.txt
index d1a2ce3..d1a2ce3 100644
--- a/Tests/RunCMake/CommandLine/S-no-arg2-stderr.txt
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg-stderr.txt
diff --git a/Tests/RunCMake/CommandLine/B-no-arg2-result.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg2-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/CommandLine/B-no-arg2-result.txt
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg2-result.txt
diff --git a/Tests/RunCMake/CommandLine/S-no-arg-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg2-stderr.txt
index d1a2ce3..d1a2ce3 100644
--- a/Tests/RunCMake/CommandLine/S-no-arg-stderr.txt
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg2-stderr.txt
diff --git a/Tests/RunCMake/CommandLine/B-no-arg-result.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg3-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/CommandLine/B-no-arg-result.txt
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg3-result.txt
diff --git a/Tests/RunCMake/CommandLine/S-no-arg3-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg3-stderr.txt
index d4fe65e..d4fe65e 100644
--- a/Tests/RunCMake/CommandLine/S-no-arg3-stderr.txt
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg3-stderr.txt
diff --git a/Tests/RunCMake/CommandLine/no-S-B-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-no-S-B-stderr.txt
index c166dcf..c166dcf 100644
--- a/Tests/RunCMake/CommandLine/no-S-B-stderr.txt
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs-no-S-B-stderr.txt
diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs/CMakeLists.txt b/Tests/RunCMake/CommandLine/ExplicitDirs/CMakeLists.txt
index 0fee56c..e381da6 100644
--- a/Tests/RunCMake/CommandLine/ExplicitDirs/CMakeLists.txt
+++ b/Tests/RunCMake/CommandLine/ExplicitDirs/CMakeLists.txt
@@ -1,6 +1,9 @@
cmake_minimum_required(VERSION 3.14)
project(ExplicitDirs NONE)
+message(STATUS "CMAKE_SOURCE_DIR='${CMAKE_SOURCE_DIR}'")
+message(STATUS "CMAKE_BINARY_DIR='${CMAKE_BINARY_DIR}'")
+
add_custom_command(
OUTPUT output1.txt
COMMAND ${CMAKE_COMMAND} -E echo CustomCommand > output1.txt
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index 17adefd..081ee3f 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -132,7 +132,7 @@ project(ExplicitDirsMissing LANGUAGES NONE)
]=])
set(RunCMake_TEST_SOURCE_DIR "${source_dir}")
set(RunCMake_TEST_BINARY_DIR "${source_dir}")
- run_cmake_with_options(no-S-B -DFOO=BAR)
+ run_cmake_with_options(ExplicitDirs-no-S-B -DFOO=BAR)
file(WRITE ${source_dir}/CMakeLists.txt [=[
cmake_minimum_required(VERSION 3.13)
@@ -140,66 +140,75 @@ project(ExplicitDirsMissing LANGUAGES NONE)
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
message(FATAL_ERROR "CWD used as binary dir")
endif()
+message(STATUS "CMAKE_SOURCE_DIR='${CMAKE_SOURCE_DIR}'")
+message(STATUS "CMAKE_BINARY_DIR='${CMAKE_BINARY_DIR}'")
]=])
file(REMOVE_RECURSE "${source_dir}/build")
# Test with a setup where binary_dir won't be created by `run_cmake_with_options`
- run_cmake_with_options(S-arg-build-dir-not-created -S ${source_dir} build/)
- run_cmake_with_options(S-arg-reverse-build-dir-not-created build/ -S${source_dir} )
+ run_cmake_with_options(ExplicitDirs-S-arg-build-dir-not-created -S ${source_dir} build/)
+ run_cmake_with_options(ExplicitDirs-S-arg-reverse-build-dir-not-created build/ -S${source_dir} )
file(REMOVE_RECURSE "${source_dir}/build")
file(MAKE_DIRECTORY "${source_dir}/build")
- run_cmake_with_options(S-arg-build-dir-empty -S ${source_dir} build/)
+ run_cmake_with_options(ExplicitDirs-S-arg-build-dir-empty -S ${source_dir} build/)
set(source_dir ${RunCMake_SOURCE_DIR}/ExplicitDirs)
set(binary_dir ${RunCMake_BINARY_DIR}/ExplicitDirs-build)
+ set(working_dir ${RunCMake_BINARY_DIR}/ExplicitDirs-cwd)
set(RunCMake_TEST_SOURCE_DIR "${source_dir}")
set(RunCMake_TEST_BINARY_DIR "${binary_dir}")
+ file(MAKE_DIRECTORY "${working_dir}")
+ set(RunCMake_TEST_COMMAND_WORKING_DIRECTORY "${working_dir}")
+
file(REMOVE_RECURSE "${binary_dir}")
- run_cmake_with_options(S-arg -S ${source_dir} ${binary_dir})
- run_cmake_with_options(S-arg-reverse-order ${binary_dir} -S${source_dir} )
- run_cmake_with_options(S-no-arg -S )
- run_cmake_with_options(S-no-arg2 -S -T)
- run_cmake_with_raw_args(S-no-arg3 [[-S ""]])
- run_cmake_with_options(S-B -S ${source_dir} -B ${binary_dir})
- run_cmake_with_options(S-B-extra-path -S ${source_dir} -B ${binary_dir} /extra/path/)
- run_cmake_with_raw_args(S-B-non-path "-S \"${source_dir}\" -B \"${binary_dir}\" \"\"")
- run_cmake_with_raw_args(S-B-non-path2 "-S \"${source_dir}\" \"\" -B \"${binary_dir}\"")
+ run_cmake_with_options(ExplicitDirs-S-arg -S ${source_dir} ${binary_dir})
+ run_cmake_with_options(ExplicitDirs-S-arg-reverse-order ${binary_dir} -S${source_dir} )
+ run_cmake_with_options(ExplicitDirs-S-no-arg -S )
+ run_cmake_with_options(ExplicitDirs-S-no-arg2 -S -T)
+ run_cmake_with_raw_args(ExplicitDirs-S-no-arg3 [[-S ""]])
+ run_cmake_with_options(ExplicitDirs-S-B -S ${source_dir} -B ${binary_dir})
+ run_cmake_with_options(ExplicitDirs-S-B-extra-path -S ${source_dir} -B ${binary_dir} /extra/path/)
+ run_cmake_with_raw_args(ExplicitDirs-S-B-non-path "-S \"${source_dir}\" -B \"${binary_dir}\" \"\"")
+ run_cmake_with_raw_args(ExplicitDirs-S-B-non-path2 "-S \"${source_dir}\" \"\" -B \"${binary_dir}\"")
file(REMOVE_RECURSE "${binary_dir}/other_dir")
file(MAKE_DIRECTORY "${binary_dir}/other_dir")
file(WRITE "${binary_dir}/other_dir/CMakeLists.txt" [=[ ]=])
- run_cmake_with_options(S-S-same -S ${source_dir} -S ${source_dir} -B ${binary_dir})
- run_cmake_with_options(S-S-differs -S ${binary_dir}/other_dir -S ${source_dir} -B ${binary_dir})
- run_cmake_with_options(S-implicit-same -S ${source_dir} ${source_dir} -B ${binary_dir})
- run_cmake_with_options(S-implicit-differs -S ${source_dir} ${binary_dir}/other_dir -B ${binary_dir})
- run_cmake_with_options(S-implicit-differs2 ${binary_dir}/other_dir -S ${source_dir} -B ${binary_dir})
- run_cmake_with_options(S-implicit-differs3 ${binary_dir}/other_dir ${source_dir} -B ${binary_dir})
- run_cmake_with_options(S-S-Sdiffers -S ${binary_dir}/other_dir1 -S ${binary_dir}/other_dir2 -S ${source_dir} -B ${binary_dir})
- run_cmake_with_options(S-S-Simplicit ${binary_dir}/other_dir1 ${binary_dir}/other_dir2 ${source_dir} -B ${binary_dir})
+ run_cmake_with_options(ExplicitDirs-S-S-same -S ${source_dir} -S ${source_dir} -B ${binary_dir})
+ run_cmake_with_options(ExplicitDirs-S-S-differs -S ${binary_dir}/other_dir -S ${source_dir} -B ${binary_dir})
+ run_cmake_with_options(ExplicitDirs-S-implicit-same -S ${source_dir} ${source_dir} -B ${binary_dir})
+ run_cmake_with_options(ExplicitDirs-S-implicit-differs -S ${source_dir} ${binary_dir}/other_dir -B ${binary_dir})
+ run_cmake_with_options(ExplicitDirs-S-implicit-differs2 ${binary_dir}/other_dir -S ${source_dir} -B ${binary_dir})
+ run_cmake_with_options(ExplicitDirs-S-implicit-differs3 ${binary_dir}/other_dir ${source_dir} -B ${binary_dir})
+ run_cmake_with_options(ExplicitDirs-S-S-Sdiffers -S ${binary_dir}/other_dir1 -S ${binary_dir}/other_dir2 -S ${source_dir} -B ${binary_dir})
+ run_cmake_with_options(ExplicitDirs-S-S-Simplicit ${binary_dir}/other_dir1 ${binary_dir}/other_dir2 ${source_dir} -B ${binary_dir})
# make sure that -B can explicitly construct build directories
file(REMOVE_RECURSE "${binary_dir}")
- run_cmake_with_options(B-arg -B ${binary_dir} ${source_dir})
+ run_cmake_with_options(ExplicitDirs-B-arg -B ${binary_dir} ${source_dir})
file(REMOVE_RECURSE "${binary_dir}")
- run_cmake_with_options(B-arg-reverse-order ${source_dir} -B${binary_dir})
- run_cmake_with_options(B-no-arg -B )
- run_cmake_with_options(B-no-arg2 -B -T)
- run_cmake_with_raw_args(B-no-arg3 [[-B ""]])
+ run_cmake_with_options(ExplicitDirs-B-arg-reverse-order ${source_dir} -B${binary_dir})
+ run_cmake_with_options(ExplicitDirs-B-no-arg -B )
+ run_cmake_with_options(ExplicitDirs-B-no-arg2 -B -T)
+ run_cmake_with_raw_args(ExplicitDirs-B-no-arg3 [[-B ""]])
file(REMOVE_RECURSE "${binary_dir}")
- run_cmake_with_options(B-S -B${binary_dir} -S${source_dir})
- run_cmake_with_options(B-S-extra-path -B${binary_dir} -S${source_dir} /extra/path/)
+ run_cmake_with_options(ExplicitDirs-B-S -B${binary_dir} -S${source_dir})
+ run_cmake_with_options(ExplicitDirs-B-S-extra-path -B${binary_dir} -S${source_dir} /extra/path/)
+
+ unset(RunCMake_TEST_COMMAND_WORKING_DIRECTORY)
message("copied to ${RunCMake_TEST_BINARY_DIR}/initial-cache.txt")
file(COPY ${RunCMake_SOURCE_DIR}/C_buildsrcdir/initial-cache.txt DESTINATION ${RunCMake_TEST_BINARY_DIR})
# CMAKE_BINARY_DIR should be determined by -B if specified, and CMAKE_SOURCE_DIR determined by -S if specified.
# Path to initial-cache.txt is relative to the $PWD, which is normally set to ${RunCMake_TEST_BINARY_DIR}.
- run_cmake_with_options(C_buildsrcdir -B DummyBuildDir -S ${RunCMake_SOURCE_DIR}/C_buildsrcdir/src -C initial-cache.txt)
+ run_cmake_with_options(ExplicitDirs-C_buildsrcdir -B DummyBuildDir -S ${RunCMake_SOURCE_DIR}/C_buildsrcdir/src -C initial-cache.txt)
# Test that full path works, too.
- run_cmake_with_options(C_buildsrcdir -B DummyBuildDir -S ${RunCMake_SOURCE_DIR}/C_buildsrcdir/src -C ${RunCMake_TEST_BINARY_DIR}/initial-cache.txt)
+ run_cmake_with_options(ExplicitDirs-C_buildsrcdir -B DummyBuildDir -S ${RunCMake_SOURCE_DIR}/C_buildsrcdir/src -C ${RunCMake_TEST_BINARY_DIR}/initial-cache.txt)
+ run_cmake_with_options(ExplicitDirs-C_buildsrcdir -B DummyBuildDir ${RunCMake_SOURCE_DIR}/C_buildsrcdir/src -C ${RunCMake_TEST_BINARY_DIR}/initial-cache.txt)
endfunction()
run_ExplicitDirs()