mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-16 05:26:58 +08:00
cmGeneratorTarget: return the source file added
A few callsites uses this codepath to generate `cmSourceFile` instances; allow them to access it.
This commit is contained in:
@@ -566,10 +566,11 @@ void cmGeneratorTarget::AddSourceCommon(std::string const& src, bool before)
|
||||
this->ClearSourcesCache();
|
||||
}
|
||||
|
||||
void cmGeneratorTarget::AddSource(std::string const& src, bool before)
|
||||
cmSourceFile* cmGeneratorTarget::AddSource(std::string const& src, bool before)
|
||||
{
|
||||
this->Target->AddSource(src, before);
|
||||
auto* sf = this->Target->AddSource(src, before);
|
||||
this->AddSourceCommon(src, before);
|
||||
return sf;
|
||||
}
|
||||
|
||||
void cmGeneratorTarget::AddTracedSources(std::vector<std::string> const& srcs)
|
||||
|
@@ -845,7 +845,7 @@ public:
|
||||
*/
|
||||
void ClearLinkInterfaceCache();
|
||||
|
||||
void AddSource(std::string const& src, bool before = false);
|
||||
cmSourceFile* AddSource(std::string const& src, bool before = false);
|
||||
void AddTracedSources(std::vector<std::string> const& srcs);
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user