From 1b97f8f35c730395ef8c7e830d00294ff122b739 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 2 Mar 2022 10:26:11 -0500 Subject: Tests: Clarify RunCMake.CommandLine ExplicitDirs case names --- .../RunCMake/CommandLine/B-S-extra-path-stderr.txt | 4 -- Tests/RunCMake/CommandLine/B-no-arg-result.txt | 1 - Tests/RunCMake/CommandLine/B-no-arg-stderr.txt | 1 - Tests/RunCMake/CommandLine/B-no-arg2-result.txt | 1 - Tests/RunCMake/CommandLine/B-no-arg2-stderr.txt | 1 - Tests/RunCMake/CommandLine/B-no-arg3-result.txt | 1 - Tests/RunCMake/CommandLine/B-no-arg3-stderr.txt | 1 - .../RunCMake/CommandLine/C_buildsrcdir-stderr.txt | 8 --- .../RunCMake/CommandLine/C_buildsrcdir-stdout.txt | 2 - Tests/RunCMake/CommandLine/C_buildsrcdir.cmake | 0 .../ExplicitDirs-B-S-extra-path-stderr.txt | 4 ++ .../CommandLine/ExplicitDirs-B-no-arg-result.txt | 1 + .../CommandLine/ExplicitDirs-B-no-arg-stderr.txt | 1 + .../CommandLine/ExplicitDirs-B-no-arg2-result.txt | 1 + .../CommandLine/ExplicitDirs-B-no-arg2-stderr.txt | 1 + .../CommandLine/ExplicitDirs-B-no-arg3-result.txt | 1 + .../CommandLine/ExplicitDirs-B-no-arg3-stderr.txt | 1 + .../ExplicitDirs-C_buildsrcdir-stderr.txt | 8 +++ .../ExplicitDirs-C_buildsrcdir-stdout.txt | 2 + .../CommandLine/ExplicitDirs-C_buildsrcdir.cmake | 0 .../ExplicitDirs-S-B-extra-path-stderr.txt | 4 ++ .../ExplicitDirs-S-B-non-path-stderr.txt | 2 + .../ExplicitDirs-S-B-non-path2-stderr.txt | 2 + .../ExplicitDirs-S-S-Sdiffers-stderr.txt | 9 ++++ .../ExplicitDirs-S-S-Simplicit-stderr.txt | 9 ++++ .../ExplicitDirs-S-S-differs-stderr.txt | 4 ++ .../ExplicitDirs-S-implicit-differs-stderr.txt | 4 ++ .../ExplicitDirs-S-implicit-differs2-stderr.txt | 4 ++ .../ExplicitDirs-S-implicit-differs3-stderr.txt | 4 ++ .../CommandLine/ExplicitDirs-S-no-arg-result.txt | 1 + .../CommandLine/ExplicitDirs-S-no-arg-stderr.txt | 1 + .../CommandLine/ExplicitDirs-S-no-arg2-result.txt | 1 + .../CommandLine/ExplicitDirs-S-no-arg2-stderr.txt | 1 + .../CommandLine/ExplicitDirs-S-no-arg3-result.txt | 1 + .../CommandLine/ExplicitDirs-S-no-arg3-stderr.txt | 1 + .../CommandLine/ExplicitDirs-no-S-B-stderr.txt | 4 ++ Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 60 +++++++++++----------- .../RunCMake/CommandLine/S-B-extra-path-stderr.txt | 4 -- Tests/RunCMake/CommandLine/S-B-non-path-stderr.txt | 2 - .../RunCMake/CommandLine/S-B-non-path2-stderr.txt | 2 - Tests/RunCMake/CommandLine/S-S-Sdiffers-stderr.txt | 9 ---- .../RunCMake/CommandLine/S-S-Simplicit-stderr.txt | 9 ---- Tests/RunCMake/CommandLine/S-S-differs-stderr.txt | 4 -- .../CommandLine/S-implicit-differs-stderr.txt | 4 -- .../CommandLine/S-implicit-differs2-stderr.txt | 4 -- .../CommandLine/S-implicit-differs3-stderr.txt | 4 -- Tests/RunCMake/CommandLine/S-no-arg-result.txt | 1 - Tests/RunCMake/CommandLine/S-no-arg-stderr.txt | 1 - Tests/RunCMake/CommandLine/S-no-arg2-result.txt | 1 - Tests/RunCMake/CommandLine/S-no-arg2-stderr.txt | 1 - Tests/RunCMake/CommandLine/S-no-arg3-result.txt | 1 - Tests/RunCMake/CommandLine/S-no-arg3-stderr.txt | 1 - Tests/RunCMake/CommandLine/no-S-B-stderr.txt | 4 -- 53 files changed, 102 insertions(+), 102 deletions(-) delete mode 100644 Tests/RunCMake/CommandLine/B-S-extra-path-stderr.txt delete mode 100644 Tests/RunCMake/CommandLine/B-no-arg-result.txt delete mode 100644 Tests/RunCMake/CommandLine/B-no-arg-stderr.txt delete mode 100644 Tests/RunCMake/CommandLine/B-no-arg2-result.txt delete mode 100644 Tests/RunCMake/CommandLine/B-no-arg2-stderr.txt delete mode 100644 Tests/RunCMake/CommandLine/B-no-arg3-result.txt delete mode 100644 Tests/RunCMake/CommandLine/B-no-arg3-stderr.txt delete mode 100644 Tests/RunCMake/CommandLine/C_buildsrcdir-stderr.txt delete mode 100644 Tests/RunCMake/CommandLine/C_buildsrcdir-stdout.txt delete mode 100644 Tests/RunCMake/CommandLine/C_buildsrcdir.cmake create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-B-S-extra-path-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg-result.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg2-result.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg2-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg3-result.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg3-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-C_buildsrcdir-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-C_buildsrcdir-stdout.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-C_buildsrcdir.cmake create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-B-extra-path-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path2-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Sdiffers-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Simplicit-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-S-differs-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs2-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs3-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg-result.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg2-result.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg2-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg3-result.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg3-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-no-S-B-stderr.txt delete mode 100644 Tests/RunCMake/CommandLine/S-B-extra-path-stderr.txt delete mode 100644 Tests/RunCMake/CommandLine/S-B-non-path-stderr.txt delete mode 100644 Tests/RunCMake/CommandLine/S-B-non-path2-stderr.txt delete mode 100644 Tests/RunCMake/CommandLine/S-S-Sdiffers-stderr.txt delete mode 100644 Tests/RunCMake/CommandLine/S-S-Simplicit-stderr.txt delete mode 100644 Tests/RunCMake/CommandLine/S-S-differs-stderr.txt delete mode 100644 Tests/RunCMake/CommandLine/S-implicit-differs-stderr.txt delete mode 100644 Tests/RunCMake/CommandLine/S-implicit-differs2-stderr.txt delete mode 100644 Tests/RunCMake/CommandLine/S-implicit-differs3-stderr.txt delete mode 100644 Tests/RunCMake/CommandLine/S-no-arg-result.txt delete mode 100644 Tests/RunCMake/CommandLine/S-no-arg-stderr.txt delete mode 100644 Tests/RunCMake/CommandLine/S-no-arg2-result.txt delete mode 100644 Tests/RunCMake/CommandLine/S-no-arg2-stderr.txt delete mode 100644 Tests/RunCMake/CommandLine/S-no-arg3-result.txt delete mode 100644 Tests/RunCMake/CommandLine/S-no-arg3-stderr.txt delete mode 100644 Tests/RunCMake/CommandLine/no-S-B-stderr.txt diff --git a/Tests/RunCMake/CommandLine/B-S-extra-path-stderr.txt b/Tests/RunCMake/CommandLine/B-S-extra-path-stderr.txt deleted file mode 100644 index e168a1b..0000000 --- a/Tests/RunCMake/CommandLine/B-S-extra-path-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -^CMake Warning: - Ignoring extra path from command line: - - "/extra/path/"$ diff --git a/Tests/RunCMake/CommandLine/B-no-arg-result.txt b/Tests/RunCMake/CommandLine/B-no-arg-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/CommandLine/B-no-arg-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/CommandLine/B-no-arg-stderr.txt b/Tests/RunCMake/CommandLine/B-no-arg-stderr.txt deleted file mode 100644 index 2309c5e..0000000 --- a/Tests/RunCMake/CommandLine/B-no-arg-stderr.txt +++ /dev/null @@ -1 +0,0 @@ -CMake Error: No build directory specified for -B diff --git a/Tests/RunCMake/CommandLine/B-no-arg2-result.txt b/Tests/RunCMake/CommandLine/B-no-arg2-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/CommandLine/B-no-arg2-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/CommandLine/B-no-arg2-stderr.txt b/Tests/RunCMake/CommandLine/B-no-arg2-stderr.txt deleted file mode 100644 index 2309c5e..0000000 --- a/Tests/RunCMake/CommandLine/B-no-arg2-stderr.txt +++ /dev/null @@ -1 +0,0 @@ -CMake Error: No build directory specified for -B diff --git a/Tests/RunCMake/CommandLine/B-no-arg3-result.txt b/Tests/RunCMake/CommandLine/B-no-arg3-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/CommandLine/B-no-arg3-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/CommandLine/B-no-arg3-stderr.txt b/Tests/RunCMake/CommandLine/B-no-arg3-stderr.txt deleted file mode 100644 index cf63fdd..0000000 --- a/Tests/RunCMake/CommandLine/B-no-arg3-stderr.txt +++ /dev/null @@ -1 +0,0 @@ -^CMake Error: No build directory specified for -B diff --git a/Tests/RunCMake/CommandLine/C_buildsrcdir-stderr.txt b/Tests/RunCMake/CommandLine/C_buildsrcdir-stderr.txt deleted file mode 100644 index 4720a6f..0000000 --- a/Tests/RunCMake/CommandLine/C_buildsrcdir-stderr.txt +++ /dev/null @@ -1,8 +0,0 @@ -initial-cache.txt: CMAKE_SOURCE_DIR: .*/C_buildsrcdir/src -initial-cache.txt: CMAKE_BINARY_DIR: .*/ExplicitDirs-build/DummyBuildDir -PreLoad.cmake: CMAKE_SOURCE_DIR: .*/C_buildsrcdir/src -PreLoad.cmake: CMAKE_BINARY_DIR: .*/ExplicitDirs-build/DummyBuildDir -CMakeLists.txt: INITIAL_SOURCE_DIR: .*/C_buildsrcdir/src -CMakeLists.txt: INITIAL_BINARY_DIR: .*/ExplicitDirs-build/DummyBuildDir -CMakeLists.txt: PRELOAD_SOURCE_DIR: .*/C_buildsrcdir/src -CMakeLists.txt: PRELOAD_BINARY_DIR: .*/ExplicitDirs-build/DummyBuildDir diff --git a/Tests/RunCMake/CommandLine/C_buildsrcdir-stdout.txt b/Tests/RunCMake/CommandLine/C_buildsrcdir-stdout.txt deleted file mode 100644 index 862cfeb..0000000 --- a/Tests/RunCMake/CommandLine/C_buildsrcdir-stdout.txt +++ /dev/null @@ -1,2 +0,0 @@ -loading initial cache file .*initial-cache.txt -.* diff --git a/Tests/RunCMake/CommandLine/C_buildsrcdir.cmake b/Tests/RunCMake/CommandLine/C_buildsrcdir.cmake deleted file mode 100644 index e69de29..0000000 diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-B-S-extra-path-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-B-S-extra-path-stderr.txt new file mode 100644 index 0000000..e168a1b --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-B-S-extra-path-stderr.txt @@ -0,0 +1,4 @@ +^CMake Warning: + Ignoring extra path from command line: + + "/extra/path/"$ diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg-result.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg-stderr.txt new file mode 100644 index 0000000..2309c5e --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg-stderr.txt @@ -0,0 +1 @@ +CMake Error: No build directory specified for -B diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg2-result.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg2-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg2-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg2-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg2-stderr.txt new file mode 100644 index 0000000..2309c5e --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg2-stderr.txt @@ -0,0 +1 @@ +CMake Error: No build directory specified for -B diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg3-result.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg3-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg3-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg3-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg3-stderr.txt new file mode 100644 index 0000000..cf63fdd --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-B-no-arg3-stderr.txt @@ -0,0 +1 @@ +^CMake Error: No build directory specified for -B diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-C_buildsrcdir-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-C_buildsrcdir-stderr.txt new file mode 100644 index 0000000..4720a6f --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-C_buildsrcdir-stderr.txt @@ -0,0 +1,8 @@ +initial-cache.txt: CMAKE_SOURCE_DIR: .*/C_buildsrcdir/src +initial-cache.txt: CMAKE_BINARY_DIR: .*/ExplicitDirs-build/DummyBuildDir +PreLoad.cmake: CMAKE_SOURCE_DIR: .*/C_buildsrcdir/src +PreLoad.cmake: CMAKE_BINARY_DIR: .*/ExplicitDirs-build/DummyBuildDir +CMakeLists.txt: INITIAL_SOURCE_DIR: .*/C_buildsrcdir/src +CMakeLists.txt: INITIAL_BINARY_DIR: .*/ExplicitDirs-build/DummyBuildDir +CMakeLists.txt: PRELOAD_SOURCE_DIR: .*/C_buildsrcdir/src +CMakeLists.txt: PRELOAD_BINARY_DIR: .*/ExplicitDirs-build/DummyBuildDir diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-C_buildsrcdir-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-C_buildsrcdir-stdout.txt new file mode 100644 index 0000000..862cfeb --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-C_buildsrcdir-stdout.txt @@ -0,0 +1,2 @@ +loading initial cache file .*initial-cache.txt +.* diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-C_buildsrcdir.cmake b/Tests/RunCMake/CommandLine/ExplicitDirs-C_buildsrcdir.cmake new file mode 100644 index 0000000..e69de29 diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-extra-path-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-extra-path-stderr.txt new file mode 100644 index 0000000..e168a1b --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-extra-path-stderr.txt @@ -0,0 +1,4 @@ +^CMake Warning: + Ignoring extra path from command line: + + "/extra/path/"$ diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path-stderr.txt new file mode 100644 index 0000000..6fa4341 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path-stderr.txt @@ -0,0 +1,2 @@ +^CMake Warning: + Ignoring empty string \(""\) provided on the command line\.$ diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path2-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path2-stderr.txt new file mode 100644 index 0000000..6fa4341 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path2-stderr.txt @@ -0,0 +1,2 @@ +^CMake Warning: + Ignoring empty string \(""\) provided on the command line\.$ diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Sdiffers-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Sdiffers-stderr.txt new file mode 100644 index 0000000..43869db --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Sdiffers-stderr.txt @@ -0,0 +1,9 @@ +^CMake Warning: + Ignoring extra path from command line: + + .*other_dir1" +.* +CMake Warning: + Ignoring extra path from command line: + + .*other_dir2"$ diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Simplicit-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Simplicit-stderr.txt new file mode 100644 index 0000000..43869db --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Simplicit-stderr.txt @@ -0,0 +1,9 @@ +^CMake Warning: + Ignoring extra path from command line: + + .*other_dir1" +.* +CMake Warning: + Ignoring extra path from command line: + + .*other_dir2"$ diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-differs-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-differs-stderr.txt new file mode 100644 index 0000000..5714130 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-differs-stderr.txt @@ -0,0 +1,4 @@ +^CMake Warning: + Ignoring extra path from command line: + + .*ExplicitDirs-build/other_dir.* diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs-stderr.txt new file mode 100644 index 0000000..18f0d16 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs-stderr.txt @@ -0,0 +1,4 @@ +^CMake Warning: + Ignoring extra path from command line: + + .*other_dir"$ diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs2-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs2-stderr.txt new file mode 100644 index 0000000..5714130 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs2-stderr.txt @@ -0,0 +1,4 @@ +^CMake Warning: + Ignoring extra path from command line: + + .*ExplicitDirs-build/other_dir.* diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs3-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs3-stderr.txt new file mode 100644 index 0000000..5714130 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs3-stderr.txt @@ -0,0 +1,4 @@ +^CMake Warning: + Ignoring extra path from command line: + + .*ExplicitDirs-build/other_dir.* diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg-result.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg-stderr.txt new file mode 100644 index 0000000..d1a2ce3 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg-stderr.txt @@ -0,0 +1 @@ +CMake Error: No source directory specified for -S diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg2-result.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg2-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg2-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg2-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg2-stderr.txt new file mode 100644 index 0000000..d1a2ce3 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg2-stderr.txt @@ -0,0 +1 @@ +CMake Error: No source directory specified for -S diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg3-result.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg3-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg3-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg3-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg3-stderr.txt new file mode 100644 index 0000000..d4fe65e --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-no-arg3-stderr.txt @@ -0,0 +1 @@ +^CMake Error: No source directory specified for -S diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-no-S-B-stderr.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-no-S-B-stderr.txt new file mode 100644 index 0000000..c166dcf --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-no-S-B-stderr.txt @@ -0,0 +1,4 @@ +CMake Warning: + No source or binary directory provided. Both will be assumed to be the + same as the current working directory, but note that this warning will + become a fatal error in future CMake releases. diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 17adefd..727373a 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -132,7 +132,7 @@ project(ExplicitDirsMissing LANGUAGES NONE) ]=]) set(RunCMake_TEST_SOURCE_DIR "${source_dir}") set(RunCMake_TEST_BINARY_DIR "${source_dir}") - run_cmake_with_options(no-S-B -DFOO=BAR) + run_cmake_with_options(ExplicitDirs-no-S-B -DFOO=BAR) file(WRITE ${source_dir}/CMakeLists.txt [=[ cmake_minimum_required(VERSION 3.13) @@ -144,12 +144,12 @@ endif() file(REMOVE_RECURSE "${source_dir}/build") # Test with a setup where binary_dir won't be created by `run_cmake_with_options` - run_cmake_with_options(S-arg-build-dir-not-created -S ${source_dir} build/) - run_cmake_with_options(S-arg-reverse-build-dir-not-created build/ -S${source_dir} ) + run_cmake_with_options(ExplicitDirs-S-arg-build-dir-not-created -S ${source_dir} build/) + run_cmake_with_options(ExplicitDirs-S-arg-reverse-build-dir-not-created build/ -S${source_dir} ) file(REMOVE_RECURSE "${source_dir}/build") file(MAKE_DIRECTORY "${source_dir}/build") - run_cmake_with_options(S-arg-build-dir-empty -S ${source_dir} build/) + run_cmake_with_options(ExplicitDirs-S-arg-build-dir-empty -S ${source_dir} build/) set(source_dir ${RunCMake_SOURCE_DIR}/ExplicitDirs) set(binary_dir ${RunCMake_BINARY_DIR}/ExplicitDirs-build) @@ -158,48 +158,48 @@ endif() set(RunCMake_TEST_BINARY_DIR "${binary_dir}") file(REMOVE_RECURSE "${binary_dir}") - run_cmake_with_options(S-arg -S ${source_dir} ${binary_dir}) - run_cmake_with_options(S-arg-reverse-order ${binary_dir} -S${source_dir} ) - run_cmake_with_options(S-no-arg -S ) - run_cmake_with_options(S-no-arg2 -S -T) - run_cmake_with_raw_args(S-no-arg3 [[-S ""]]) - run_cmake_with_options(S-B -S ${source_dir} -B ${binary_dir}) - run_cmake_with_options(S-B-extra-path -S ${source_dir} -B ${binary_dir} /extra/path/) - run_cmake_with_raw_args(S-B-non-path "-S \"${source_dir}\" -B \"${binary_dir}\" \"\"") - run_cmake_with_raw_args(S-B-non-path2 "-S \"${source_dir}\" \"\" -B \"${binary_dir}\"") + run_cmake_with_options(ExplicitDirs-S-arg -S ${source_dir} ${binary_dir}) + run_cmake_with_options(ExplicitDirs-S-arg-reverse-order ${binary_dir} -S${source_dir} ) + run_cmake_with_options(ExplicitDirs-S-no-arg -S ) + run_cmake_with_options(ExplicitDirs-S-no-arg2 -S -T) + run_cmake_with_raw_args(ExplicitDirs-S-no-arg3 [[-S ""]]) + run_cmake_with_options(ExplicitDirs-S-B -S ${source_dir} -B ${binary_dir}) + run_cmake_with_options(ExplicitDirs-S-B-extra-path -S ${source_dir} -B ${binary_dir} /extra/path/) + run_cmake_with_raw_args(ExplicitDirs-S-B-non-path "-S \"${source_dir}\" -B \"${binary_dir}\" \"\"") + run_cmake_with_raw_args(ExplicitDirs-S-B-non-path2 "-S \"${source_dir}\" \"\" -B \"${binary_dir}\"") file(REMOVE_RECURSE "${binary_dir}/other_dir") file(MAKE_DIRECTORY "${binary_dir}/other_dir") file(WRITE "${binary_dir}/other_dir/CMakeLists.txt" [=[ ]=]) - run_cmake_with_options(S-S-same -S ${source_dir} -S ${source_dir} -B ${binary_dir}) - run_cmake_with_options(S-S-differs -S ${binary_dir}/other_dir -S ${source_dir} -B ${binary_dir}) - run_cmake_with_options(S-implicit-same -S ${source_dir} ${source_dir} -B ${binary_dir}) - run_cmake_with_options(S-implicit-differs -S ${source_dir} ${binary_dir}/other_dir -B ${binary_dir}) - run_cmake_with_options(S-implicit-differs2 ${binary_dir}/other_dir -S ${source_dir} -B ${binary_dir}) - run_cmake_with_options(S-implicit-differs3 ${binary_dir}/other_dir ${source_dir} -B ${binary_dir}) - run_cmake_with_options(S-S-Sdiffers -S ${binary_dir}/other_dir1 -S ${binary_dir}/other_dir2 -S ${source_dir} -B ${binary_dir}) - run_cmake_with_options(S-S-Simplicit ${binary_dir}/other_dir1 ${binary_dir}/other_dir2 ${source_dir} -B ${binary_dir}) + run_cmake_with_options(ExplicitDirs-S-S-same -S ${source_dir} -S ${source_dir} -B ${binary_dir}) + run_cmake_with_options(ExplicitDirs-S-S-differs -S ${binary_dir}/other_dir -S ${source_dir} -B ${binary_dir}) + run_cmake_with_options(ExplicitDirs-S-implicit-same -S ${source_dir} ${source_dir} -B ${binary_dir}) + run_cmake_with_options(ExplicitDirs-S-implicit-differs -S ${source_dir} ${binary_dir}/other_dir -B ${binary_dir}) + run_cmake_with_options(ExplicitDirs-S-implicit-differs2 ${binary_dir}/other_dir -S ${source_dir} -B ${binary_dir}) + run_cmake_with_options(ExplicitDirs-S-implicit-differs3 ${binary_dir}/other_dir ${source_dir} -B ${binary_dir}) + run_cmake_with_options(ExplicitDirs-S-S-Sdiffers -S ${binary_dir}/other_dir1 -S ${binary_dir}/other_dir2 -S ${source_dir} -B ${binary_dir}) + run_cmake_with_options(ExplicitDirs-S-S-Simplicit ${binary_dir}/other_dir1 ${binary_dir}/other_dir2 ${source_dir} -B ${binary_dir}) # make sure that -B can explicitly construct build directories file(REMOVE_RECURSE "${binary_dir}") - run_cmake_with_options(B-arg -B ${binary_dir} ${source_dir}) + run_cmake_with_options(ExplicitDirs-B-arg -B ${binary_dir} ${source_dir}) file(REMOVE_RECURSE "${binary_dir}") - run_cmake_with_options(B-arg-reverse-order ${source_dir} -B${binary_dir}) - run_cmake_with_options(B-no-arg -B ) - run_cmake_with_options(B-no-arg2 -B -T) - run_cmake_with_raw_args(B-no-arg3 [[-B ""]]) + run_cmake_with_options(ExplicitDirs-B-arg-reverse-order ${source_dir} -B${binary_dir}) + run_cmake_with_options(ExplicitDirs-B-no-arg -B ) + run_cmake_with_options(ExplicitDirs-B-no-arg2 -B -T) + run_cmake_with_raw_args(ExplicitDirs-B-no-arg3 [[-B ""]]) file(REMOVE_RECURSE "${binary_dir}") - run_cmake_with_options(B-S -B${binary_dir} -S${source_dir}) - run_cmake_with_options(B-S-extra-path -B${binary_dir} -S${source_dir} /extra/path/) + run_cmake_with_options(ExplicitDirs-B-S -B${binary_dir} -S${source_dir}) + run_cmake_with_options(ExplicitDirs-B-S-extra-path -B${binary_dir} -S${source_dir} /extra/path/) message("copied to ${RunCMake_TEST_BINARY_DIR}/initial-cache.txt") file(COPY ${RunCMake_SOURCE_DIR}/C_buildsrcdir/initial-cache.txt DESTINATION ${RunCMake_TEST_BINARY_DIR}) # CMAKE_BINARY_DIR should be determined by -B if specified, and CMAKE_SOURCE_DIR determined by -S if specified. # Path to initial-cache.txt is relative to the $PWD, which is normally set to ${RunCMake_TEST_BINARY_DIR}. - run_cmake_with_options(C_buildsrcdir -B DummyBuildDir -S ${RunCMake_SOURCE_DIR}/C_buildsrcdir/src -C initial-cache.txt) + run_cmake_with_options(ExplicitDirs-C_buildsrcdir -B DummyBuildDir -S ${RunCMake_SOURCE_DIR}/C_buildsrcdir/src -C initial-cache.txt) # Test that full path works, too. - run_cmake_with_options(C_buildsrcdir -B DummyBuildDir -S ${RunCMake_SOURCE_DIR}/C_buildsrcdir/src -C ${RunCMake_TEST_BINARY_DIR}/initial-cache.txt) + run_cmake_with_options(ExplicitDirs-C_buildsrcdir -B DummyBuildDir -S ${RunCMake_SOURCE_DIR}/C_buildsrcdir/src -C ${RunCMake_TEST_BINARY_DIR}/initial-cache.txt) endfunction() run_ExplicitDirs() diff --git a/Tests/RunCMake/CommandLine/S-B-extra-path-stderr.txt b/Tests/RunCMake/CommandLine/S-B-extra-path-stderr.txt deleted file mode 100644 index e168a1b..0000000 --- a/Tests/RunCMake/CommandLine/S-B-extra-path-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -^CMake Warning: - Ignoring extra path from command line: - - "/extra/path/"$ diff --git a/Tests/RunCMake/CommandLine/S-B-non-path-stderr.txt b/Tests/RunCMake/CommandLine/S-B-non-path-stderr.txt deleted file mode 100644 index 6fa4341..0000000 --- a/Tests/RunCMake/CommandLine/S-B-non-path-stderr.txt +++ /dev/null @@ -1,2 +0,0 @@ -^CMake Warning: - Ignoring empty string \(""\) provided on the command line\.$ diff --git a/Tests/RunCMake/CommandLine/S-B-non-path2-stderr.txt b/Tests/RunCMake/CommandLine/S-B-non-path2-stderr.txt deleted file mode 100644 index 6fa4341..0000000 --- a/Tests/RunCMake/CommandLine/S-B-non-path2-stderr.txt +++ /dev/null @@ -1,2 +0,0 @@ -^CMake Warning: - Ignoring empty string \(""\) provided on the command line\.$ diff --git a/Tests/RunCMake/CommandLine/S-S-Sdiffers-stderr.txt b/Tests/RunCMake/CommandLine/S-S-Sdiffers-stderr.txt deleted file mode 100644 index 43869db..0000000 --- a/Tests/RunCMake/CommandLine/S-S-Sdiffers-stderr.txt +++ /dev/null @@ -1,9 +0,0 @@ -^CMake Warning: - Ignoring extra path from command line: - - .*other_dir1" -.* -CMake Warning: - Ignoring extra path from command line: - - .*other_dir2"$ diff --git a/Tests/RunCMake/CommandLine/S-S-Simplicit-stderr.txt b/Tests/RunCMake/CommandLine/S-S-Simplicit-stderr.txt deleted file mode 100644 index 43869db..0000000 --- a/Tests/RunCMake/CommandLine/S-S-Simplicit-stderr.txt +++ /dev/null @@ -1,9 +0,0 @@ -^CMake Warning: - Ignoring extra path from command line: - - .*other_dir1" -.* -CMake Warning: - Ignoring extra path from command line: - - .*other_dir2"$ diff --git a/Tests/RunCMake/CommandLine/S-S-differs-stderr.txt b/Tests/RunCMake/CommandLine/S-S-differs-stderr.txt deleted file mode 100644 index 5714130..0000000 --- a/Tests/RunCMake/CommandLine/S-S-differs-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -^CMake Warning: - Ignoring extra path from command line: - - .*ExplicitDirs-build/other_dir.* diff --git a/Tests/RunCMake/CommandLine/S-implicit-differs-stderr.txt b/Tests/RunCMake/CommandLine/S-implicit-differs-stderr.txt deleted file mode 100644 index 18f0d16..0000000 --- a/Tests/RunCMake/CommandLine/S-implicit-differs-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -^CMake Warning: - Ignoring extra path from command line: - - .*other_dir"$ diff --git a/Tests/RunCMake/CommandLine/S-implicit-differs2-stderr.txt b/Tests/RunCMake/CommandLine/S-implicit-differs2-stderr.txt deleted file mode 100644 index 5714130..0000000 --- a/Tests/RunCMake/CommandLine/S-implicit-differs2-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -^CMake Warning: - Ignoring extra path from command line: - - .*ExplicitDirs-build/other_dir.* diff --git a/Tests/RunCMake/CommandLine/S-implicit-differs3-stderr.txt b/Tests/RunCMake/CommandLine/S-implicit-differs3-stderr.txt deleted file mode 100644 index 5714130..0000000 --- a/Tests/RunCMake/CommandLine/S-implicit-differs3-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -^CMake Warning: - Ignoring extra path from command line: - - .*ExplicitDirs-build/other_dir.* diff --git a/Tests/RunCMake/CommandLine/S-no-arg-result.txt b/Tests/RunCMake/CommandLine/S-no-arg-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/CommandLine/S-no-arg-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/CommandLine/S-no-arg-stderr.txt b/Tests/RunCMake/CommandLine/S-no-arg-stderr.txt deleted file mode 100644 index d1a2ce3..0000000 --- a/Tests/RunCMake/CommandLine/S-no-arg-stderr.txt +++ /dev/null @@ -1 +0,0 @@ -CMake Error: No source directory specified for -S diff --git a/Tests/RunCMake/CommandLine/S-no-arg2-result.txt b/Tests/RunCMake/CommandLine/S-no-arg2-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/CommandLine/S-no-arg2-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/CommandLine/S-no-arg2-stderr.txt b/Tests/RunCMake/CommandLine/S-no-arg2-stderr.txt deleted file mode 100644 index d1a2ce3..0000000 --- a/Tests/RunCMake/CommandLine/S-no-arg2-stderr.txt +++ /dev/null @@ -1 +0,0 @@ -CMake Error: No source directory specified for -S diff --git a/Tests/RunCMake/CommandLine/S-no-arg3-result.txt b/Tests/RunCMake/CommandLine/S-no-arg3-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/CommandLine/S-no-arg3-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/CommandLine/S-no-arg3-stderr.txt b/Tests/RunCMake/CommandLine/S-no-arg3-stderr.txt deleted file mode 100644 index d4fe65e..0000000 --- a/Tests/RunCMake/CommandLine/S-no-arg3-stderr.txt +++ /dev/null @@ -1 +0,0 @@ -^CMake Error: No source directory specified for -S diff --git a/Tests/RunCMake/CommandLine/no-S-B-stderr.txt b/Tests/RunCMake/CommandLine/no-S-B-stderr.txt deleted file mode 100644 index c166dcf..0000000 --- a/Tests/RunCMake/CommandLine/no-S-B-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Warning: - No source or binary directory provided. Both will be assumed to be the - same as the current working directory, but note that this warning will - become a fatal error in future CMake releases. -- cgit v0.12 From 4091d5c58cb3e300a6301c405d54ca8605db3425 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 2 Mar 2022 10:36:08 -0500 Subject: Tests: Verify RunCMake.CommandLine ExplicitDirs source/build dirs --- Tests/RunCMake/CommandLine/ExplicitDirs-B-S-extra-path-stdout.txt | 2 ++ Tests/RunCMake/CommandLine/ExplicitDirs-B-S-stdout.txt | 2 ++ Tests/RunCMake/CommandLine/ExplicitDirs-B-arg-reverse-order-stdout.txt | 2 ++ Tests/RunCMake/CommandLine/ExplicitDirs-B-arg-stdout.txt | 2 ++ Tests/RunCMake/CommandLine/ExplicitDirs-S-B-extra-path-stdout.txt | 2 ++ Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path-stdout.txt | 2 ++ Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path2-stdout.txt | 2 ++ Tests/RunCMake/CommandLine/ExplicitDirs-S-B-stdout.txt | 2 ++ Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Sdiffers-stdout.txt | 2 ++ Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Simplicit-stdout.txt | 2 ++ Tests/RunCMake/CommandLine/ExplicitDirs-S-S-differs-stdout.txt | 2 ++ Tests/RunCMake/CommandLine/ExplicitDirs-S-S-same-stdout.txt | 2 ++ .../RunCMake/CommandLine/ExplicitDirs-S-arg-build-dir-empty-stdout.txt | 2 ++ .../CommandLine/ExplicitDirs-S-arg-build-dir-not-created-stdout.txt | 2 ++ .../ExplicitDirs-S-arg-reverse-build-dir-not-created-stdout.txt | 2 ++ Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-reverse-order-stdout.txt | 2 ++ Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-stdout.txt | 2 ++ Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs-stdout.txt | 2 ++ Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs2-stdout.txt | 2 ++ Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs3-stdout.txt | 2 ++ Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-same-stdout.txt | 2 ++ Tests/RunCMake/CommandLine/ExplicitDirs/CMakeLists.txt | 3 +++ Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 2 ++ 23 files changed, 47 insertions(+) create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-B-S-extra-path-stdout.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-B-S-stdout.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-B-arg-reverse-order-stdout.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-B-arg-stdout.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-B-extra-path-stdout.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path-stdout.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path2-stdout.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-B-stdout.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Sdiffers-stdout.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Simplicit-stdout.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-S-differs-stdout.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-S-same-stdout.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-build-dir-empty-stdout.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-build-dir-not-created-stdout.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-reverse-build-dir-not-created-stdout.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-reverse-order-stdout.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-stdout.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs-stdout.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs2-stdout.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs3-stdout.txt create mode 100644 Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-same-stdout.txt diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-B-S-extra-path-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-B-S-extra-path-stdout.txt new file mode 100644 index 0000000..618dcd8 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-B-S-extra-path-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs' +-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build' diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-B-S-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-B-S-stdout.txt new file mode 100644 index 0000000..618dcd8 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-B-S-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs' +-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build' diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-B-arg-reverse-order-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-B-arg-reverse-order-stdout.txt new file mode 100644 index 0000000..618dcd8 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-B-arg-reverse-order-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs' +-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build' diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-B-arg-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-B-arg-stdout.txt new file mode 100644 index 0000000..618dcd8 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-B-arg-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs' +-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build' diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-extra-path-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-extra-path-stdout.txt new file mode 100644 index 0000000..618dcd8 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-extra-path-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs' +-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build' diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path-stdout.txt new file mode 100644 index 0000000..618dcd8 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs' +-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build' diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path2-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path2-stdout.txt new file mode 100644 index 0000000..618dcd8 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-non-path2-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs' +-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build' diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-stdout.txt new file mode 100644 index 0000000..618dcd8 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-B-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs' +-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build' diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Sdiffers-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Sdiffers-stdout.txt new file mode 100644 index 0000000..618dcd8 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Sdiffers-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs' +-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build' diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Simplicit-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Simplicit-stdout.txt new file mode 100644 index 0000000..618dcd8 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-Simplicit-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs' +-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build' diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-differs-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-differs-stdout.txt new file mode 100644 index 0000000..618dcd8 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-differs-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs' +-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build' diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-same-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-same-stdout.txt new file mode 100644 index 0000000..618dcd8 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-S-same-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs' +-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build' diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-build-dir-empty-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-build-dir-empty-stdout.txt new file mode 100644 index 0000000..a9be616 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-build-dir-empty-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirsMissing' +-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirsMissing/build' diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-build-dir-not-created-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-build-dir-not-created-stdout.txt new file mode 100644 index 0000000..a9be616 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-build-dir-not-created-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirsMissing' +-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirsMissing/build' diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-reverse-build-dir-not-created-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-reverse-build-dir-not-created-stdout.txt new file mode 100644 index 0000000..a9be616 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-reverse-build-dir-not-created-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirsMissing' +-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirsMissing/build' diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-reverse-order-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-reverse-order-stdout.txt new file mode 100644 index 0000000..618dcd8 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-reverse-order-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs' +-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build' diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-stdout.txt new file mode 100644 index 0000000..618dcd8 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-arg-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs' +-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build' diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs-stdout.txt new file mode 100644 index 0000000..618dcd8 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs' +-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build' diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs2-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs2-stdout.txt new file mode 100644 index 0000000..618dcd8 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs2-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs' +-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build' diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs3-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs3-stdout.txt new file mode 100644 index 0000000..618dcd8 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-differs3-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs' +-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build' diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-same-stdout.txt b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-same-stdout.txt new file mode 100644 index 0000000..618dcd8 --- /dev/null +++ b/Tests/RunCMake/CommandLine/ExplicitDirs-S-implicit-same-stdout.txt @@ -0,0 +1,2 @@ +-- CMAKE_SOURCE_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs' +-- CMAKE_BINARY_DIR='[^']*/Tests/RunCMake/CommandLine/ExplicitDirs-build' diff --git a/Tests/RunCMake/CommandLine/ExplicitDirs/CMakeLists.txt b/Tests/RunCMake/CommandLine/ExplicitDirs/CMakeLists.txt index 0fee56c..e381da6 100644 --- a/Tests/RunCMake/CommandLine/ExplicitDirs/CMakeLists.txt +++ b/Tests/RunCMake/CommandLine/ExplicitDirs/CMakeLists.txt @@ -1,6 +1,9 @@ cmake_minimum_required(VERSION 3.14) project(ExplicitDirs NONE) +message(STATUS "CMAKE_SOURCE_DIR='${CMAKE_SOURCE_DIR}'") +message(STATUS "CMAKE_BINARY_DIR='${CMAKE_BINARY_DIR}'") + add_custom_command( OUTPUT output1.txt COMMAND ${CMAKE_COMMAND} -E echo CustomCommand > output1.txt diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 727373a..61527a8 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -140,6 +140,8 @@ project(ExplicitDirsMissing LANGUAGES NONE) if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) message(FATAL_ERROR "CWD used as binary dir") endif() +message(STATUS "CMAKE_SOURCE_DIR='${CMAKE_SOURCE_DIR}'") +message(STATUS "CMAKE_BINARY_DIR='${CMAKE_BINARY_DIR}'") ]=]) file(REMOVE_RECURSE "${source_dir}/build") -- cgit v0.12 From 78e8f1145670ad7326c4d06502315741805aa304 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Tue, 1 Mar 2022 16:37:37 -0500 Subject: cmake: Correct regression in `-B ` Fixes: #23285 --- Source/cmake.cxx | 2 +- Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index fe4d252..f9e2d6e 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1556,7 +1556,7 @@ bool cmake::SetDirectoriesFromFile(const std::string& arg) // This function is called multiple times with the same path if (is_source_dir) { this->SetHomeDirectoryViaCommandLine(listPath, HomeDirArgStyle::Plain); - if (!no_build_tree) { + if (no_build_tree) { std::string cwd = cmSystemTools::GetCurrentWorkingDirectory(); this->SetHomeOutputDirectory(cwd); } diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 61527a8..8084983 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -202,6 +202,7 @@ message(STATUS "CMAKE_BINARY_DIR='${CMAKE_BINARY_DIR}'") run_cmake_with_options(ExplicitDirs-C_buildsrcdir -B DummyBuildDir -S ${RunCMake_SOURCE_DIR}/C_buildsrcdir/src -C initial-cache.txt) # Test that full path works, too. run_cmake_with_options(ExplicitDirs-C_buildsrcdir -B DummyBuildDir -S ${RunCMake_SOURCE_DIR}/C_buildsrcdir/src -C ${RunCMake_TEST_BINARY_DIR}/initial-cache.txt) + run_cmake_with_options(ExplicitDirs-C_buildsrcdir -B DummyBuildDir ${RunCMake_SOURCE_DIR}/C_buildsrcdir/src -C ${RunCMake_TEST_BINARY_DIR}/initial-cache.txt) endfunction() run_ExplicitDirs() -- cgit v0.12 From d2e9478321813fc7633b9fddd6fd4190dbd705ec Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 2 Mar 2022 11:03:25 -0500 Subject: Tests: Add RunCMake.CommandLine ExplicitiDirs explicit work directory Verify that the work directory is not selected as the source or build tree. Issue: #23285 --- Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 8084983..081ee3f 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -155,10 +155,14 @@ message(STATUS "CMAKE_BINARY_DIR='${CMAKE_BINARY_DIR}'") set(source_dir ${RunCMake_SOURCE_DIR}/ExplicitDirs) set(binary_dir ${RunCMake_BINARY_DIR}/ExplicitDirs-build) + set(working_dir ${RunCMake_BINARY_DIR}/ExplicitDirs-cwd) set(RunCMake_TEST_SOURCE_DIR "${source_dir}") set(RunCMake_TEST_BINARY_DIR "${binary_dir}") + file(MAKE_DIRECTORY "${working_dir}") + set(RunCMake_TEST_COMMAND_WORKING_DIRECTORY "${working_dir}") + file(REMOVE_RECURSE "${binary_dir}") run_cmake_with_options(ExplicitDirs-S-arg -S ${source_dir} ${binary_dir}) run_cmake_with_options(ExplicitDirs-S-arg-reverse-order ${binary_dir} -S${source_dir} ) @@ -194,6 +198,8 @@ message(STATUS "CMAKE_BINARY_DIR='${CMAKE_BINARY_DIR}'") run_cmake_with_options(ExplicitDirs-B-S -B${binary_dir} -S${source_dir}) run_cmake_with_options(ExplicitDirs-B-S-extra-path -B${binary_dir} -S${source_dir} /extra/path/) + unset(RunCMake_TEST_COMMAND_WORKING_DIRECTORY) + message("copied to ${RunCMake_TEST_BINARY_DIR}/initial-cache.txt") file(COPY ${RunCMake_SOURCE_DIR}/C_buildsrcdir/initial-cache.txt DESTINATION ${RunCMake_TEST_BINARY_DIR}) -- cgit v0.12