cmake: Clarify error if -P script does not exist

This commit is contained in:
scivision
2023-09-17 22:32:27 -04:00
committed by Brad King
parent d007eb7046
commit ca77b745e9
6 changed files with 9 additions and 5 deletions

View File

@@ -785,6 +785,9 @@ void cmake::ReadListFile(const std::vector<std::string>& args,
mf.SetArgcArgv(args);
}
if (!cmSystemTools::FileExists(path, true)) {
cmSystemTools::Error("Not a file: " + path);
}
if (!mf.ReadListFile(path)) {
cmSystemTools::Error("Error processing file: " + path);
}

View File

@@ -1,3 +1,3 @@
^CMake Error: Error processing file: .*/Tests/RunCMake/CommandLine/C-no-file-build/nosuchcachefile.txt
^CMake Error: Not a 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.$

View File

@@ -1,3 +1,3 @@
^CMake Error: Error processing file: .*/Tests/RunCMake/CommandLine/Cno-file-build/nosuchcachefile.txt
^CMake Error: Not a 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.$

View File

@@ -1 +1 @@
^CMake Error: Error processing file: .*/Tests/RunCMake/CommandLine$
^CMake Error: Not a file: .*/Tests/RunCMake/CommandLine$

View File

@@ -1 +1,2 @@
^CMake Error: Error processing file: nosuchscriptfile.cmake$
^CMake Error: Not a file: nosuchscriptfile.cmake
CMake Error: Error processing file: nosuchscriptfile.cmake$

View File

@@ -1 +1 @@
^CMake Error: Error processing file:
^CMake Error: Not a file: