Report directory with missing source file (#11677)
Previously the error message for code like add_executable(myexe does_not_exist/mysrc.c) mentioned only that "mysrc.c" is not found. Report the directory too.
This commit is contained in:
parent
28a0403c34
commit
9cefce09f6
@ -187,8 +187,13 @@ bool cmSourceFile::FindFullPath(std::string* error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "Cannot find source file \"" << this->Location.GetName() << "\"";
|
std::string missing = this->Location.GetDirectory();
|
||||||
e << ". Tried extensions";
|
if(!missing.empty())
|
||||||
|
{
|
||||||
|
missing += "/";
|
||||||
|
}
|
||||||
|
missing += this->Location.GetName();
|
||||||
|
e << "Cannot find source file:\n " << missing << "\nTried extensions";
|
||||||
for(std::vector<std::string>::const_iterator ext = srcExts.begin();
|
for(std::vector<std::string>::const_iterator ext = srcExts.begin();
|
||||||
ext != srcExts.end(); ++ext)
|
ext != srcExts.end(); ++ext)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user