1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-15 12:16:40 +08:00

cmMakefile: Register explicit object sources more efficiently

`AddTargetObject` knows the location of object files.
This commit is contained in:
Brad King
2021-05-26 10:37:03 -04:00
parent 18e42d3e63
commit ddffbb8adb

View File

@@ -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)