summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CommandLine
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/CommandLine')
-rw-r--r--Tests/RunCMake/CommandLine/Build-ninja-v-stdout.txt1
-rw-r--r--Tests/RunCMake/CommandLine/Build.cmake5
-rw-r--r--Tests/RunCMake/CommandLine/C-no-arg-result.txt (renamed from Tests/RunCMake/CommandLine/E_tar-end-opt1-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/C-no-arg-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/C-no-file-result.txt (renamed from Tests/RunCMake/CommandLine/E_tar-bad-opt1-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/C-no-file-stderr.txt3
-rw-r--r--Tests/RunCMake/CommandLine/D-no-arg-result.txt (renamed from Tests/RunCMake/CommandLine/E_tar-bad-mtime1-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/D-no-arg-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/DeprecateVS6-WARN-OFF.cmake0
-rw-r--r--Tests/RunCMake/CommandLine/DeprecateVS6-WARN-ON-stderr.txt5
-rw-r--r--Tests/RunCMake/CommandLine/DeprecateVS6-WARN-ON.cmake0
-rw-r--r--Tests/RunCMake/CommandLine/DeprecateVS70-WARN-OFF.cmake0
-rw-r--r--Tests/RunCMake/CommandLine/DeprecateVS70-WARN-ON-stderr.txt5
-rw-r--r--Tests/RunCMake/CommandLine/DeprecateVS70-WARN-ON.cmake0
-rw-r--r--Tests/RunCMake/CommandLine/E-no-arg-result.txt (renamed from Tests/RunCMake/CommandLine/E_tar-bad-from5-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/E-no-arg-stderr.txt3
-rw-r--r--Tests/RunCMake/CommandLine/E___run_iwyu-bad-iwyu-result.txt (renamed from Tests/RunCMake/CommandLine/E_tar-bad-from4-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/E___run_iwyu-bad-iwyu-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/E___run_iwyu-no----result.txt (renamed from Tests/RunCMake/CommandLine/E_tar-bad-from3-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/E___run_iwyu-no----stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E___run_iwyu-no-cc-result.txt (renamed from Tests/RunCMake/CommandLine/E_tar-bad-from2-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/E___run_iwyu-no-cc-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E___run_iwyu-no-iwyu-result.txt (renamed from Tests/RunCMake/CommandLine/E_tar-bad-from1-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/E___run_iwyu-no-iwyu-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_create_symlink-no-arg-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_create_symlink-no-arg-stderr.txt3
-rw-r--r--Tests/RunCMake/CommandLine/E_rename-no-arg-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_rename-no-arg-stderr.txt3
-rw-r--r--Tests/RunCMake/CommandLine/E_tar-bad-from1-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_tar-bad-from2-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_tar-bad-from3-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/E_tar-bad-from3.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_tar-bad-from4-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/E_tar-bad-from4.txt2
-rw-r--r--Tests/RunCMake/CommandLine/E_tar-bad-from5-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/E_tar-bad-from5.txt2
-rw-r--r--Tests/RunCMake/CommandLine/E_tar-bad-mtime1-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/E_tar-bad-opt1-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_tar-end-opt1-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/E_touch_nocreate-no-arg-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_touch_nocreate-no-arg-stderr.txt3
-rw-r--r--Tests/RunCMake/CommandLine/G_bad-arg-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/G_bad-arg-stderr.txt3
-rw-r--r--Tests/RunCMake/CommandLine/G_no-arg-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/G_no-arg-stderr.txt3
-rw-r--r--Tests/RunCMake/CommandLine/NoArgs-stdout.txt10
-rw-r--r--Tests/RunCMake/CommandLine/P_no-arg-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/P_no-arg-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/P_no-file-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/P_no-file-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake108
-rw-r--r--Tests/RunCMake/CommandLine/U-no-arg-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/U-no-arg-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/Wdev-stderr.txt5
-rw-r--r--Tests/RunCMake/CommandLine/Wdev.cmake1
-rw-r--r--Tests/RunCMake/CommandLine/Wno-dev.cmake1
-rw-r--r--Tests/RunCMake/CommandLine/cache-no-file-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/cache-no-file-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/cmake_depends-check.cmake13
-rw-r--r--Tests/RunCMake/CommandLine/cmake_depends-stdout.txt1
-rw-r--r--Tests/RunCMake/CommandLine/cmake_depends/test.c2
-rw-r--r--Tests/RunCMake/CommandLine/cmake_depends/test.h1
-rw-r--r--Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.hbin0 -> 58 bytes
-rw-r--r--Tests/RunCMake/CommandLine/debug-output-stdout.txt1
-rw-r--r--Tests/RunCMake/CommandLine/debug-output.cmake0
-rw-r--r--Tests/RunCMake/CommandLine/debug-trycompile.cmake5
-rw-r--r--Tests/RunCMake/CommandLine/lists-no-file-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/lists-no-file-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/trace-stderr.txt2
-rw-r--r--Tests/RunCMake/CommandLine/trace.cmake0
70 files changed, 204 insertions, 28 deletions
diff --git a/Tests/RunCMake/CommandLine/Build-ninja-v-stdout.txt b/Tests/RunCMake/CommandLine/Build-ninja-v-stdout.txt
new file mode 100644
index 0000000..83c62ec
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/Build-ninja-v-stdout.txt
@@ -0,0 +1 @@
+-E echo CustomCommand
diff --git a/Tests/RunCMake/CommandLine/Build.cmake b/Tests/RunCMake/CommandLine/Build.cmake
new file mode 100644
index 0000000..20df108
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/Build.cmake
@@ -0,0 +1,5 @@
+add_custom_command(
+ OUTPUT output.txt
+ COMMAND ${CMAKE_COMMAND} -E echo CustomCommand > output.txt
+ )
+add_custom_target(CustomTarget ALL DEPENDS output.txt)
diff --git a/Tests/RunCMake/CommandLine/E_tar-end-opt1-result.txt b/Tests/RunCMake/CommandLine/C-no-arg-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/CommandLine/E_tar-end-opt1-result.txt
+++ b/Tests/RunCMake/CommandLine/C-no-arg-result.txt
diff --git a/Tests/RunCMake/CommandLine/C-no-arg-stderr.txt b/Tests/RunCMake/CommandLine/C-no-arg-stderr.txt
new file mode 100644
index 0000000..0570d8f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/C-no-arg-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: -C must be followed by a file name.
+CMake Error: Problem processing arguments. Aborting.$
diff --git a/Tests/RunCMake/CommandLine/E_tar-bad-opt1-result.txt b/Tests/RunCMake/CommandLine/C-no-file-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/CommandLine/E_tar-bad-opt1-result.txt
+++ b/Tests/RunCMake/CommandLine/C-no-file-result.txt
diff --git a/Tests/RunCMake/CommandLine/C-no-file-stderr.txt b/Tests/RunCMake/CommandLine/C-no-file-stderr.txt
new file mode 100644
index 0000000..5315f59
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/C-no-file-stderr.txt
@@ -0,0 +1,3 @@
+^CMake Error: Error processing file: nosuchcachefile.txt
+CMake Error: The source directory ".*/Tests/RunCMake/CommandLine/C-no-file-build/nosuchcachefile.txt" does not exist.
+Specify --help for usage, or press the help button on the CMake GUI.$
diff --git a/Tests/RunCMake/CommandLine/E_tar-bad-mtime1-result.txt b/Tests/RunCMake/CommandLine/D-no-arg-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/CommandLine/E_tar-bad-mtime1-result.txt
+++ b/Tests/RunCMake/CommandLine/D-no-arg-result.txt
diff --git a/Tests/RunCMake/CommandLine/D-no-arg-stderr.txt b/Tests/RunCMake/CommandLine/D-no-arg-stderr.txt
new file mode 100644
index 0000000..5e43bca
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/D-no-arg-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: -D must be followed with VAR=VALUE.
+CMake Error: Problem processing arguments. Aborting.$
diff --git a/Tests/RunCMake/CommandLine/DeprecateVS6-WARN-OFF.cmake b/Tests/RunCMake/CommandLine/DeprecateVS6-WARN-OFF.cmake
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/DeprecateVS6-WARN-OFF.cmake
diff --git a/Tests/RunCMake/CommandLine/DeprecateVS6-WARN-ON-stderr.txt b/Tests/RunCMake/CommandLine/DeprecateVS6-WARN-ON-stderr.txt
new file mode 100644
index 0000000..1b6a510
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/DeprecateVS6-WARN-ON-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Warning:
+ The "Visual Studio 6" generator is deprecated and will be removed in a
+ future version of CMake.
+
+ Add CMAKE_WARN_VS6=OFF to the cache to disable this warning.$
diff --git a/Tests/RunCMake/CommandLine/DeprecateVS6-WARN-ON.cmake b/Tests/RunCMake/CommandLine/DeprecateVS6-WARN-ON.cmake
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/DeprecateVS6-WARN-ON.cmake
diff --git a/Tests/RunCMake/CommandLine/DeprecateVS70-WARN-OFF.cmake b/Tests/RunCMake/CommandLine/DeprecateVS70-WARN-OFF.cmake
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/DeprecateVS70-WARN-OFF.cmake
diff --git a/Tests/RunCMake/CommandLine/DeprecateVS70-WARN-ON-stderr.txt b/Tests/RunCMake/CommandLine/DeprecateVS70-WARN-ON-stderr.txt
new file mode 100644
index 0000000..ea31ef3
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/DeprecateVS70-WARN-ON-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Warning:
+ The "Visual Studio 7" generator is deprecated and will be removed in a
+ future version of CMake.
+
+ Add CMAKE_WARN_VS70=OFF to the cache to disable this warning.$
diff --git a/Tests/RunCMake/CommandLine/DeprecateVS70-WARN-ON.cmake b/Tests/RunCMake/CommandLine/DeprecateVS70-WARN-ON.cmake
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/DeprecateVS70-WARN-ON.cmake
diff --git a/Tests/RunCMake/CommandLine/E_tar-bad-from5-result.txt b/Tests/RunCMake/CommandLine/E-no-arg-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/CommandLine/E_tar-bad-from5-result.txt
+++ b/Tests/RunCMake/CommandLine/E-no-arg-result.txt
diff --git a/Tests/RunCMake/CommandLine/E-no-arg-stderr.txt b/Tests/RunCMake/CommandLine/E-no-arg-stderr.txt
new file mode 100644
index 0000000..056ce05
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E-no-arg-stderr.txt
@@ -0,0 +1,3 @@
+^CMake Error: cmake version .*
+Usage: .* -E \[command\] \[arguments ...\]
+Available commands:
diff --git a/Tests/RunCMake/CommandLine/E_tar-bad-from4-result.txt b/Tests/RunCMake/CommandLine/E___run_iwyu-bad-iwyu-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/CommandLine/E_tar-bad-from4-result.txt
+++ b/Tests/RunCMake/CommandLine/E___run_iwyu-bad-iwyu-result.txt
diff --git a/Tests/RunCMake/CommandLine/E___run_iwyu-bad-iwyu-stderr.txt b/Tests/RunCMake/CommandLine/E___run_iwyu-bad-iwyu-stderr.txt
new file mode 100644
index 0000000..338f7c4
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E___run_iwyu-bad-iwyu-stderr.txt
@@ -0,0 +1,2 @@
+^Error running 'iwyu-does-not-exist': [^
+]+$
diff --git a/Tests/RunCMake/CommandLine/E_tar-bad-from3-result.txt b/Tests/RunCMake/CommandLine/E___run_iwyu-no----result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/CommandLine/E_tar-bad-from3-result.txt
+++ b/Tests/RunCMake/CommandLine/E___run_iwyu-no----result.txt
diff --git a/Tests/RunCMake/CommandLine/E___run_iwyu-no----stderr.txt b/Tests/RunCMake/CommandLine/E___run_iwyu-no----stderr.txt
new file mode 100644
index 0000000..c251adf
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E___run_iwyu-no----stderr.txt
@@ -0,0 +1 @@
+^__run_iwyu given unknown argument: command-does-not-exist$
diff --git a/Tests/RunCMake/CommandLine/E_tar-bad-from2-result.txt b/Tests/RunCMake/CommandLine/E___run_iwyu-no-cc-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/CommandLine/E_tar-bad-from2-result.txt
+++ b/Tests/RunCMake/CommandLine/E___run_iwyu-no-cc-result.txt
diff --git a/Tests/RunCMake/CommandLine/E___run_iwyu-no-cc-stderr.txt b/Tests/RunCMake/CommandLine/E___run_iwyu-no-cc-stderr.txt
new file mode 100644
index 0000000..1998abb
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E___run_iwyu-no-cc-stderr.txt
@@ -0,0 +1 @@
+^__run_iwyu missing compile command after --$
diff --git a/Tests/RunCMake/CommandLine/E_tar-bad-from1-result.txt b/Tests/RunCMake/CommandLine/E___run_iwyu-no-iwyu-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/CommandLine/E_tar-bad-from1-result.txt
+++ b/Tests/RunCMake/CommandLine/E___run_iwyu-no-iwyu-result.txt
diff --git a/Tests/RunCMake/CommandLine/E___run_iwyu-no-iwyu-stderr.txt b/Tests/RunCMake/CommandLine/E___run_iwyu-no-iwyu-stderr.txt
new file mode 100644
index 0000000..0024097
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E___run_iwyu-no-iwyu-stderr.txt
@@ -0,0 +1 @@
+^__run_iwyu missing --iwyu=$
diff --git a/Tests/RunCMake/CommandLine/E_create_symlink-no-arg-result.txt b/Tests/RunCMake/CommandLine/E_create_symlink-no-arg-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_create_symlink-no-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/E_create_symlink-no-arg-stderr.txt b/Tests/RunCMake/CommandLine/E_create_symlink-no-arg-stderr.txt
new file mode 100644
index 0000000..056ce05
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_create_symlink-no-arg-stderr.txt
@@ -0,0 +1,3 @@
+^CMake Error: cmake version .*
+Usage: .* -E \[command\] \[arguments ...\]
+Available commands:
diff --git a/Tests/RunCMake/CommandLine/E_rename-no-arg-result.txt b/Tests/RunCMake/CommandLine/E_rename-no-arg-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_rename-no-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/E_rename-no-arg-stderr.txt b/Tests/RunCMake/CommandLine/E_rename-no-arg-stderr.txt
new file mode 100644
index 0000000..056ce05
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_rename-no-arg-stderr.txt
@@ -0,0 +1,3 @@
+^CMake Error: cmake version .*
+Usage: .* -E \[command\] \[arguments ...\]
+Available commands:
diff --git a/Tests/RunCMake/CommandLine/E_tar-bad-from1-stderr.txt b/Tests/RunCMake/CommandLine/E_tar-bad-from1-stderr.txt
deleted file mode 100644
index d67431d..0000000
--- a/Tests/RunCMake/CommandLine/E_tar-bad-from1-stderr.txt
+++ /dev/null
@@ -1 +0,0 @@
-^CMake Error: -E tar --files-from= file 'bad' not found$
diff --git a/Tests/RunCMake/CommandLine/E_tar-bad-from2-stderr.txt b/Tests/RunCMake/CommandLine/E_tar-bad-from2-stderr.txt
deleted file mode 100644
index d1d278c..0000000
--- a/Tests/RunCMake/CommandLine/E_tar-bad-from2-stderr.txt
+++ /dev/null
@@ -1 +0,0 @@
-^CMake Error: -E tar --files-from= file '\.' is a directory$
diff --git a/Tests/RunCMake/CommandLine/E_tar-bad-from3-stderr.txt b/Tests/RunCMake/CommandLine/E_tar-bad-from3-stderr.txt
deleted file mode 100644
index 147bd80..0000000
--- a/Tests/RunCMake/CommandLine/E_tar-bad-from3-stderr.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-^CMake Error: -E tar --files-from='.*/Tests/RunCMake/CommandLine/E_tar-bad-from3.txt' file invalid line:
--add-file=option-typo$
diff --git a/Tests/RunCMake/CommandLine/E_tar-bad-from3.txt b/Tests/RunCMake/CommandLine/E_tar-bad-from3.txt
deleted file mode 100644
index 5bad1c3..0000000
--- a/Tests/RunCMake/CommandLine/E_tar-bad-from3.txt
+++ /dev/null
@@ -1 +0,0 @@
--add-file=option-typo
diff --git a/Tests/RunCMake/CommandLine/E_tar-bad-from4-stderr.txt b/Tests/RunCMake/CommandLine/E_tar-bad-from4-stderr.txt
deleted file mode 100644
index 1417d4d..0000000
--- a/Tests/RunCMake/CommandLine/E_tar-bad-from4-stderr.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-^CMake Error: archive_read_disk_entry_from_file 'does-not-exist':.*
-CMake Error: Problem creating tar: bad.tar$
diff --git a/Tests/RunCMake/CommandLine/E_tar-bad-from4.txt b/Tests/RunCMake/CommandLine/E_tar-bad-from4.txt
deleted file mode 100644
index 4b97f79..0000000
--- a/Tests/RunCMake/CommandLine/E_tar-bad-from4.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-
-does-not-exist
diff --git a/Tests/RunCMake/CommandLine/E_tar-bad-from5-stderr.txt b/Tests/RunCMake/CommandLine/E_tar-bad-from5-stderr.txt
deleted file mode 100644
index 1417d4d..0000000
--- a/Tests/RunCMake/CommandLine/E_tar-bad-from5-stderr.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-^CMake Error: archive_read_disk_entry_from_file 'does-not-exist':.*
-CMake Error: Problem creating tar: bad.tar$
diff --git a/Tests/RunCMake/CommandLine/E_tar-bad-from5.txt b/Tests/RunCMake/CommandLine/E_tar-bad-from5.txt
deleted file mode 100644
index 9ea755b..0000000
--- a/Tests/RunCMake/CommandLine/E_tar-bad-from5.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-
---add-file=does-not-exist
diff --git a/Tests/RunCMake/CommandLine/E_tar-bad-mtime1-stderr.txt b/Tests/RunCMake/CommandLine/E_tar-bad-mtime1-stderr.txt
deleted file mode 100644
index ca925f1..0000000
--- a/Tests/RunCMake/CommandLine/E_tar-bad-mtime1-stderr.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-^CMake Error: unable to parse mtime 'bad'
-CMake Error: Problem creating tar: bad.tar$
diff --git a/Tests/RunCMake/CommandLine/E_tar-bad-opt1-stderr.txt b/Tests/RunCMake/CommandLine/E_tar-bad-opt1-stderr.txt
deleted file mode 100644
index 35133c8..0000000
--- a/Tests/RunCMake/CommandLine/E_tar-bad-opt1-stderr.txt
+++ /dev/null
@@ -1 +0,0 @@
-^CMake Error: Unknown option to -E tar: --bad$
diff --git a/Tests/RunCMake/CommandLine/E_tar-end-opt1-stderr.txt b/Tests/RunCMake/CommandLine/E_tar-end-opt1-stderr.txt
deleted file mode 100644
index 1fddf6d..0000000
--- a/Tests/RunCMake/CommandLine/E_tar-end-opt1-stderr.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-^CMake Error: archive_read_disk_entry_from_file '--bad':.*
-CMake Error: Problem creating tar: bad.tar$
diff --git a/Tests/RunCMake/CommandLine/E_touch_nocreate-no-arg-result.txt b/Tests/RunCMake/CommandLine/E_touch_nocreate-no-arg-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_touch_nocreate-no-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/E_touch_nocreate-no-arg-stderr.txt b/Tests/RunCMake/CommandLine/E_touch_nocreate-no-arg-stderr.txt
new file mode 100644
index 0000000..056ce05
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_touch_nocreate-no-arg-stderr.txt
@@ -0,0 +1,3 @@
+^CMake Error: cmake version .*
+Usage: .* -E \[command\] \[arguments ...\]
+Available commands:
diff --git a/Tests/RunCMake/CommandLine/G_bad-arg-result.txt b/Tests/RunCMake/CommandLine/G_bad-arg-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/G_bad-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/G_bad-arg-stderr.txt b/Tests/RunCMake/CommandLine/G_bad-arg-stderr.txt
new file mode 100644
index 0000000..07f2b52
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/G_bad-arg-stderr.txt
@@ -0,0 +1,3 @@
+^CMake Error: Could not create named generator NoSuchGenerator
+
+Generators
diff --git a/Tests/RunCMake/CommandLine/G_no-arg-result.txt b/Tests/RunCMake/CommandLine/G_no-arg-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/G_no-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/G_no-arg-stderr.txt b/Tests/RunCMake/CommandLine/G_no-arg-stderr.txt
new file mode 100644
index 0000000..2f491a2
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/G_no-arg-stderr.txt
@@ -0,0 +1,3 @@
+^CMake Error: No generator specified for -G
+
+Generators
diff --git a/Tests/RunCMake/CommandLine/NoArgs-stdout.txt b/Tests/RunCMake/CommandLine/NoArgs-stdout.txt
new file mode 100644
index 0000000..1cd3469
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/NoArgs-stdout.txt
@@ -0,0 +1,10 @@
+^Usage
+
+ cmake \[options\] <path-to-source>
+ cmake \[options\] <path-to-existing-build>
+
+Specify a source directory to \(re-\)generate a build system for it in the
+current working directory. Specify an existing build directory to
+re-generate its build system.
+
+Run 'cmake --help' for more information.$
diff --git a/Tests/RunCMake/CommandLine/P_no-arg-result.txt b/Tests/RunCMake/CommandLine/P_no-arg-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/P_no-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/P_no-arg-stderr.txt b/Tests/RunCMake/CommandLine/P_no-arg-stderr.txt
new file mode 100644
index 0000000..8af3a53
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/P_no-arg-stderr.txt
@@ -0,0 +1 @@
+^CMake Error: No script specified for argument -P$
diff --git a/Tests/RunCMake/CommandLine/P_no-file-result.txt b/Tests/RunCMake/CommandLine/P_no-file-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/P_no-file-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/P_no-file-stderr.txt b/Tests/RunCMake/CommandLine/P_no-file-stderr.txt
new file mode 100644
index 0000000..2e12399
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/P_no-file-stderr.txt
@@ -0,0 +1 @@
+^CMake Error: Error processing file: nosuchscriptfile.cmake$
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index 2be6651..69beed9 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -1,15 +1,26 @@
include(RunCMake)
-run_cmake_command(E_tar-bad-opt1 ${CMAKE_COMMAND} -E tar cvf bad.tar --bad)
-run_cmake_command(E_tar-bad-mtime1 ${CMAKE_COMMAND} -E tar cvf bad.tar --mtime=bad .)
-run_cmake_command(E_tar-bad-from1 ${CMAKE_COMMAND} -E tar cvf bad.tar --files-from=bad)
-run_cmake_command(E_tar-bad-from2 ${CMAKE_COMMAND} -E tar cvf bad.tar --files-from=.)
-run_cmake_command(E_tar-bad-from3 ${CMAKE_COMMAND} -E tar cvf bad.tar --files-from=${CMAKE_CURRENT_LIST_DIR}/E_tar-bad-from3.txt)
-run_cmake_command(E_tar-bad-from4 ${CMAKE_COMMAND} -E tar cvf bad.tar --files-from=${CMAKE_CURRENT_LIST_DIR}/E_tar-bad-from4.txt)
-run_cmake_command(E_tar-bad-from5 ${CMAKE_COMMAND} -E tar cvf bad.tar --files-from=${CMAKE_CURRENT_LIST_DIR}/E_tar-bad-from5.txt)
-run_cmake_command(E_tar-end-opt1 ${CMAKE_COMMAND} -E tar cvf bad.tar -- --bad)
-run_cmake_command(E_tar-end-opt2 ${CMAKE_COMMAND} -E tar cvf bad.tar --)
-run_cmake_command(E_tar-mtime ${CMAKE_COMMAND} -E tar cvf bad.tar "--mtime=1970-01-01 00:00:00 UTC")
+run_cmake_command(NoArgs ${CMAKE_COMMAND})
+run_cmake_command(C-no-arg ${CMAKE_COMMAND} -C)
+run_cmake_command(C-no-file ${CMAKE_COMMAND} -C nosuchcachefile.txt)
+run_cmake_command(cache-no-file ${CMAKE_COMMAND} nosuchsubdir/CMakeCache.txt)
+run_cmake_command(lists-no-file ${CMAKE_COMMAND} nosuchsubdir/CMakeLists.txt)
+run_cmake_command(D-no-arg ${CMAKE_COMMAND} -D)
+run_cmake_command(U-no-arg ${CMAKE_COMMAND} -U)
+run_cmake_command(E-no-arg ${CMAKE_COMMAND} -E)
+run_cmake_command(E_echo_append ${CMAKE_COMMAND} -E echo_append)
+run_cmake_command(E_rename-no-arg ${CMAKE_COMMAND} -E rename)
+run_cmake_command(E_touch_nocreate-no-arg ${CMAKE_COMMAND} -E touch_nocreate)
+
+run_cmake_command(E___run_iwyu-no-iwyu ${CMAKE_COMMAND} -E __run_iwyu -- command-does-not-exist)
+run_cmake_command(E___run_iwyu-bad-iwyu ${CMAKE_COMMAND} -E __run_iwyu --iwyu=iwyu-does-not-exist -- command-does-not-exist)
+run_cmake_command(E___run_iwyu-no--- ${CMAKE_COMMAND} -E __run_iwyu --iwyu=iwyu-does-not-exist command-does-not-exist)
+run_cmake_command(E___run_iwyu-no-cc ${CMAKE_COMMAND} -E __run_iwyu --iwyu=iwyu-does-not-exist --)
+
+run_cmake_command(G_no-arg ${CMAKE_COMMAND} -G)
+run_cmake_command(G_bad-arg ${CMAKE_COMMAND} -G NoSuchGenerator)
+run_cmake_command(P_no-arg ${CMAKE_COMMAND} -P)
+run_cmake_command(P_no-file ${CMAKE_COMMAND} -P nosuchscriptfile.cmake)
run_cmake_command(build-no-cache
${CMAKE_COMMAND} --build ${RunCMake_SOURCE_DIR})
@@ -18,7 +29,38 @@ run_cmake_command(build-no-generator
run_cmake_command(build-bad-generator
${CMAKE_COMMAND} --build ${RunCMake_SOURCE_DIR}/cache-bad-generator)
+if(RunCMake_GENERATOR STREQUAL "Ninja")
+ # Use a single build tree for a few tests without cleaning.
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Build-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+ set(RunCMake_TEST_OPTIONS -DCMAKE_VERBOSE_MAKEFILE=1)
+ run_cmake(Build)
+ unset(RunCMake_TEST_OPTIONS)
+ run_cmake_command(Build-ninja-v ${CMAKE_COMMAND} --build .)
+
+ unset(RunCMake_TEST_BINARY_DIR)
+ unset(RunCMake_TEST_NO_CLEAN)
+endif()
+
+if(RunCMake_GENERATOR STREQUAL "Visual Studio 6")
+ set(RunCMake_WARN_VS6 1)
+ run_cmake(DeprecateVS6-WARN-ON)
+ unset(RunCMake_WARN_VS6)
+ run_cmake(DeprecateVS6-WARN-OFF)
+elseif(RunCMake_GENERATOR STREQUAL "Visual Studio 7")
+ set(RunCMake_WARN_VS70 1)
+ run_cmake(DeprecateVS70-WARN-ON)
+ unset(RunCMake_WARN_VS70)
+ run_cmake(DeprecateVS70-WARN-OFF)
+endif()
+
if(UNIX)
+ run_cmake_command(E_create_symlink-no-arg
+ ${CMAKE_COMMAND} -E create_symlink
+ )
run_cmake_command(E_create_symlink-missing-dir
${CMAKE_COMMAND} -E create_symlink T missing-dir/L
)
@@ -64,3 +106,49 @@ run_cmake(D_nested_cache)
set(RunCMake_TEST_OPTIONS
"-DFOO:STRING=-DBAR:BOOL=BAZ")
run_cmake(D_typed_nested_cache)
+
+set(RunCMake_TEST_OPTIONS -Wno-dev)
+run_cmake(Wno-dev)
+unset(RunCMake_TEST_OPTIONS)
+
+set(RunCMake_TEST_OPTIONS -Wno-dev -Wdev)
+run_cmake(Wdev)
+unset(RunCMake_TEST_OPTIONS)
+
+set(RunCMake_TEST_OPTIONS --debug-output)
+run_cmake(debug-output)
+unset(RunCMake_TEST_OPTIONS)
+
+set(RunCMake_TEST_OPTIONS --trace)
+run_cmake(trace)
+unset(RunCMake_TEST_OPTIONS)
+
+set(RunCMake_TEST_OPTIONS --debug-trycompile)
+run_cmake(debug-trycompile)
+unset(RunCMake_TEST_OPTIONS)
+
+function(run_cmake_depends)
+ set(RunCMake_TEST_SOURCE_DIR "${RunCMake_SOURCE_DIR}/cmake_depends")
+ set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/cmake_depends-build")
+ set(RunCMake_TEST_NO_CLEAN 1)
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+ file(WRITE "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/DepTarget.dir/DependInfo.cmake" "
+set(CMAKE_DEPENDS_LANGUAGES \"C\")
+set(CMAKE_DEPENDS_CHECK_C
+ \"${RunCMake_TEST_SOURCE_DIR}/test.c\"
+ \"${RunCMake_TEST_BINARY_DIR}/CMakeFiles/DepTarget.dir/test.c.o\"
+ )
+")
+ file(WRITE "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/CMakeDirectoryInformation.cmake" "
+set(CMAKE_RELATIVE_PATH_TOP_SOURCE \"${RunCMake_TEST_SOURCE_DIR}\")
+set(CMAKE_RELATIVE_PATH_TOP_BINARY \"${RunCMake_TEST_BINARY_DIR}\")
+")
+ run_cmake_command(cmake_depends ${CMAKE_COMMAND} -E cmake_depends
+ "Unix Makefiles"
+ ${RunCMake_TEST_SOURCE_DIR} ${RunCMake_TEST_SOURCE_DIR}
+ ${RunCMake_TEST_BINARY_DIR} ${RunCMake_TEST_BINARY_DIR}
+ ${RunCMake_TEST_BINARY_DIR}/CMakeFiles/DepTarget.dir/DependInfo.cmake
+ )
+endfunction()
+run_cmake_depends()
diff --git a/Tests/RunCMake/CommandLine/U-no-arg-result.txt b/Tests/RunCMake/CommandLine/U-no-arg-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/U-no-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/U-no-arg-stderr.txt b/Tests/RunCMake/CommandLine/U-no-arg-stderr.txt
new file mode 100644
index 0000000..c34ef94
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/U-no-arg-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: -U must be followed with VAR.
+CMake Error: Problem processing arguments. Aborting.$
diff --git a/Tests/RunCMake/CommandLine/Wdev-stderr.txt b/Tests/RunCMake/CommandLine/Wdev-stderr.txt
new file mode 100644
index 0000000..f427303
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/Wdev-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Warning \(dev\) at Wdev.cmake:1 \(message\):
+ Some Author Warning
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.$
diff --git a/Tests/RunCMake/CommandLine/Wdev.cmake b/Tests/RunCMake/CommandLine/Wdev.cmake
new file mode 100644
index 0000000..0242086
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/Wdev.cmake
@@ -0,0 +1 @@
+message(AUTHOR_WARNING "Some Author Warning")
diff --git a/Tests/RunCMake/CommandLine/Wno-dev.cmake b/Tests/RunCMake/CommandLine/Wno-dev.cmake
new file mode 100644
index 0000000..0242086
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/Wno-dev.cmake
@@ -0,0 +1 @@
+message(AUTHOR_WARNING "Some Author Warning")
diff --git a/Tests/RunCMake/CommandLine/cache-no-file-result.txt b/Tests/RunCMake/CommandLine/cache-no-file-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/cache-no-file-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/cache-no-file-stderr.txt b/Tests/RunCMake/CommandLine/cache-no-file-stderr.txt
new file mode 100644
index 0000000..da3a0c3
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/cache-no-file-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: The source directory ".*/Tests/RunCMake/CommandLine/cache-no-file-build/nosuchsubdir" does not exist.
+Specify --help for usage, or press the help button on the CMake GUI.$
diff --git a/Tests/RunCMake/CommandLine/cmake_depends-check.cmake b/Tests/RunCMake/CommandLine/cmake_depends-check.cmake
new file mode 100644
index 0000000..031478b
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/cmake_depends-check.cmake
@@ -0,0 +1,13 @@
+set(depend_make "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/DepTarget.dir/depend.make")
+if(EXISTS "${depend_make}")
+ file(READ "${depend_make}" depend_make_content)
+ string(REGEX REPLACE "\n+$" "" depend_make_content "${depend_make_content}")
+ if(NOT depend_make_content MATCHES "
+CMakeFiles/DepTarget.dir/test.c.o: .*/Tests/RunCMake/CommandLine/cmake_depends/test.c
+CMakeFiles/DepTarget.dir/test.c.o: .*/Tests/RunCMake/CommandLine/cmake_depends/test.h$")
+ string(REPLACE "\n" "\n " depend_make_content " ${depend_make_content}")
+ set(RunCMake_TEST_FAILED "depend.make does not have expected content:\n${depend_make_content}")
+ endif()
+else()
+ set(RunCMake_TEST_FAILED "depend.make missing:\n ${depend_make}")
+endif()
diff --git a/Tests/RunCMake/CommandLine/cmake_depends-stdout.txt b/Tests/RunCMake/CommandLine/cmake_depends-stdout.txt
new file mode 100644
index 0000000..8fe092b
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/cmake_depends-stdout.txt
@@ -0,0 +1 @@
+^Scanning dependencies of target DepTarget$
diff --git a/Tests/RunCMake/CommandLine/cmake_depends/test.c b/Tests/RunCMake/CommandLine/cmake_depends/test.c
new file mode 100644
index 0000000..92c056f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/cmake_depends/test.c
@@ -0,0 +1,2 @@
+#include "test.h"
+#include "test_UTF-16LE.h"
diff --git a/Tests/RunCMake/CommandLine/cmake_depends/test.h b/Tests/RunCMake/CommandLine/cmake_depends/test.h
new file mode 100644
index 0000000..fd87388
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/cmake_depends/test.h
@@ -0,0 +1 @@
+void test(void) {}
diff --git a/Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h b/Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h
new file mode 100644
index 0000000..bf56ec6
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h
Binary files differ
diff --git a/Tests/RunCMake/CommandLine/debug-output-stdout.txt b/Tests/RunCMake/CommandLine/debug-output-stdout.txt
new file mode 100644
index 0000000..96f2aae
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/debug-output-stdout.txt
@@ -0,0 +1 @@
+Running with debug output on.
diff --git a/Tests/RunCMake/CommandLine/debug-output.cmake b/Tests/RunCMake/CommandLine/debug-output.cmake
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/debug-output.cmake
diff --git a/Tests/RunCMake/CommandLine/debug-trycompile.cmake b/Tests/RunCMake/CommandLine/debug-trycompile.cmake
new file mode 100644
index 0000000..a3835a7
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/debug-trycompile.cmake
@@ -0,0 +1,5 @@
+enable_language(C)
+# Look for a source tree left by enable_language internal checks.
+if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeTmp/CMakeLists.txt)
+ message(FATAL_ERROR "--debug-trycompile should leave the source behind")
+endif()
diff --git a/Tests/RunCMake/CommandLine/lists-no-file-result.txt b/Tests/RunCMake/CommandLine/lists-no-file-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/lists-no-file-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/lists-no-file-stderr.txt b/Tests/RunCMake/CommandLine/lists-no-file-stderr.txt
new file mode 100644
index 0000000..3465e89
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/lists-no-file-stderr.txt
@@ -0,0 +1,2 @@
+^CMake Error: The source directory ".*/Tests/RunCMake/CommandLine/lists-no-file-build/nosuchsubdir" does not exist.
+Specify --help for usage, or press the help button on the CMake GUI.$
diff --git a/Tests/RunCMake/CommandLine/trace-stderr.txt b/Tests/RunCMake/CommandLine/trace-stderr.txt
new file mode 100644
index 0000000..8e8ddfa
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/trace-stderr.txt
@@ -0,0 +1,2 @@
+^.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(1\): cmake_minimum_required\(VERSION 3.0 \)
+.*/Tests/RunCMake/CommandLine/CMakeLists.txt\(2\): project\(\${RunCMake_TEST} NONE \)
diff --git a/Tests/RunCMake/CommandLine/trace.cmake b/Tests/RunCMake/CommandLine/trace.cmake
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/trace.cmake