Browse Source

cmMakefile: Register explicit object sources more efficiently

`AddTargetObject` knows the location of object files.
Brad King 4 years ago
parent
commit
ddffbb8adb
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Source/cmMakefile.cxx

+ 2 - 1
Source/cmMakefile.cxx

@@ -3454,7 +3454,8 @@ void cmMakefile::CreateGeneratedOutputs(
 void cmMakefile::AddTargetObject(std::string const& tgtName,
                                  std::string const& objFile)
 {
-  cmSourceFile* sf = this->GetOrCreateSource(objFile, true);
+  cmSourceFile* sf =
+    this->GetOrCreateSource(objFile, true, cmSourceFileLocationKind::Known);
   sf->SetObjectLibrary(tgtName);
   sf->SetProperty("EXTERNAL_OBJECT", "1");
 #if !defined(CMAKE_BOOTSTRAP)