mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
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
4 lines
296 B
Plaintext
4 lines
296 B
Plaintext
^CMake Error: Error processing file: .*/Tests/RunCMake/CommandLine/Cno-file-build/nosuchcachefile.txt
|
|
CMake Error: The source directory ".*/Tests/RunCMake/CommandLine/Cno-file-build" does not appear to contain CMakeLists.txt.
|
|
Specify --help for usage, or press the help button on the CMake GUI.$
|