summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CommandLine/C-no-file-stderr.txt
diff options
context:
space:
mode:
authorPeter Waller <p@pwaller.net>2019-10-11 19:48:49 (GMT)
committerBrad King <brad.king@kitware.com>2019-10-14 20:17:00 (GMT)
commitc9d73b26b0a78fac774a549de41eee55ed4e8d7b (patch)
treed7fbd0a006240f40c825f07ef5e321272cb5c6ae /Tests/RunCMake/CommandLine/C-no-file-stderr.txt
parent9150c818b7d2afb868575fcb2e0c9ba62b9d7f85 (diff)
downloadCMake-c9d73b26b0a78fac774a549de41eee55ed4e8d7b.zip
CMake-c9d73b26b0a78fac774a549de41eee55ed4e8d7b.tar.gz
CMake-c9d73b26b0a78fac774a549de41eee55ed4e8d7b.tar.bz2
cmake: Fix relative path regression in -C
Since commit 4ca0526f8a (cmake: Pass -S and -B into PreLoad.cmake and -C scripts, 2019-08-20, v3.16.0-rc1~195^2) the value of `CMAKE_SOURCE_DIR` is the source directory rather than the current working directory. This was correct on its own, but the place storing that value is also used as the base for relative paths specified on the command line. The latter should of course be relative to the current working directory. The fix is to switch to use a full path internally, unless a full path is already specified. Add tests for the behaviour of `-C` under these four circumstances: {with -S, without -S} x {full path, relative path} Fixes: #19827
Diffstat (limited to 'Tests/RunCMake/CommandLine/C-no-file-stderr.txt')
-rw-r--r--Tests/RunCMake/CommandLine/C-no-file-stderr.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/Tests/RunCMake/CommandLine/C-no-file-stderr.txt b/Tests/RunCMake/CommandLine/C-no-file-stderr.txt
index 2a4ee64..b65a349 100644
--- a/Tests/RunCMake/CommandLine/C-no-file-stderr.txt
+++ b/Tests/RunCMake/CommandLine/C-no-file-stderr.txt
@@ -1,3 +1,3 @@
-^CMake Error: Error processing file: nosuchcachefile.txt
+^CMake Error: Error processing file: .*/Tests/RunCMake/CommandLine/C-no-file-build/nosuchcachefile.txt
CMake Error: The source directory ".*/Tests/RunCMake/CommandLine/C-no-file-build" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.$