diff options
Diffstat (limited to 'Tests/RunCMake/CommandLine')
218 files changed, 730 insertions, 0 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/BuildDir--build-multiple-targets-result.txt b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-stderr.txt b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-stderr.txt new file mode 100644 index 0000000..f2cbaa6 --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-stderr.txt @@ -0,0 +1,3 @@ +^'--target' may not be specified more than once\. ++ +Usage: cmake --build <dir> \[options\] \[-- \[native-options\]\] diff --git a/Tests/RunCMake/CommandLine/BuildDir.cmake b/Tests/RunCMake/CommandLine/BuildDir.cmake new file mode 100644 index 0000000..30030a7 --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir.cmake @@ -0,0 +1 @@ +add_subdirectory(BuildDir) diff --git a/Tests/RunCMake/CommandLine/BuildDir/CMakeLists.txt b/Tests/RunCMake/CommandLine/BuildDir/CMakeLists.txt new file mode 100644 index 0000000..d2a2831 --- /dev/null +++ b/Tests/RunCMake/CommandLine/BuildDir/CMakeLists.txt @@ -0,0 +1,7 @@ +add_custom_command( + OUTPUT output.txt + COMMAND ${CMAKE_COMMAND} -E echo CustomCommand > output.txt + ) +add_custom_target(CustomTarget ALL DEPENDS output.txt) +add_custom_target(CustomTarget2 ALL DEPENDS output.txt) +add_custom_target(CustomTarget3 ALL DEPENDS output.txt) diff --git a/Tests/RunCMake/CommandLine/C-no-arg-result.txt b/Tests/RunCMake/CommandLine/C-no-arg-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/C-no-arg-result.txt @@ -0,0 +1 @@ +1 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/C-no-file-result.txt b/Tests/RunCMake/CommandLine/C-no-file-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/C-no-file-result.txt @@ -0,0 +1 @@ +1 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/CMakeLists.txt b/Tests/RunCMake/CommandLine/CMakeLists.txt new file mode 100644 index 0000000..2897109 --- /dev/null +++ b/Tests/RunCMake/CommandLine/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.0) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CommandLine/D-no-arg-result.txt b/Tests/RunCMake/CommandLine/D-no-arg-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/D-no-arg-result.txt @@ -0,0 +1 @@ +1 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/D_nested_cache-stderr.txt b/Tests/RunCMake/CommandLine/D_nested_cache-stderr.txt new file mode 100644 index 0000000..bba64bc --- /dev/null +++ b/Tests/RunCMake/CommandLine/D_nested_cache-stderr.txt @@ -0,0 +1 @@ +^-->-DBAR:BOOL=BAZ<--$ diff --git a/Tests/RunCMake/CommandLine/D_nested_cache.cmake b/Tests/RunCMake/CommandLine/D_nested_cache.cmake new file mode 100644 index 0000000..9b57284 --- /dev/null +++ b/Tests/RunCMake/CommandLine/D_nested_cache.cmake @@ -0,0 +1 @@ +message("-->${FOO}<--") diff --git a/Tests/RunCMake/CommandLine/D_typed_nested_cache-stderr.txt b/Tests/RunCMake/CommandLine/D_typed_nested_cache-stderr.txt new file mode 100644 index 0000000..bba64bc --- /dev/null +++ b/Tests/RunCMake/CommandLine/D_typed_nested_cache-stderr.txt @@ -0,0 +1 @@ +^-->-DBAR:BOOL=BAZ<--$ diff --git a/Tests/RunCMake/CommandLine/D_typed_nested_cache.cmake b/Tests/RunCMake/CommandLine/D_typed_nested_cache.cmake new file mode 100644 index 0000000..9b57284 --- /dev/null +++ b/Tests/RunCMake/CommandLine/D_typed_nested_cache.cmake @@ -0,0 +1 @@ +message("-->${FOO}<--") diff --git a/Tests/RunCMake/CommandLine/DeprecateVS8-WARN-OFF.cmake b/Tests/RunCMake/CommandLine/DeprecateVS8-WARN-OFF.cmake new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CommandLine/DeprecateVS8-WARN-OFF.cmake diff --git a/Tests/RunCMake/CommandLine/DeprecateVS8-WARN-ON-stderr.txt b/Tests/RunCMake/CommandLine/DeprecateVS8-WARN-ON-stderr.txt new file mode 100644 index 0000000..2f2cbd3 --- /dev/null +++ b/Tests/RunCMake/CommandLine/DeprecateVS8-WARN-ON-stderr.txt @@ -0,0 +1,5 @@ +^CMake Warning: + The "Visual Studio 8 2005" generator is deprecated and will be removed in a + future version of CMake. + + Add CMAKE_WARN_VS8=OFF to the cache to disable this warning.$ diff --git a/Tests/RunCMake/CommandLine/DeprecateVS8-WARN-ON.cmake b/Tests/RunCMake/CommandLine/DeprecateVS8-WARN-ON.cmake new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CommandLine/DeprecateVS8-WARN-ON.cmake diff --git a/Tests/RunCMake/CommandLine/E-no-arg-result.txt b/Tests/RunCMake/CommandLine/E-no-arg-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E-no-arg-result.txt @@ -0,0 +1 @@ +1 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..50d9b03 --- /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___run_co_compile-bad-iwyu-result.txt b/Tests/RunCMake/CommandLine/E___run_co_compile-bad-iwyu-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E___run_co_compile-bad-iwyu-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E___run_co_compile-bad-iwyu-stderr.txt b/Tests/RunCMake/CommandLine/E___run_co_compile-bad-iwyu-stderr.txt new file mode 100644 index 0000000..338f7c4 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E___run_co_compile-bad-iwyu-stderr.txt @@ -0,0 +1,2 @@ +^Error running 'iwyu-does-not-exist': [^ +]+$ diff --git a/Tests/RunCMake/CommandLine/E___run_co_compile-no----result.txt b/Tests/RunCMake/CommandLine/E___run_co_compile-no----result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E___run_co_compile-no----result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E___run_co_compile-no----stderr.txt b/Tests/RunCMake/CommandLine/E___run_co_compile-no----stderr.txt new file mode 100644 index 0000000..f0597d2 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E___run_co_compile-no----stderr.txt @@ -0,0 +1 @@ +^__run_co_compile given unknown argument: command-does-not-exist$ diff --git a/Tests/RunCMake/CommandLine/E___run_co_compile-no-cc-result.txt b/Tests/RunCMake/CommandLine/E___run_co_compile-no-cc-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E___run_co_compile-no-cc-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E___run_co_compile-no-cc-stderr.txt b/Tests/RunCMake/CommandLine/E___run_co_compile-no-cc-stderr.txt new file mode 100644 index 0000000..bba846e --- /dev/null +++ b/Tests/RunCMake/CommandLine/E___run_co_compile-no-cc-stderr.txt @@ -0,0 +1 @@ +^__run_co_compile missing compile command after --$ diff --git a/Tests/RunCMake/CommandLine/E___run_co_compile-no-iwyu-result.txt b/Tests/RunCMake/CommandLine/E___run_co_compile-no-iwyu-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E___run_co_compile-no-iwyu-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E___run_co_compile-no-iwyu-stderr.txt b/Tests/RunCMake/CommandLine/E___run_co_compile-no-iwyu-stderr.txt new file mode 100644 index 0000000..a7fbad6 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E___run_co_compile-no-iwyu-stderr.txt @@ -0,0 +1,6 @@ +^__run_co_compile missing command to run. Looking for one or more of the following: +--cppcheck= +--cpplint= +--iwyu= +--lwyu= +--tidy= diff --git a/Tests/RunCMake/CommandLine/E_capabilities-arg-result.txt b/Tests/RunCMake/CommandLine/E_capabilities-arg-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_capabilities-arg-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_capabilities-arg-stderr.txt b/Tests/RunCMake/CommandLine/E_capabilities-arg-stderr.txt new file mode 100644 index 0000000..f74cebe --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_capabilities-arg-stderr.txt @@ -0,0 +1 @@ +^-E capabilities accepts no additional arguments$ diff --git a/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt b/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt new file mode 100644 index 0000000..6c5ea44 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt @@ -0,0 +1 @@ +^{.*}$ diff --git a/Tests/RunCMake/CommandLine/E_copy-one-source-directory-target-is-directory-result.txt b/Tests/RunCMake/CommandLine/E_copy-one-source-directory-target-is-directory-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy-one-source-directory-target-is-directory-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_copy-one-source-directory-target-is-directory-stderr.txt b/Tests/RunCMake/CommandLine/E_copy-one-source-directory-target-is-directory-stderr.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy-one-source-directory-target-is-directory-stderr.txt diff --git a/Tests/RunCMake/CommandLine/E_copy-one-source-file-result.txt b/Tests/RunCMake/CommandLine/E_copy-one-source-file-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy-one-source-file-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_copy-one-source-file-stderr.txt b/Tests/RunCMake/CommandLine/E_copy-one-source-file-stderr.txt new file mode 100644 index 0000000..9a9301d --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy-one-source-file-stderr.txt @@ -0,0 +1 @@ +^CMake Error: .* diff --git a/Tests/RunCMake/CommandLine/E_copy-three-source-files-target-is-directory-result.txt b/Tests/RunCMake/CommandLine/E_copy-three-source-files-target-is-directory-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy-three-source-files-target-is-directory-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_copy-three-source-files-target-is-directory-stderr.txt b/Tests/RunCMake/CommandLine/E_copy-three-source-files-target-is-directory-stderr.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy-three-source-files-target-is-directory-stderr.txt diff --git a/Tests/RunCMake/CommandLine/E_copy-three-source-files-target-is-file-result.txt b/Tests/RunCMake/CommandLine/E_copy-three-source-files-target-is-file-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy-three-source-files-target-is-file-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_copy-three-source-files-target-is-file-stderr.txt b/Tests/RunCMake/CommandLine/E_copy-three-source-files-target-is-file-stderr.txt new file mode 100644 index 0000000..9504216 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy-three-source-files-target-is-file-stderr.txt @@ -0,0 +1 @@ +^Error: Target \(for copy command\).* is not a directory.$ diff --git a/Tests/RunCMake/CommandLine/E_copy-two-good-and-one-bad-source-files-target-is-directory-result.txt b/Tests/RunCMake/CommandLine/E_copy-two-good-and-one-bad-source-files-target-is-directory-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy-two-good-and-one-bad-source-files-target-is-directory-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_copy-two-good-and-one-bad-source-files-target-is-directory-stderr.txt b/Tests/RunCMake/CommandLine/E_copy-two-good-and-one-bad-source-files-target-is-directory-stderr.txt new file mode 100644 index 0000000..2d0d986 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy-two-good-and-one-bad-source-files-target-is-directory-stderr.txt @@ -0,0 +1 @@ +^Error copying file .*not_existing_file.bad\" to .* diff --git a/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-directory-result.txt b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-directory-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-directory-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-directory-stderr.txt b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-directory-stderr.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-directory-stderr.txt diff --git a/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-file-result.txt b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-file-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-file-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-file-stderr.txt b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-file-stderr.txt new file mode 100644 index 0000000..6ca3677 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-file-stderr.txt @@ -0,0 +1,3 @@ +^Error copying directory from .* to .*file_for_test.txt\".* +Error copying directory from .* to .*file_for_test.txt\".* +Error copying directory from .* to .*file_for_test.txt\".$ diff --git a/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-not-exist-result.txt b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-not-exist-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-not-exist-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-not-exist-stderr.txt b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-not-exist-stderr.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-not-exist-stderr.txt diff --git a/Tests/RunCMake/CommandLine/E_copy_if_different-one-source-directory-target-is-directory-result.txt b/Tests/RunCMake/CommandLine/E_copy_if_different-one-source-directory-target-is-directory-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy_if_different-one-source-directory-target-is-directory-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_copy_if_different-one-source-directory-target-is-directory-stderr.txt b/Tests/RunCMake/CommandLine/E_copy_if_different-one-source-directory-target-is-directory-stderr.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy_if_different-one-source-directory-target-is-directory-stderr.txt diff --git a/Tests/RunCMake/CommandLine/E_copy_if_different-three-source-files-target-is-directory-result.txt b/Tests/RunCMake/CommandLine/E_copy_if_different-three-source-files-target-is-directory-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy_if_different-three-source-files-target-is-directory-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_copy_if_different-three-source-files-target-is-directory-stderr.txt b/Tests/RunCMake/CommandLine/E_copy_if_different-three-source-files-target-is-directory-stderr.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy_if_different-three-source-files-target-is-directory-stderr.txt diff --git a/Tests/RunCMake/CommandLine/E_copy_if_different-three-source-files-target-is-file-result.txt b/Tests/RunCMake/CommandLine/E_copy_if_different-three-source-files-target-is-file-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy_if_different-three-source-files-target-is-file-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_copy_if_different-three-source-files-target-is-file-stderr.txt b/Tests/RunCMake/CommandLine/E_copy_if_different-three-source-files-target-is-file-stderr.txt new file mode 100644 index 0000000..64b7b1b --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy_if_different-three-source-files-target-is-file-stderr.txt @@ -0,0 +1 @@ +^Error: Target \(for copy_if_different command\).* is not a directory.$ diff --git a/Tests/RunCMake/CommandLine/E_create_symlink-broken-create-check.cmake b/Tests/RunCMake/CommandLine/E_create_symlink-broken-create-check.cmake new file mode 100644 index 0000000..d7e652d --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_create_symlink-broken-create-check.cmake @@ -0,0 +1,6 @@ +if(NOT IS_SYMLINK ${RunCMake_TEST_BINARY_DIR}/L) + set(RunCMake_TEST_FAILED "Symlink 'L' incorrectly not created!") +endif() +if(EXISTS ${RunCMake_TEST_BINARY_DIR}/L) + set(RunCMake_TEST_FAILED "Symlink 'L' not broken!") +endif() diff --git a/Tests/RunCMake/CommandLine/E_create_symlink-broken-replace-check.cmake b/Tests/RunCMake/CommandLine/E_create_symlink-broken-replace-check.cmake new file mode 100644 index 0000000..c078ae8 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_create_symlink-broken-replace-check.cmake @@ -0,0 +1,3 @@ +if(NOT IS_DIRECTORY ${RunCMake_TEST_BINARY_DIR}/L) + set(RunCMake_TEST_FAILED "Symlink 'L' not replaced correctly!") +endif() diff --git a/Tests/RunCMake/CommandLine/E_create_symlink-missing-dir-result.txt b/Tests/RunCMake/CommandLine/E_create_symlink-missing-dir-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_create_symlink-missing-dir-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_create_symlink-missing-dir-stderr.txt b/Tests/RunCMake/CommandLine/E_create_symlink-missing-dir-stderr.txt new file mode 100644 index 0000000..7a6d84b --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_create_symlink-missing-dir-stderr.txt @@ -0,0 +1 @@ +failed to create symbolic link 'missing-dir/L': 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..50d9b03 --- /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_create_symlink-no-replace-dir-result.txt b/Tests/RunCMake/CommandLine/E_create_symlink-no-replace-dir-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_create_symlink-no-replace-dir-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_create_symlink-no-replace-dir-stderr.txt b/Tests/RunCMake/CommandLine/E_create_symlink-no-replace-dir-stderr.txt new file mode 100644 index 0000000..ebed0d6 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_create_symlink-no-replace-dir-stderr.txt @@ -0,0 +1 @@ +failed to create symbolic link '\.' because existing path cannot be removed: diff --git a/Tests/RunCMake/CommandLine/E_env-bad-arg1-result.txt b/Tests/RunCMake/CommandLine/E_env-bad-arg1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-bad-arg1-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_env-bad-arg1-stderr.txt b/Tests/RunCMake/CommandLine/E_env-bad-arg1-stderr.txt new file mode 100644 index 0000000..2143ba4 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-bad-arg1-stderr.txt @@ -0,0 +1 @@ +^cmake -E env: unknown option '-bad-arg1'$ diff --git a/Tests/RunCMake/CommandLine/E_env-no-command0-result.txt b/Tests/RunCMake/CommandLine/E_env-no-command0-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-no-command0-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_env-no-command0-stderr.txt b/Tests/RunCMake/CommandLine/E_env-no-command0-stderr.txt new file mode 100644 index 0000000..d2efa53 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-no-command0-stderr.txt @@ -0,0 +1 @@ +^cmake -E env: no command given$ diff --git a/Tests/RunCMake/CommandLine/E_env-no-command1-result.txt b/Tests/RunCMake/CommandLine/E_env-no-command1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-no-command1-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_env-no-command1-stderr.txt b/Tests/RunCMake/CommandLine/E_env-no-command1-stderr.txt new file mode 100644 index 0000000..d2efa53 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-no-command1-stderr.txt @@ -0,0 +1 @@ +^cmake -E env: no command given$ diff --git a/Tests/RunCMake/CommandLine/E_env-set-stdout.txt b/Tests/RunCMake/CommandLine/E_env-set-stdout.txt new file mode 100644 index 0000000..feff117 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-set-stdout.txt @@ -0,0 +1 @@ +^-- TEST_ENV is correctly set in environment: 1$ diff --git a/Tests/RunCMake/CommandLine/E_env-set.cmake b/Tests/RunCMake/CommandLine/E_env-set.cmake new file mode 100644 index 0000000..c2639b6 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-set.cmake @@ -0,0 +1,5 @@ +if(DEFINED ENV{TEST_ENV}) + message(STATUS "TEST_ENV is correctly set in environment: $ENV{TEST_ENV}") +else() + message(FATAL_ERROR "TEST_ENV is incorrectly not set in environment") +endif() diff --git a/Tests/RunCMake/CommandLine/E_env-unset-stdout.txt b/Tests/RunCMake/CommandLine/E_env-unset-stdout.txt new file mode 100644 index 0000000..a1d5c01 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-unset-stdout.txt @@ -0,0 +1 @@ +^-- TEST_ENV is correctly not set in environment$ diff --git a/Tests/RunCMake/CommandLine/E_env-unset.cmake b/Tests/RunCMake/CommandLine/E_env-unset.cmake new file mode 100644 index 0000000..04976fb --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-unset.cmake @@ -0,0 +1,5 @@ +if(DEFINED ENV{TEST_ENV}) + message(FATAL_ERROR "TEST_ENV is incorrectly set in environment") +else() + message(STATUS "TEST_ENV is correctly not set in environment") +endif() diff --git a/Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-result.txt b/Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-stderr.txt b/Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-stderr.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-stderr.txt diff --git a/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-result.txt b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-stderr.txt b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-stderr.txt new file mode 100644 index 0000000..08a9428 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-stderr.txt @@ -0,0 +1 @@ +^Error creating directory .*file_for_test.txt\".$ diff --git a/Tests/RunCMake/CommandLine/E_make_directory-three-directories-result.txt b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_make_directory-three-directories-stderr.txt b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-stderr.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-stderr.txt diff --git a/Tests/RunCMake/CommandLine/E_md5sum-dir-result.txt b/Tests/RunCMake/CommandLine/E_md5sum-dir-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_md5sum-dir-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_md5sum-dir-stderr.txt b/Tests/RunCMake/CommandLine/E_md5sum-dir-stderr.txt new file mode 100644 index 0000000..061fd64 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_md5sum-dir-stderr.txt @@ -0,0 +1 @@ +Error: . is a directory diff --git a/Tests/RunCMake/CommandLine/E_md5sum-mixed-result.txt b/Tests/RunCMake/CommandLine/E_md5sum-mixed-result.txt new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_md5sum-mixed-result.txt @@ -0,0 +1 @@ +2 diff --git a/Tests/RunCMake/CommandLine/E_md5sum-mixed-stderr.txt b/Tests/RunCMake/CommandLine/E_md5sum-mixed-stderr.txt new file mode 100644 index 0000000..b6b84c3 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_md5sum-mixed-stderr.txt @@ -0,0 +1,2 @@ +Error: . is a directory +nonexisting: No such file or directory diff --git a/Tests/RunCMake/CommandLine/E_md5sum-mixed-stdout.txt b/Tests/RunCMake/CommandLine/E_md5sum-mixed-stdout.txt new file mode 100644 index 0000000..18e49be --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_md5sum-mixed-stdout.txt @@ -0,0 +1 @@ +275876e34cf609db118f3d84b799a790 ../dummy diff --git a/Tests/RunCMake/CommandLine/E_md5sum-no-file-result.txt b/Tests/RunCMake/CommandLine/E_md5sum-no-file-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_md5sum-no-file-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_md5sum-no-file-stderr.txt b/Tests/RunCMake/CommandLine/E_md5sum-no-file-stderr.txt new file mode 100644 index 0000000..732e8c4 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_md5sum-no-file-stderr.txt @@ -0,0 +1 @@ +nonexisting: No such file or directory diff --git a/Tests/RunCMake/CommandLine/E_md5sum-result.txt b/Tests/RunCMake/CommandLine/E_md5sum-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_md5sum-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_md5sum-stdout.txt b/Tests/RunCMake/CommandLine/E_md5sum-stdout.txt new file mode 100644 index 0000000..18e49be --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_md5sum-stdout.txt @@ -0,0 +1 @@ +275876e34cf609db118f3d84b799a790 ../dummy 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..50d9b03 --- /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_server-arg-result.txt b/Tests/RunCMake/CommandLine/E_server-arg-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_server-arg-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_server-arg-stderr.txt b/Tests/RunCMake/CommandLine/E_server-arg-stderr.txt new file mode 100644 index 0000000..4dcbab9 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_server-arg-stderr.txt @@ -0,0 +1 @@ +^CMake Error: Unknown argument for server mode$ diff --git a/Tests/RunCMake/CommandLine/E_server-pipe-result.txt b/Tests/RunCMake/CommandLine/E_server-pipe-result.txt new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_server-pipe-result.txt @@ -0,0 +1 @@ +2 diff --git a/Tests/RunCMake/CommandLine/E_server-pipe-stderr.txt b/Tests/RunCMake/CommandLine/E_server-pipe-stderr.txt new file mode 100644 index 0000000..7193ba6 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_server-pipe-stderr.txt @@ -0,0 +1 @@ +^CMake Error: No pipe given after --pipe=$ diff --git a/Tests/RunCMake/CommandLine/E_sha1sum-dir-result.txt b/Tests/RunCMake/CommandLine/E_sha1sum-dir-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha1sum-dir-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_sha1sum-dir-stderr.txt b/Tests/RunCMake/CommandLine/E_sha1sum-dir-stderr.txt new file mode 100644 index 0000000..061fd64 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha1sum-dir-stderr.txt @@ -0,0 +1 @@ +Error: . is a directory diff --git a/Tests/RunCMake/CommandLine/E_sha1sum-no-file-result.txt b/Tests/RunCMake/CommandLine/E_sha1sum-no-file-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha1sum-no-file-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_sha1sum-no-file-stderr.txt b/Tests/RunCMake/CommandLine/E_sha1sum-no-file-stderr.txt new file mode 100644 index 0000000..732e8c4 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha1sum-no-file-stderr.txt @@ -0,0 +1 @@ +nonexisting: No such file or directory diff --git a/Tests/RunCMake/CommandLine/E_sha1sum-result.txt b/Tests/RunCMake/CommandLine/E_sha1sum-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha1sum-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_sha1sum-stdout.txt b/Tests/RunCMake/CommandLine/E_sha1sum-stdout.txt new file mode 100644 index 0000000..689b85b --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha1sum-stdout.txt @@ -0,0 +1 @@ +829c3804401b0727f70f73d4415e162400cbe57b ../dummy diff --git a/Tests/RunCMake/CommandLine/E_sha224sum-dir-result.txt b/Tests/RunCMake/CommandLine/E_sha224sum-dir-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha224sum-dir-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_sha224sum-dir-stderr.txt b/Tests/RunCMake/CommandLine/E_sha224sum-dir-stderr.txt new file mode 100644 index 0000000..061fd64 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha224sum-dir-stderr.txt @@ -0,0 +1 @@ +Error: . is a directory diff --git a/Tests/RunCMake/CommandLine/E_sha224sum-no-file-result.txt b/Tests/RunCMake/CommandLine/E_sha224sum-no-file-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha224sum-no-file-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_sha224sum-no-file-stderr.txt b/Tests/RunCMake/CommandLine/E_sha224sum-no-file-stderr.txt new file mode 100644 index 0000000..732e8c4 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha224sum-no-file-stderr.txt @@ -0,0 +1 @@ +nonexisting: No such file or directory diff --git a/Tests/RunCMake/CommandLine/E_sha224sum-result.txt b/Tests/RunCMake/CommandLine/E_sha224sum-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha224sum-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_sha224sum-stdout.txt b/Tests/RunCMake/CommandLine/E_sha224sum-stdout.txt new file mode 100644 index 0000000..5b3e217 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha224sum-stdout.txt @@ -0,0 +1 @@ +37d32c6dbabed711cb1d4620b64090fef0ef63ab16a4a51d668259e6 ../dummy diff --git a/Tests/RunCMake/CommandLine/E_sha256sum-dir-result.txt b/Tests/RunCMake/CommandLine/E_sha256sum-dir-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha256sum-dir-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_sha256sum-dir-stderr.txt b/Tests/RunCMake/CommandLine/E_sha256sum-dir-stderr.txt new file mode 100644 index 0000000..061fd64 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha256sum-dir-stderr.txt @@ -0,0 +1 @@ +Error: . is a directory diff --git a/Tests/RunCMake/CommandLine/E_sha256sum-no-file-result.txt b/Tests/RunCMake/CommandLine/E_sha256sum-no-file-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha256sum-no-file-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_sha256sum-no-file-stderr.txt b/Tests/RunCMake/CommandLine/E_sha256sum-no-file-stderr.txt new file mode 100644 index 0000000..732e8c4 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha256sum-no-file-stderr.txt @@ -0,0 +1 @@ +nonexisting: No such file or directory diff --git a/Tests/RunCMake/CommandLine/E_sha256sum-result.txt b/Tests/RunCMake/CommandLine/E_sha256sum-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha256sum-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_sha256sum-stdout.txt b/Tests/RunCMake/CommandLine/E_sha256sum-stdout.txt new file mode 100644 index 0000000..9a18770 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha256sum-stdout.txt @@ -0,0 +1 @@ +b5a2c96250612366ea272ffac6d9744aaf4b45aacd96aa7cfcb931ee3b558259 ../dummy diff --git a/Tests/RunCMake/CommandLine/E_sha384sum-dir-result.txt b/Tests/RunCMake/CommandLine/E_sha384sum-dir-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha384sum-dir-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_sha384sum-dir-stderr.txt b/Tests/RunCMake/CommandLine/E_sha384sum-dir-stderr.txt new file mode 100644 index 0000000..061fd64 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha384sum-dir-stderr.txt @@ -0,0 +1 @@ +Error: . is a directory diff --git a/Tests/RunCMake/CommandLine/E_sha384sum-no-file-result.txt b/Tests/RunCMake/CommandLine/E_sha384sum-no-file-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha384sum-no-file-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_sha384sum-no-file-stderr.txt b/Tests/RunCMake/CommandLine/E_sha384sum-no-file-stderr.txt new file mode 100644 index 0000000..732e8c4 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha384sum-no-file-stderr.txt @@ -0,0 +1 @@ +nonexisting: No such file or directory diff --git a/Tests/RunCMake/CommandLine/E_sha384sum-result.txt b/Tests/RunCMake/CommandLine/E_sha384sum-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha384sum-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_sha384sum-stdout.txt b/Tests/RunCMake/CommandLine/E_sha384sum-stdout.txt new file mode 100644 index 0000000..b706ac5 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha384sum-stdout.txt @@ -0,0 +1 @@ +43c1835ceba2e29596f05e3859d4fe2b6d124a181ed670f68e914bd3ed251b02b4be609608a13f23ec3d98da6c4eb8cd ../dummy diff --git a/Tests/RunCMake/CommandLine/E_sha512sum-dir-result.txt b/Tests/RunCMake/CommandLine/E_sha512sum-dir-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha512sum-dir-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_sha512sum-dir-stderr.txt b/Tests/RunCMake/CommandLine/E_sha512sum-dir-stderr.txt new file mode 100644 index 0000000..061fd64 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha512sum-dir-stderr.txt @@ -0,0 +1 @@ +Error: . is a directory diff --git a/Tests/RunCMake/CommandLine/E_sha512sum-no-file-result.txt b/Tests/RunCMake/CommandLine/E_sha512sum-no-file-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha512sum-no-file-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_sha512sum-no-file-stderr.txt b/Tests/RunCMake/CommandLine/E_sha512sum-no-file-stderr.txt new file mode 100644 index 0000000..732e8c4 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha512sum-no-file-stderr.txt @@ -0,0 +1 @@ +nonexisting: No such file or directory diff --git a/Tests/RunCMake/CommandLine/E_sha512sum-result.txt b/Tests/RunCMake/CommandLine/E_sha512sum-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha512sum-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_sha512sum-stdout.txt b/Tests/RunCMake/CommandLine/E_sha512sum-stdout.txt new file mode 100644 index 0000000..4305383 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sha512sum-stdout.txt @@ -0,0 +1 @@ +1692526aab84461a8aebcefddcba2b33fb5897ab180c53e8b345ae125484d0aaa35baf60487050be21ed8909a48eace93851bf139087ce1f7a87d97b6120a651 ../dummy diff --git a/Tests/RunCMake/CommandLine/E_sleep-bad-arg1-result.txt b/Tests/RunCMake/CommandLine/E_sleep-bad-arg1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sleep-bad-arg1-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_sleep-bad-arg1-stderr.txt b/Tests/RunCMake/CommandLine/E_sleep-bad-arg1-stderr.txt new file mode 100644 index 0000000..45e6ebc --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sleep-bad-arg1-stderr.txt @@ -0,0 +1 @@ +^Unknown sleep time format "x"\.$ diff --git a/Tests/RunCMake/CommandLine/E_sleep-bad-arg2-result.txt b/Tests/RunCMake/CommandLine/E_sleep-bad-arg2-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sleep-bad-arg2-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_sleep-bad-arg2-stderr.txt b/Tests/RunCMake/CommandLine/E_sleep-bad-arg2-stderr.txt new file mode 100644 index 0000000..399d47f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sleep-bad-arg2-stderr.txt @@ -0,0 +1 @@ +^Unknown sleep time format "-1"\.$ diff --git a/Tests/RunCMake/CommandLine/E_sleep-no-args-result.txt b/Tests/RunCMake/CommandLine/E_sleep-no-args-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sleep-no-args-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_sleep-no-args-stderr.cmake b/Tests/RunCMake/CommandLine/E_sleep-no-args-stderr.cmake new file mode 100644 index 0000000..977f1ef --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_sleep-no-args-stderr.cmake @@ -0,0 +1,2 @@ +Usage: .*/cmake -E \[command\] \[arguments \.\.\.\] +Available commands: diff --git a/Tests/RunCMake/CommandLine/E_time-no-arg-result.txt b/Tests/RunCMake/CommandLine/E_time-no-arg-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_time-no-arg-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_time-no-arg-stderr.txt b/Tests/RunCMake/CommandLine/E_time-no-arg-stderr.txt new file mode 100644 index 0000000..50d9b03 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_time-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_time-stdout.txt b/Tests/RunCMake/CommandLine/E_time-stdout.txt new file mode 100644 index 0000000..a51446a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_time-stdout.txt @@ -0,0 +1,3 @@ +^hello world +Elapsed time: [^ +]*$ 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..50d9b03 --- /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_directory-result.txt b/Tests/RunCMake/CommandLine/P_directory-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/P_directory-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/P_directory-stderr.txt b/Tests/RunCMake/CommandLine/P_directory-stderr.txt new file mode 100644 index 0000000..b8319a1 --- /dev/null +++ b/Tests/RunCMake/CommandLine/P_directory-stderr.txt @@ -0,0 +1 @@ +^CMake Error: Error processing file: .*/Tests/RunCMake/CommandLine$ 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/P_working-dir.cmake b/Tests/RunCMake/CommandLine/P_working-dir.cmake new file mode 100644 index 0000000..4ea0293 --- /dev/null +++ b/Tests/RunCMake/CommandLine/P_working-dir.cmake @@ -0,0 +1,14 @@ +if(NOT IS_DIRECTORY "${EXPECTED_WORKING_DIR}") + message(FATAL_ERROR "EXPECTED_WORKING_DIR is not a directory: ${EXPECTED_WORKING_DIR}") +endif() + +foreach(d CMAKE_BINARY_DIR CMAKE_CURRENT_BINARY_DIR CMAKE_SOURCE_DIR CMAKE_CURRENT_SOURCE_DIR) + if(NOT DEFINED ${d}) + message(FATAL_ERROR "${d} is not defined") + endif() + if(EXPECTED_WORKING_DIR STREQUAL "${${d}}") + message(STATUS "${d} is the expected working directory (${EXPECTED_WORKING_DIR})") + else() + message(FATAL_ERROR "${d} = \"${${d}}\" is not the expected working directory (${EXPECTED_WORKING_DIR})") + endif() +endforeach() diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake new file mode 100644 index 0000000..55eac5e --- /dev/null +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -0,0 +1,340 @@ +cmake_minimum_required(VERSION 3.1) + +include(RunCMake) + +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_capabilities ${CMAKE_COMMAND} -E capabilities) +run_cmake_command(E_capabilities-arg ${CMAKE_COMMAND} -E capabilities --extra-arg) +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_server-arg ${CMAKE_COMMAND} -E server --extra-arg) +run_cmake_command(E_server-pipe ${CMAKE_COMMAND} -E server --pipe=) +run_cmake_command(E_touch_nocreate-no-arg ${CMAKE_COMMAND} -E touch_nocreate) + +run_cmake_command(E_time ${CMAKE_COMMAND} -E time ${CMAKE_COMMAND} -E echo "hello world") +run_cmake_command(E_time-no-arg ${CMAKE_COMMAND} -E time) + +run_cmake_command(E___run_co_compile-no-iwyu ${CMAKE_COMMAND} -E __run_co_compile -- command-does-not-exist) +run_cmake_command(E___run_co_compile-bad-iwyu ${CMAKE_COMMAND} -E __run_co_compile --iwyu=iwyu-does-not-exist -- command-does-not-exist) +run_cmake_command(E___run_co_compile-no--- ${CMAKE_COMMAND} -E __run_co_compile --iwyu=iwyu-does-not-exist command-does-not-exist) +run_cmake_command(E___run_co_compile-no-cc ${CMAKE_COMMAND} -E __run_co_compile --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-dir + ${CMAKE_COMMAND} --build) +run_cmake_command(build-no-cache + ${CMAKE_COMMAND} --build ${RunCMake_SOURCE_DIR}) +run_cmake_command(build-no-generator + ${CMAKE_COMMAND} --build ${RunCMake_SOURCE_DIR}/cache-no-generator) +run_cmake_command(build-bad-dir + ${CMAKE_COMMAND} --build dir-does-not-exist) +run_cmake_command(build-bad-generator + ${CMAKE_COMMAND} --build ${RunCMake_SOURCE_DIR}/cache-bad-generator) + +run_cmake_command(cache-bad-entry + ${CMAKE_COMMAND} --build ${RunCMake_SOURCE_DIR}/cache-bad-entry/) +run_cmake_command(cache-empty-entry + ${CMAKE_COMMAND} --build ${RunCMake_SOURCE_DIR}/cache-empty-entry/) + +function(run_BuildDir) + # Use a single build tree for a few tests without cleaning. + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/BuildDir-build) + set(RunCMake_TEST_NO_CLEAN 1) + file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") + file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") + + run_cmake(BuildDir) + run_cmake_command(BuildDir--build ${CMAKE_COMMAND} -E chdir .. + ${CMAKE_COMMAND} --build BuildDir-build --target CustomTarget) + run_cmake_command(BuildDir--build-multiple-targets ${CMAKE_COMMAND} -E chdir .. + ${CMAKE_COMMAND} --build BuildDir-build --target CustomTarget2 --target CustomTarget3) +endfunction() +run_BuildDir() + +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 MATCHES "^Visual Studio 8 2005") + set(RunCMake_WARN_VS8 1) + run_cmake(DeprecateVS8-WARN-ON) + unset(RunCMake_WARN_VS8) + run_cmake(DeprecateVS8-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 + ) + + # Use a single build tree for a few tests without cleaning. + set(RunCMake_TEST_BINARY_DIR + ${RunCMake_BINARY_DIR}/E_create_symlink-broken-build) + set(RunCMake_TEST_NO_CLEAN 1) + file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") + run_cmake_command(E_create_symlink-broken-create + ${CMAKE_COMMAND} -E create_symlink T L + ) + run_cmake_command(E_create_symlink-broken-replace + ${CMAKE_COMMAND} -E create_symlink . L + ) + unset(RunCMake_TEST_BINARY_DIR) + unset(RunCMake_TEST_NO_CLEAN) + + run_cmake_command(E_create_symlink-no-replace-dir + ${CMAKE_COMMAND} -E create_symlink T . + ) +endif() + +set(in ${RunCMake_SOURCE_DIR}/copy_input) +set(out ${RunCMake_BINARY_DIR}/copy_output) +file(REMOVE_RECURSE "${out}") +file(MAKE_DIRECTORY ${out}) +run_cmake_command(E_copy-one-source-file + ${CMAKE_COMMAND} -E copy ${out}/f1.txt) +run_cmake_command(E_copy-one-source-directory-target-is-directory + ${CMAKE_COMMAND} -E copy ${in}/f1.txt ${out}) +run_cmake_command(E_copy-three-source-files-target-is-directory + ${CMAKE_COMMAND} -E copy ${in}/f1.txt ${in}/f2.txt ${in}/f3.txt ${out}) +run_cmake_command(E_copy-three-source-files-target-is-file + ${CMAKE_COMMAND} -E copy ${in}/f1.txt ${in}/f2.txt ${in}/f3.txt ${out}/f1.txt) +run_cmake_command(E_copy-two-good-and-one-bad-source-files-target-is-directory + ${CMAKE_COMMAND} -E copy ${in}/f1.txt ${in}/not_existing_file.bad ${in}/f3.txt ${out}) +run_cmake_command(E_copy_if_different-one-source-directory-target-is-directory + ${CMAKE_COMMAND} -E copy_if_different ${in}/f1.txt ${out}) +run_cmake_command(E_copy_if_different-three-source-files-target-is-directory + ${CMAKE_COMMAND} -E copy_if_different ${in}/f1.txt ${in}/f2.txt ${in}/f3.txt ${out}) +run_cmake_command(E_copy_if_different-three-source-files-target-is-file + ${CMAKE_COMMAND} -E copy_if_different ${in}/f1.txt ${in}/f2.txt ${in}/f3.txt ${out}/f1.txt) +unset(in) +unset(out) + +set(in ${RunCMake_SOURCE_DIR}/copy_input) +set(out ${RunCMake_BINARY_DIR}/copy_directory_output) +set(outfile ${out}/file_for_test.txt) +file(REMOVE_RECURSE "${out}") +file(MAKE_DIRECTORY ${out}) +file(WRITE ${outfile} "") +run_cmake_command(E_copy_directory-three-source-files-target-is-directory + ${CMAKE_COMMAND} -E copy_directory ${in}/d1 ${in}/d2 ${in}/d3 ${out}) +run_cmake_command(E_copy_directory-three-source-files-target-is-file + ${CMAKE_COMMAND} -E copy_directory ${in}/d1 ${in}/d2 ${in}/d3 ${outfile}) +run_cmake_command(E_copy_directory-three-source-files-target-is-not-exist + ${CMAKE_COMMAND} -E copy_directory ${in}/d1 ${in}/d2 ${in}/d3 ${out}/not_existing_directory) +unset(in) +unset(out) +unset(outfile) + +set(out ${RunCMake_BINARY_DIR}/make_directory_output) +set(outfile ${out}/file_for_test.txt) +file(REMOVE_RECURSE "${out}") +file(MAKE_DIRECTORY ${out}) +file(WRITE ${outfile} "") +run_cmake_command(E_make_directory-three-directories + ${CMAKE_COMMAND} -E make_directory ${out}/d1 ${out}/d2 ${out}/d2) +run_cmake_command(E_make_directory-directory-with-parent + ${CMAKE_COMMAND} -E make_directory ${out}/parent/child) +run_cmake_command(E_make_directory-three-directories-and-file + ${CMAKE_COMMAND} -E make_directory ${out}/d1 ${out}/d2 ${outfile}) +unset(out) +unset(outfile) + + +run_cmake_command(E_env-no-command0 ${CMAKE_COMMAND} -E env) +run_cmake_command(E_env-no-command1 ${CMAKE_COMMAND} -E env TEST_ENV=1) +run_cmake_command(E_env-bad-arg1 ${CMAKE_COMMAND} -E env -bad-arg1) +run_cmake_command(E_env-set ${CMAKE_COMMAND} -E env TEST_ENV=1 ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/E_env-set.cmake) +run_cmake_command(E_env-unset ${CMAKE_COMMAND} -E env TEST_ENV=1 ${CMAKE_COMMAND} -E env --unset=TEST_ENV ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/E_env-unset.cmake) + +run_cmake_command(E_md5sum-dir ${CMAKE_COMMAND} -E md5sum .) +run_cmake_command(E_sha1sum-dir ${CMAKE_COMMAND} -E sha1sum .) +run_cmake_command(E_sha224sum-dir ${CMAKE_COMMAND} -E sha224sum .) +run_cmake_command(E_sha256sum-dir ${CMAKE_COMMAND} -E sha256sum .) +run_cmake_command(E_sha384sum-dir ${CMAKE_COMMAND} -E sha384sum .) +run_cmake_command(E_sha512sum-dir ${CMAKE_COMMAND} -E sha512sum .) + +run_cmake_command(E_md5sum-no-file ${CMAKE_COMMAND} -E md5sum nonexisting) +run_cmake_command(E_sha1sum-no-file ${CMAKE_COMMAND} -E sha1sum nonexisting) +run_cmake_command(E_sha224sum-no-file ${CMAKE_COMMAND} -E sha224sum nonexisting) +run_cmake_command(E_sha256sum-no-file ${CMAKE_COMMAND} -E sha256sum nonexisting) +run_cmake_command(E_sha384sum-no-file ${CMAKE_COMMAND} -E sha384sum nonexisting) +run_cmake_command(E_sha512sum-no-file ${CMAKE_COMMAND} -E sha512sum nonexisting) + +file(WRITE "${RunCMake_BINARY_DIR}/dummy" "dummy") +run_cmake_command(E_md5sum ${CMAKE_COMMAND} -E md5sum ../dummy) +run_cmake_command(E_md5sum-mixed ${CMAKE_COMMAND} -E md5sum . ../dummy nonexisting) +run_cmake_command(E_sha1sum ${CMAKE_COMMAND} -E sha1sum ../dummy) +run_cmake_command(E_sha224sum ${CMAKE_COMMAND} -E sha224sum ../dummy) +run_cmake_command(E_sha256sum ${CMAKE_COMMAND} -E sha256sum ../dummy) +run_cmake_command(E_sha384sum ${CMAKE_COMMAND} -E sha384sum ../dummy) +run_cmake_command(E_sha512sum ${CMAKE_COMMAND} -E sha512sum ../dummy) +file(REMOVE "${RunCMake_BINARY_DIR}/dummy") + +set(RunCMake_DEFAULT_stderr ".") +run_cmake_command(E_sleep-no-args ${CMAKE_COMMAND} -E sleep) +unset(RunCMake_DEFAULT_stderr) +run_cmake_command(E_sleep-bad-arg1 ${CMAKE_COMMAND} -E sleep x) +run_cmake_command(E_sleep-bad-arg2 ${CMAKE_COMMAND} -E sleep 1 -1) +run_cmake_command(E_sleep-one-tenth ${CMAKE_COMMAND} -E sleep 0.1) + +run_cmake_command(P_directory ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}) +run_cmake_command(P_working-dir ${CMAKE_COMMAND} -DEXPECTED_WORKING_DIR=${RunCMake_BINARY_DIR}/P_working-dir-build -P ${RunCMake_SOURCE_DIR}/P_working-dir.cmake) + +set(RunCMake_TEST_OPTIONS + "-DFOO=-DBAR:BOOL=BAZ") +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 -Wdev) +run_cmake(Wdev) +unset(RunCMake_TEST_OPTIONS) + +set(RunCMake_TEST_OPTIONS -Werror=dev) +run_cmake(Werror_dev) +unset(RunCMake_TEST_OPTIONS) + +set(RunCMake_TEST_OPTIONS -Wno-error=dev) +run_cmake(Wno-error_deprecated) +unset(RunCMake_TEST_OPTIONS) + +# -Wdev should not override deprecated options if specified +set(RunCMake_TEST_OPTIONS -Wdev -Wno-deprecated) +run_cmake(Wno-deprecated) +unset(RunCMake_TEST_OPTIONS) +set(RunCMake_TEST_OPTIONS -Wno-deprecated -Wdev) +run_cmake(Wno-deprecated) +unset(RunCMake_TEST_OPTIONS) + +# -Wdev should enable deprecated warnings as well +set(RunCMake_TEST_OPTIONS -Wdev) +run_cmake(Wdeprecated) +unset(RunCMake_TEST_OPTIONS) + +# -Werror=dev should enable deprecated errors as well +set(RunCMake_TEST_OPTIONS -Werror=dev) +run_cmake(Werror_deprecated) +unset(RunCMake_TEST_OPTIONS) + +set(RunCMake_TEST_OPTIONS -Wdeprecated) +run_cmake(Wdeprecated) +unset(RunCMake_TEST_OPTIONS) + +set(RunCMake_TEST_OPTIONS -Wno-deprecated) +run_cmake(Wno-deprecated) +unset(RunCMake_TEST_OPTIONS) + +set(RunCMake_TEST_OPTIONS -Werror=deprecated) +run_cmake(Werror_deprecated) +unset(RunCMake_TEST_OPTIONS) + +set(RunCMake_TEST_OPTIONS -Wno-error=deprecated) +run_cmake(Wno-error_deprecated) +unset(RunCMake_TEST_OPTIONS) + +# Dev warnings should be on by default +run_cmake(Wdev) + +# Deprecated warnings should be on by default +run_cmake(Wdeprecated) + +# Conflicting -W options should honor the last value +set(RunCMake_TEST_OPTIONS -Wno-dev -Wdev) +run_cmake(Wdev) +unset(RunCMake_TEST_OPTIONS) +set(RunCMake_TEST_OPTIONS -Wdev -Wno-dev) +run_cmake(Wno-dev) +unset(RunCMake_TEST_OPTIONS) + +run_cmake_command(W_bad-arg1 ${CMAKE_COMMAND} -W) +run_cmake_command(W_bad-arg2 ${CMAKE_COMMAND} -Wno-) +run_cmake_command(W_bad-arg3 ${CMAKE_COMMAND} -Werror=) + +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 --trace-expand) +run_cmake(trace-expand) +unset(RunCMake_TEST_OPTIONS) + +set(RunCMake_TEST_OPTIONS --trace-source=trace-only-this-file.cmake) +run_cmake(trace-source) +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() + +function(reject_fifo) + find_program(BASH_EXECUTABLE bash) + if(BASH_EXECUTABLE) + set(BASH_COMMAND_ARGUMENT "'${CMAKE_COMMAND}' -P <(echo 'return()')") + run_cmake_command(reject_fifo ${BASH_EXECUTABLE} -c ${BASH_COMMAND_ARGUMENT}) + endif() +endfunction() +if(CMAKE_HOST_UNIX AND NOT CMAKE_SYSTEM_NAME STREQUAL "CYGWIN") + reject_fifo() +endif() 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/W_bad-arg1-result.txt b/Tests/RunCMake/CommandLine/W_bad-arg1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/W_bad-arg1-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt b/Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt new file mode 100644 index 0000000..0c0f613 --- /dev/null +++ b/Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt @@ -0,0 +1,2 @@ +CMake Error: -W must be followed with \[no-\]<name>. +CMake Error: Problem processing arguments. Aborting. diff --git a/Tests/RunCMake/CommandLine/W_bad-arg2-result.txt b/Tests/RunCMake/CommandLine/W_bad-arg2-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/W_bad-arg2-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt b/Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt new file mode 100644 index 0000000..cc643df --- /dev/null +++ b/Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt @@ -0,0 +1,2 @@ +CMake Error: No warning name provided. +CMake Error: Problem processing arguments. Aborting. diff --git a/Tests/RunCMake/CommandLine/W_bad-arg3-result.txt b/Tests/RunCMake/CommandLine/W_bad-arg3-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/W_bad-arg3-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/W_bad-arg3-stderr.txt b/Tests/RunCMake/CommandLine/W_bad-arg3-stderr.txt new file mode 100644 index 0000000..cc643df --- /dev/null +++ b/Tests/RunCMake/CommandLine/W_bad-arg3-stderr.txt @@ -0,0 +1,2 @@ +CMake Error: No warning name provided. +CMake Error: Problem processing arguments. Aborting. diff --git a/Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt b/Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt new file mode 100644 index 0000000..e9be1dc --- /dev/null +++ b/Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt @@ -0,0 +1,4 @@ +^CMake Deprecation Warning at Wdeprecated.cmake:1 \(message\): + Some deprecated warning +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/CommandLine/Wdeprecated.cmake b/Tests/RunCMake/CommandLine/Wdeprecated.cmake new file mode 100644 index 0000000..3142b42 --- /dev/null +++ b/Tests/RunCMake/CommandLine/Wdeprecated.cmake @@ -0,0 +1 @@ +message(DEPRECATION "Some deprecated warning") diff --git a/Tests/RunCMake/CommandLine/Wdev-stderr.txt b/Tests/RunCMake/CommandLine/Wdev-stderr.txt new file mode 100644 index 0000000..88cfb3a --- /dev/null +++ b/Tests/RunCMake/CommandLine/Wdev-stderr.txt @@ -0,0 +1,11 @@ +^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. + +CMake Warning \(dev\) at Wdev.cmake:6 \(include\): + include\(\) given empty file name \(ignored\). +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..756f31e --- /dev/null +++ b/Tests/RunCMake/CommandLine/Wdev.cmake @@ -0,0 +1,6 @@ +message(AUTHOR_WARNING "Some author warning") + +# with -Wdev this will also cause an AUTHOR_WARNING message, checks that +# messages issued outside of the message command, by other CMake commands, also +# are affected by -Wdev +include("") diff --git a/Tests/RunCMake/CommandLine/Werror_deprecated-result.txt b/Tests/RunCMake/CommandLine/Werror_deprecated-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/Werror_deprecated-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/Werror_deprecated-stderr.txt b/Tests/RunCMake/CommandLine/Werror_deprecated-stderr.txt new file mode 100644 index 0000000..6acdc73 --- /dev/null +++ b/Tests/RunCMake/CommandLine/Werror_deprecated-stderr.txt @@ -0,0 +1,4 @@ +^CMake Deprecation Error at Werror_deprecated.cmake:1 \(message\): + Some deprecated warning +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/CommandLine/Werror_deprecated.cmake b/Tests/RunCMake/CommandLine/Werror_deprecated.cmake new file mode 100644 index 0000000..3142b42 --- /dev/null +++ b/Tests/RunCMake/CommandLine/Werror_deprecated.cmake @@ -0,0 +1 @@ +message(DEPRECATION "Some deprecated warning") diff --git a/Tests/RunCMake/CommandLine/Werror_dev-result.txt b/Tests/RunCMake/CommandLine/Werror_dev-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/Werror_dev-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/Werror_dev-stderr.txt b/Tests/RunCMake/CommandLine/Werror_dev-stderr.txt new file mode 100644 index 0000000..590ec96 --- /dev/null +++ b/Tests/RunCMake/CommandLine/Werror_dev-stderr.txt @@ -0,0 +1,11 @@ +^CMake Error \(dev\) at Werror_dev.cmake:4 \(include\): + include\(\) given empty file name \(ignored\). +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) +This error is for project developers. Use -Wno-error=dev to suppress it. + +CMake Error \(dev\) at Werror_dev.cmake:7 \(message\): + Some author warning +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) +This error is for project developers. Use -Wno-error=dev to suppress it.$ diff --git a/Tests/RunCMake/CommandLine/Werror_dev.cmake b/Tests/RunCMake/CommandLine/Werror_dev.cmake new file mode 100644 index 0000000..05f333a --- /dev/null +++ b/Tests/RunCMake/CommandLine/Werror_dev.cmake @@ -0,0 +1,7 @@ +# with -Werror=dev this will also cause an (upgraded) AUTHOR_ERROR message, +# checks that messages issued outside of the message command, by other CMake +# commands, also are affected by -Werror=dev +include("") + +# message command sets fatal occurred flag, so run it last +message(AUTHOR_WARNING "Some author warning") diff --git a/Tests/RunCMake/CommandLine/Wno-deprecated.cmake b/Tests/RunCMake/CommandLine/Wno-deprecated.cmake new file mode 100644 index 0000000..3142b42 --- /dev/null +++ b/Tests/RunCMake/CommandLine/Wno-deprecated.cmake @@ -0,0 +1 @@ +message(DEPRECATION "Some deprecated warning") diff --git a/Tests/RunCMake/CommandLine/Wno-dev.cmake b/Tests/RunCMake/CommandLine/Wno-dev.cmake new file mode 100644 index 0000000..802b435 --- /dev/null +++ b/Tests/RunCMake/CommandLine/Wno-dev.cmake @@ -0,0 +1,6 @@ +message(AUTHOR_WARNING "Some author warning") + +# without -Wno-dev this will also cause an AUTHOR_WARNING message, checks that +# messages issued outside of the message command, by other CMake commands, also +# are affected by -Wno-dev +include("") diff --git a/Tests/RunCMake/CommandLine/Wno-error_deprecated-stderr.txt b/Tests/RunCMake/CommandLine/Wno-error_deprecated-stderr.txt new file mode 100644 index 0000000..0ed1698 --- /dev/null +++ b/Tests/RunCMake/CommandLine/Wno-error_deprecated-stderr.txt @@ -0,0 +1,4 @@ +^CMake Deprecation Warning at Wno-error_deprecated.cmake:2 \(message\): + Some deprecated warning +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/CommandLine/Wno-error_deprecated.cmake b/Tests/RunCMake/CommandLine/Wno-error_deprecated.cmake new file mode 100644 index 0000000..676792a --- /dev/null +++ b/Tests/RunCMake/CommandLine/Wno-error_deprecated.cmake @@ -0,0 +1,2 @@ +# This should still produce a warning when -Wno-error=deprecated is specified +message(DEPRECATION "Some deprecated warning") diff --git a/Tests/RunCMake/CommandLine/Wno-error_dev-stderr.txt b/Tests/RunCMake/CommandLine/Wno-error_dev-stderr.txt new file mode 100644 index 0000000..dd22d55 --- /dev/null +++ b/Tests/RunCMake/CommandLine/Wno-error_dev-stderr.txt @@ -0,0 +1,11 @@ +^CMake Warning \(dev\) at Wno-error_dev.cmake:2 \(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. + +CMake Warning \(dev\) at Wno-error_dev.cmake:6 \(include\): + include\(\) given empty file name \(ignored\). +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/Wno-error_dev.cmake b/Tests/RunCMake/CommandLine/Wno-error_dev.cmake new file mode 100644 index 0000000..b700c19 --- /dev/null +++ b/Tests/RunCMake/CommandLine/Wno-error_dev.cmake @@ -0,0 +1,7 @@ +# This should still produce a warning when -Wno-error=dev is specified +message(AUTHOR_WARNING "Some author warning") + +# with -Wno-error=dev this will also cause an AUTHOR_WARNING message, checks +# that messages issued outside of the message command, by other CMake commands, +# also are affected by -Wno-error=dev +include("") diff --git a/Tests/RunCMake/CommandLine/build-bad-dir-result.txt b/Tests/RunCMake/CommandLine/build-bad-dir-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/build-bad-dir-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/build-bad-dir-stderr.txt b/Tests/RunCMake/CommandLine/build-bad-dir-stderr.txt new file mode 100644 index 0000000..d3f3d9c --- /dev/null +++ b/Tests/RunCMake/CommandLine/build-bad-dir-stderr.txt @@ -0,0 +1,2 @@ +^Error: [^ +]+/Tests/RunCMake/CommandLine/build-bad-dir-build/dir-does-not-exist is not a directory$ diff --git a/Tests/RunCMake/CommandLine/build-bad-generator-result.txt b/Tests/RunCMake/CommandLine/build-bad-generator-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/build-bad-generator-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/build-bad-generator-stderr.txt b/Tests/RunCMake/CommandLine/build-bad-generator-stderr.txt new file mode 100644 index 0000000..1103407 --- /dev/null +++ b/Tests/RunCMake/CommandLine/build-bad-generator-stderr.txt @@ -0,0 +1 @@ +^Error: could create CMAKE_GENERATOR "Bad Generator"$ diff --git a/Tests/RunCMake/CommandLine/build-no-cache-result.txt b/Tests/RunCMake/CommandLine/build-no-cache-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/build-no-cache-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/build-no-cache-stderr.txt b/Tests/RunCMake/CommandLine/build-no-cache-stderr.txt new file mode 100644 index 0000000..40dd3c0 --- /dev/null +++ b/Tests/RunCMake/CommandLine/build-no-cache-stderr.txt @@ -0,0 +1 @@ +^Error: could not load cache$ diff --git a/Tests/RunCMake/CommandLine/build-no-dir-result.txt b/Tests/RunCMake/CommandLine/build-no-dir-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/build-no-dir-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/build-no-dir-stderr.txt b/Tests/RunCMake/CommandLine/build-no-dir-stderr.txt new file mode 100644 index 0000000..8d518f6 --- /dev/null +++ b/Tests/RunCMake/CommandLine/build-no-dir-stderr.txt @@ -0,0 +1 @@ +^Usage: cmake --build <dir> \[options\] \[-- \[native-options\]\] diff --git a/Tests/RunCMake/CommandLine/build-no-generator-result.txt b/Tests/RunCMake/CommandLine/build-no-generator-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/build-no-generator-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/build-no-generator-stderr.txt b/Tests/RunCMake/CommandLine/build-no-generator-stderr.txt new file mode 100644 index 0000000..40ad030 --- /dev/null +++ b/Tests/RunCMake/CommandLine/build-no-generator-stderr.txt @@ -0,0 +1 @@ +^Error: could not find CMAKE_GENERATOR in Cache$ diff --git a/Tests/RunCMake/CommandLine/cache-bad-entry-result.txt b/Tests/RunCMake/CommandLine/cache-bad-entry-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/cache-bad-entry-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/cache-bad-entry-stderr.txt b/Tests/RunCMake/CommandLine/cache-bad-entry-stderr.txt new file mode 100644 index 0000000..150d2ca --- /dev/null +++ b/Tests/RunCMake/CommandLine/cache-bad-entry-stderr.txt @@ -0,0 +1 @@ +^CMake Error: Parse error in cache file .*/Tests/RunCMake/CommandLine/cache-bad-entry/CMakeCache.txt on line 7. Offending entry: BAD ENTRY.* diff --git a/Tests/RunCMake/CommandLine/cache-bad-entry/CMakeCache.txt b/Tests/RunCMake/CommandLine/cache-bad-entry/CMakeCache.txt new file mode 100644 index 0000000..75cd7c2 --- /dev/null +++ b/Tests/RunCMake/CommandLine/cache-bad-entry/CMakeCache.txt @@ -0,0 +1,10 @@ +# This is a comment + +// That was an empty line. This isn't. +EMPTY_LINE:BOOL=FALSE + +// Uhoh! Here it comes +BAD ENTRY + +// This is fine +GOOD_ENTRY:BOOL=TRUE diff --git a/Tests/RunCMake/CommandLine/cache-bad-generator/CMakeCache.txt b/Tests/RunCMake/CommandLine/cache-bad-generator/CMakeCache.txt new file mode 100644 index 0000000..e34af44 --- /dev/null +++ b/Tests/RunCMake/CommandLine/cache-bad-generator/CMakeCache.txt @@ -0,0 +1 @@ +CMAKE_GENERATOR:INTERNAL=Bad Generator diff --git a/Tests/RunCMake/CommandLine/cache-empty-entry-result.txt b/Tests/RunCMake/CommandLine/cache-empty-entry-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/cache-empty-entry-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/cache-empty-entry-stderr.txt b/Tests/RunCMake/CommandLine/cache-empty-entry-stderr.txt new file mode 100644 index 0000000..54f4452 --- /dev/null +++ b/Tests/RunCMake/CommandLine/cache-empty-entry-stderr.txt @@ -0,0 +1 @@ +^CMake Error: Parse error in cache file .*/Tests/RunCMake/CommandLine/cache-empty-entry/CMakeCache.txt on line 5. Offending entry:.* diff --git a/Tests/RunCMake/CommandLine/cache-empty-entry/CMakeCache.txt b/Tests/RunCMake/CommandLine/cache-empty-entry/CMakeCache.txt new file mode 100644 index 0000000..44da1c9 --- /dev/null +++ b/Tests/RunCMake/CommandLine/cache-empty-entry/CMakeCache.txt @@ -0,0 +1,7 @@ +// This is valid +VALID:BOOL=TRUE + +// This isn't + +// One final entry +FINAL:BOOL=TRUE 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/cache-no-generator/CMakeCache.txt b/Tests/RunCMake/CommandLine/cache-no-generator/CMakeCache.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CommandLine/cache-no-generator/CMakeCache.txt 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/.gitattributes b/Tests/RunCMake/CommandLine/cmake_depends/.gitattributes new file mode 100644 index 0000000..9c22288 --- /dev/null +++ b/Tests/RunCMake/CommandLine/cmake_depends/.gitattributes @@ -0,0 +1,2 @@ +# Do not format a source encoded in UTF-16. +test_UTF-16LE.h -format.clang-format 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..c2db61c --- /dev/null +++ b/Tests/RunCMake/CommandLine/cmake_depends/test.h @@ -0,0 +1,3 @@ +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 Binary files differnew file mode 100644 index 0000000..bf56ec6 --- /dev/null +++ b/Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h diff --git a/Tests/RunCMake/CommandLine/copy_input/d1/d1.txt b/Tests/RunCMake/CommandLine/copy_input/d1/d1.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CommandLine/copy_input/d1/d1.txt diff --git a/Tests/RunCMake/CommandLine/copy_input/d2/d2.txt b/Tests/RunCMake/CommandLine/copy_input/d2/d2.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CommandLine/copy_input/d2/d2.txt diff --git a/Tests/RunCMake/CommandLine/copy_input/d3/d3.txt b/Tests/RunCMake/CommandLine/copy_input/d3/d3.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CommandLine/copy_input/d3/d3.txt diff --git a/Tests/RunCMake/CommandLine/copy_input/f1.txt b/Tests/RunCMake/CommandLine/copy_input/f1.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CommandLine/copy_input/f1.txt diff --git a/Tests/RunCMake/CommandLine/copy_input/f2.txt b/Tests/RunCMake/CommandLine/copy_input/f2.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CommandLine/copy_input/f2.txt diff --git a/Tests/RunCMake/CommandLine/copy_input/f3.txt b/Tests/RunCMake/CommandLine/copy_input/f3.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CommandLine/copy_input/f3.txt 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/reject_fifo-result.txt b/Tests/RunCMake/CommandLine/reject_fifo-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/reject_fifo-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/reject_fifo-stderr.txt b/Tests/RunCMake/CommandLine/reject_fifo-stderr.txt new file mode 100644 index 0000000..7a335c3 --- /dev/null +++ b/Tests/RunCMake/CommandLine/reject_fifo-stderr.txt @@ -0,0 +1,2 @@ +CMake Error in .* + Error while reading Byte-Order-Mark\. File not seekable\? diff --git a/Tests/RunCMake/CommandLine/trace-expand-stderr.txt b/Tests/RunCMake/CommandLine/trace-expand-stderr.txt new file mode 100644 index 0000000..4fee9bc --- /dev/null +++ b/Tests/RunCMake/CommandLine/trace-expand-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\(trace-expand NONE \) diff --git a/Tests/RunCMake/CommandLine/trace-expand.cmake b/Tests/RunCMake/CommandLine/trace-expand.cmake new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/CommandLine/trace-expand.cmake diff --git a/Tests/RunCMake/CommandLine/trace-only-this-file.cmake b/Tests/RunCMake/CommandLine/trace-only-this-file.cmake new file mode 100644 index 0000000..1450271 --- /dev/null +++ b/Tests/RunCMake/CommandLine/trace-only-this-file.cmake @@ -0,0 +1 @@ +message(STATUS "trace particular file test passed") diff --git a/Tests/RunCMake/CommandLine/trace-source-stderr.txt b/Tests/RunCMake/CommandLine/trace-source-stderr.txt new file mode 100644 index 0000000..dc90c65 --- /dev/null +++ b/Tests/RunCMake/CommandLine/trace-source-stderr.txt @@ -0,0 +1 @@ +^.*/trace-only-this-file.cmake\(1\): message\(STATUS trace particular file test passed \)$ diff --git a/Tests/RunCMake/CommandLine/trace-source.cmake b/Tests/RunCMake/CommandLine/trace-source.cmake new file mode 100644 index 0000000..5ac2d9d --- /dev/null +++ b/Tests/RunCMake/CommandLine/trace-source.cmake @@ -0,0 +1,3 @@ +message(STATUS "before include()") +include("trace-only-this-file.cmake") +message(STATUS "after include()") 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 |