mirror of
https://github.com/reactos/CMake.git
synced 2024-11-28 14:01:21 +00:00
cmSourceFile: Check if a file is GENERATED first in the full path computation
In `cmSourceFile::FindFullPath` check first if the file is GENERATED before aborting on `FindFullPathFailed`. This allows recomputation of the full path when the GENERATED property was set after the file path was computed with an error.
This commit is contained in:
parent
cd8a930d61
commit
254b7260f4
@ -113,11 +113,6 @@ std::string const& cmSourceFile::GetFullPath() const
|
||||
|
||||
bool cmSourceFile::FindFullPath(std::string* error)
|
||||
{
|
||||
// If this method has already failed once do not try again.
|
||||
if (this->FindFullPathFailed) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If the file is generated compute the location without checking on disk.
|
||||
if (this->GetIsGenerated()) {
|
||||
// The file is either already a full path or is relative to the
|
||||
@ -127,6 +122,11 @@ bool cmSourceFile::FindFullPath(std::string* error)
|
||||
return true;
|
||||
}
|
||||
|
||||
// If this method has already failed once do not try again.
|
||||
if (this->FindFullPathFailed) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// The file is not generated. It must exist on disk.
|
||||
cmMakefile const* makefile = this->Location.GetMakefile();
|
||||
// Location path
|
||||
|
Loading…
Reference in New Issue
Block a user