|
@@ -65,7 +65,8 @@ cmGeneratorTarget::GetSourceDepends(cmSourceFile* sf) const
|
|
|
static void handleSystemIncludesDep(cmMakefile *mf, const std::string &name,
|
|
static void handleSystemIncludesDep(cmMakefile *mf, const std::string &name,
|
|
|
const char *config, cmTarget *headTarget,
|
|
const char *config, cmTarget *headTarget,
|
|
|
cmGeneratorExpressionDAGChecker *dagChecker,
|
|
cmGeneratorExpressionDAGChecker *dagChecker,
|
|
|
- std::vector<std::string>& result)
|
|
|
|
|
|
|
+ std::vector<std::string>& result,
|
|
|
|
|
+ bool excludeImported)
|
|
|
{
|
|
{
|
|
|
cmTarget* depTgt = mf->FindTargetToUse(name.c_str());
|
|
cmTarget* depTgt = mf->FindTargetToUse(name.c_str());
|
|
|
|
|
|
|
@@ -85,7 +86,7 @@ static void handleSystemIncludesDep(cmMakefile *mf, const std::string &name,
|
|
|
config, false, headTarget,
|
|
config, false, headTarget,
|
|
|
depTgt, dagChecker), result);
|
|
depTgt, dagChecker), result);
|
|
|
}
|
|
}
|
|
|
- if (!depTgt->IsImported())
|
|
|
|
|
|
|
+ if (!depTgt->IsImported() || excludeImported)
|
|
|
{
|
|
{
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -101,6 +102,84 @@ static void handleSystemIncludesDep(cmMakefile *mf, const std::string &name,
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
|
|
+void
|
|
|
|
|
+cmGeneratorTarget::GetObjectSources(std::vector<cmSourceFile*> &objs) const
|
|
|
|
|
+{
|
|
|
|
|
+ objs = this->ObjectSources;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
|
|
+const std::string& cmGeneratorTarget::GetObjectName(cmSourceFile const* file)
|
|
|
|
|
+{
|
|
|
|
|
+ return this->Objects[file];
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void cmGeneratorTarget::AddObject(cmSourceFile *sf, std::string const&name)
|
|
|
|
|
+{
|
|
|
|
|
+ this->Objects[sf] = name;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
|
|
+void cmGeneratorTarget::AddExplicitObjectName(cmSourceFile* sf)
|
|
|
|
|
+{
|
|
|
|
|
+ this->ExplicitObjectName.insert(sf);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
|
|
+bool cmGeneratorTarget::HasExplicitObjectName(cmSourceFile const* file) const
|
|
|
|
|
+{
|
|
|
|
|
+ std::set<cmSourceFile const*>::const_iterator it
|
|
|
|
|
+ = this->ExplicitObjectName.find(file);
|
|
|
|
|
+ return it != this->ExplicitObjectName.end();
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
|
|
+void cmGeneratorTarget::GetResxSources(std::vector<cmSourceFile*>& srcs) const
|
|
|
|
|
+{
|
|
|
|
|
+ srcs = this->ResxSources;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
|
|
+void cmGeneratorTarget::GetIDLSources(std::vector<cmSourceFile*>& srcs) const
|
|
|
|
|
+{
|
|
|
|
|
+ srcs = this->IDLSources;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
|
|
+void
|
|
|
|
|
+cmGeneratorTarget::GetHeaderSources(std::vector<cmSourceFile*>& srcs) const
|
|
|
|
|
+{
|
|
|
|
|
+ srcs = this->HeaderSources;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
|
|
+void cmGeneratorTarget::GetExtraSources(std::vector<cmSourceFile*>& srcs) const
|
|
|
|
|
+{
|
|
|
|
|
+ srcs = this->ExtraSources;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
|
|
+void
|
|
|
|
|
+cmGeneratorTarget::GetCustomCommands(std::vector<cmSourceFile*>& srcs) const
|
|
|
|
|
+{
|
|
|
|
|
+ srcs = this->CustomCommands;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
|
|
+void
|
|
|
|
|
+cmGeneratorTarget::GetExpectedResxHeaders(std::set<std::string>& srcs) const
|
|
|
|
|
+{
|
|
|
|
|
+ srcs = this->ExpectedResxHeaders;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
|
|
+void
|
|
|
|
|
+cmGeneratorTarget::GetExternalObjects(std::vector<cmSourceFile*>& srcs) const
|
|
|
|
|
+{
|
|
|
|
|
+ srcs = this->ExternalObjects;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
//----------------------------------------------------------------------------
|
|
//----------------------------------------------------------------------------
|
|
|
bool cmGeneratorTarget::IsSystemIncludeDirectory(const char *dir,
|
|
bool cmGeneratorTarget::IsSystemIncludeDirectory(const char *dir,
|
|
|
const char *config) const
|
|
const char *config) const
|
|
@@ -130,6 +209,9 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const char *dir,
|
|
|
this->GetName(),
|
|
this->GetName(),
|
|
|
"SYSTEM_INCLUDE_DIRECTORIES", 0, 0);
|
|
"SYSTEM_INCLUDE_DIRECTORIES", 0, 0);
|
|
|
|
|
|
|
|
|
|
+ bool excludeImported
|
|
|
|
|
+ = this->Target->GetPropertyAsBool("NO_SYSTEM_FROM_IMPORTED");
|
|
|
|
|
+
|
|
|
std::vector<std::string> result;
|
|
std::vector<std::string> result;
|
|
|
for (std::set<cmStdString>::const_iterator
|
|
for (std::set<cmStdString>::const_iterator
|
|
|
it = this->Target->GetSystemIncludeDirectories().begin();
|
|
it = this->Target->GetSystemIncludeDirectories().begin();
|
|
@@ -156,7 +238,7 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const char *dir,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
handleSystemIncludesDep(this->Makefile, *li, config, this->Target,
|
|
handleSystemIncludesDep(this->Makefile, *li, config, this->Target,
|
|
|
- &dagChecker, result);
|
|
|
|
|
|
|
+ &dagChecker, result, excludeImported);
|
|
|
|
|
|
|
|
std::vector<std::string> deps;
|
|
std::vector<std::string> deps;
|
|
|
tgt->GetTransitivePropertyLinkLibraries(config, this->Target, deps);
|
|
tgt->GetTransitivePropertyLinkLibraries(config, this->Target, deps);
|
|
@@ -167,7 +249,7 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const char *dir,
|
|
|
if (uniqueDeps.insert(*di).second)
|
|
if (uniqueDeps.insert(*di).second)
|
|
|
{
|
|
{
|
|
|
handleSystemIncludesDep(this->Makefile, *di, config, this->Target,
|
|
handleSystemIncludesDep(this->Makefile, *di, config, this->Target,
|
|
|
- &dagChecker, result);
|
|
|
|
|
|
|
+ &dagChecker, result, excludeImported);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -202,9 +284,9 @@ bool cmGeneratorTarget::GetPropertyAsBool(const char *prop) const
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
//----------------------------------------------------------------------------
|
|
|
-std::vector<cmSourceFile*> const& cmGeneratorTarget::GetSourceFiles() const
|
|
|
|
|
|
|
+void cmGeneratorTarget::GetSourceFiles(std::vector<cmSourceFile*> &files) const
|
|
|
{
|
|
{
|
|
|
- return this->Target->GetSourceFiles();
|
|
|
|
|
|
|
+ this->Target->GetSourceFiles(files);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
//----------------------------------------------------------------------------
|
|
@@ -216,7 +298,8 @@ void cmGeneratorTarget::ClassifySources()
|
|
|
bool isObjLib = targetType == cmTarget::OBJECT_LIBRARY;
|
|
bool isObjLib = targetType == cmTarget::OBJECT_LIBRARY;
|
|
|
|
|
|
|
|
std::vector<cmSourceFile*> badObjLib;
|
|
std::vector<cmSourceFile*> badObjLib;
|
|
|
- std::vector<cmSourceFile*> const& sources = this->Target->GetSourceFiles();
|
|
|
|
|
|
|
+ std::vector<cmSourceFile*> sources;
|
|
|
|
|
+ this->Target->GetSourceFiles(sources);
|
|
|
for(std::vector<cmSourceFile*>::const_iterator si = sources.begin();
|
|
for(std::vector<cmSourceFile*>::const_iterator si = sources.begin();
|
|
|
si != sources.end(); ++si)
|
|
si != sources.end(); ++si)
|
|
|
{
|
|
{
|
|
@@ -414,7 +497,8 @@ cmTargetTraceDependencies
|
|
|
this->CurrentEntry = 0;
|
|
this->CurrentEntry = 0;
|
|
|
|
|
|
|
|
// Queue all the source files already specified for the target.
|
|
// Queue all the source files already specified for the target.
|
|
|
- std::vector<cmSourceFile*> const& sources = this->Target->GetSourceFiles();
|
|
|
|
|
|
|
+ std::vector<cmSourceFile*> sources;
|
|
|
|
|
+ this->Target->GetSourceFiles(sources);
|
|
|
for(std::vector<cmSourceFile*>::const_iterator si = sources.begin();
|
|
for(std::vector<cmSourceFile*>::const_iterator si = sources.begin();
|
|
|
si != sources.end(); ++si)
|
|
si != sources.end(); ++si)
|
|
|
{
|
|
{
|