summaryrefslogtreecommitdiffstats
path: root/Source/cmSourceFile.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-02-01 16:11:49 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2019-02-02 17:39:22 (GMT)
commit254b7260f49caaca78b16761d70d6239626d2129 (patch)
tree25b94a763886c24f328e9182d233ce6d36e98300 /Source/cmSourceFile.cxx
parentcd8a930d61f0aa6c139b1f81302c9258b4102012 (diff)
downloadCMake-254b7260f49caaca78b16761d70d6239626d2129.zip
CMake-254b7260f49caaca78b16761d70d6239626d2129.tar.gz
CMake-254b7260f49caaca78b16761d70d6239626d2129.tar.bz2
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.
Diffstat (limited to 'Source/cmSourceFile.cxx')
-rw-r--r--Source/cmSourceFile.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index fbc1293..d05fb68 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -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