Commit 5d3776a7 authored by Stephen Kelly's avatar Stephen Kelly

Access sources through cmGeneratorTarget.

parent 7ce0991a
......@@ -401,7 +401,9 @@ void cmExtraCodeBlocksGenerator
case cmTarget::UTILITY: // can have sources since 2.6.3
{
std::vector<cmSourceFile*> sources;
ti->second.GetSourceFiles(sources,
cmGeneratorTarget* gt =
this->GlobalGenerator->GetGeneratorTarget(&ti->second);
gt->GetSourceFiles(sources,
makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
for (std::vector<cmSourceFile*>::const_iterator si=sources.begin();
si!=sources.end(); si++)
......
......@@ -196,7 +196,9 @@ void cmExtraCodeLiteGenerator
case cmTarget::MODULE_LIBRARY:
{
std::vector<cmSourceFile*> sources;
ti->second.GetSourceFiles(sources,
cmGeneratorTarget* gt =
this->GlobalGenerator->GetGeneratorTarget(&ti->second);
gt->GetSourceFiles(sources,
makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
for (std::vector<cmSourceFile*>::const_iterator si=sources.begin();
si!=sources.end(); si++)
......
......@@ -562,7 +562,9 @@ void cmExtraEclipseCDT4Generator::CreateLinksForTargets(
// get the files from the source lists then add them to the groups
cmTarget* tgt = const_cast<cmTarget*>(&ti->second);
std::vector<cmSourceFile*> files;
tgt->GetSourceFiles(files,
cmGeneratorTarget* gt =
this->GlobalGenerator->GetGeneratorTarget(tgt);
gt->GetSourceFiles(files,
makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
for(std::vector<cmSourceFile*>::const_iterator sfIt = files.begin();
sfIt != files.end();
......
......@@ -237,7 +237,7 @@ void cmExtraSublimeTextGenerator::
cmGeneratorTarget *gtgt = this->GlobalGenerator
->GetGeneratorTarget(target);
std::vector<cmSourceFile*> sourceFiles;
target->GetSourceFiles(sourceFiles,
gtgt->GetSourceFiles(sourceFiles,
makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
std::vector<cmSourceFile*>::const_iterator sourceFilesEnd =
sourceFiles.end();
......
......@@ -449,7 +449,7 @@ static void handleSystemIncludesDep(cmMakefile *mf, cmTarget const* depTgt,
#define IMPLEMENT_VISIT_IMPL(DATA, DATATYPE) \
{ \
std::vector<cmSourceFile*> sourceFiles; \
this->Target->GetSourceFiles(sourceFiles, config); \
this->GetSourceFiles(sourceFiles, config); \
TagVisitor<DATA ## Tag DATATYPE> visitor(this, data); \
for(std::vector<cmSourceFile*>::const_iterator si = sourceFiles.begin(); \
si != sourceFiles.end(); ++si) \
......@@ -1683,7 +1683,7 @@ cmTargetTraceDependencies
ci != configs.end(); ++ci)
{
std::vector<cmSourceFile*> sources;
this->Target->GetSourceFiles(sources, *ci);
this->GeneratorTarget->GetSourceFiles(sources, *ci);
for(std::vector<cmSourceFile*>::const_iterator si = sources.begin();
si != sources.end(); ++si)
{
......@@ -4444,12 +4444,12 @@ bool cmGeneratorTarget::GetConfigCommonSourceFiles(
std::vector<std::string>::const_iterator it = configs.begin();
const std::string& firstConfig = *it;
this->Target->GetSourceFiles(files, firstConfig);
this->GetSourceFiles(files, firstConfig);
for ( ; it != configs.end(); ++it)
{
std::vector<cmSourceFile*> configFiles;
this->Target->GetSourceFiles(configFiles, *it);
this->GetSourceFiles(configFiles, *it);
if (configFiles != files)
{
std::string firstConfigFiles;
......
......@@ -172,7 +172,7 @@ std::vector<cmSourceFile *> cmGhsMultiTargetGenerator::GetSources() const
{
std::vector<cmSourceFile *> output;
std::string config = this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
this->Target->GetSourceFiles(output, config);
this->GeneratorTarget->GetSourceFiles(output, config);
return output;
}
......@@ -574,7 +574,7 @@ bool cmGhsMultiTargetGenerator::DetermineIfTargetGroup(
std::vector<cmSourceFile *> sources;
std::string config =
target->Target->GetMakefile()->GetSafeDefinition("CMAKE_BUILD_TYPE");
target->Target->GetSourceFiles(sources, config);
target->GetSourceFiles(sources, config);
for (std::vector<cmSourceFile *>::const_iterator sources_i = sources.begin();
sources.end() != sources_i; ++sources_i)
{
......
......@@ -2949,10 +2949,12 @@ void cmGlobalGenerator::WriteSummary(cmTarget* target)
{
configs.push_back("");
}
cmGeneratorTarget* gt =
this->GetGeneratorTarget(target);
for(std::vector<std::string>::const_iterator ci = configs.begin();
ci != configs.end(); ++ci)
{
target->GetSourceFiles(sources, *ci);
gt->GetSourceFiles(sources, *ci);
}
std::vector<cmSourceFile*>::const_iterator sourcesEnd
= cmRemoveDuplicates(sources);
......
......@@ -521,7 +521,8 @@ bool cmGlobalGhsMultiGenerator::IsTgtForBuild(const cmTarget *tgt)
const std::string config =
tgt->GetMakefile()->GetSafeDefinition("CMAKE_BUILD_TYPE");
std::vector<cmSourceFile *> tgtSources;
tgt->GetSourceFiles(tgtSources, config);
cmGeneratorTarget* gt = this->GetGeneratorTarget(tgt);
gt->GetSourceFiles(tgtSources, config);
bool tgtInBuild = true;
char const *excludeFromAll = tgt->GetProperty("EXCLUDE_FROM_ALL");
if (NULL != excludeFromAll && '1' == excludeFromAll[0] &&
......
......@@ -139,7 +139,9 @@ bool cmGlobalKdevelopGenerator
ti != targets.end(); ti++)
{
std::vector<cmSourceFile*> sources;
ti->second.GetSourceFiles(sources, ti->second.GetMakefile()
cmGeneratorTarget* gt =
this->GlobalGenerator->GetGeneratorTarget(&ti->second);
gt->GetSourceFiles(sources, ti->second.GetMakefile()
->GetSafeDefinition("CMAKE_BUILD_TYPE"));
for (std::vector<cmSourceFile*>::const_iterator si=sources.begin();
si!=sources.end(); si++)
......
......@@ -1149,7 +1149,7 @@ cmMakefileTargetGenerator
{
// Depend on all custom command outputs.
std::vector<cmSourceFile*> sources;
this->Target->GetSourceFiles(sources,
this->GeneratorTarget->GetSourceFiles(sources,
this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
for(std::vector<cmSourceFile*>::const_iterator source = sources.begin();
source != sources.end(); ++source)
......
......@@ -112,7 +112,7 @@ void cmNinjaNormalTargetGenerator::WriteLanguagesRules()
// Write rules for languages compiled in this target.
std::set<std::string> languages;
std::vector<cmSourceFile*> sourceFiles;
this->GetTarget()->GetSourceFiles(sourceFiles,
this->GetGeneratorTarget()->GetSourceFiles(sourceFiles,
this->GetMakefile()->GetSafeDefinition("CMAKE_BUILD_TYPE"));
for(std::vector<cmSourceFile*>::const_iterator
i = sourceFiles.begin(); i != sourceFiles.end(); ++i)
......
......@@ -58,7 +58,7 @@ void cmNinjaUtilityTargetGenerator::Generate()
std::vector<cmSourceFile*> sources;
std::string config = this->GetMakefile()
->GetSafeDefinition("CMAKE_BUILD_TYPE");
this->GetTarget()->GetSourceFiles(sources, config);
this->GetGeneratorTarget()->GetSourceFiles(sources, config);
for(std::vector<cmSourceFile*>::const_iterator source = sources.begin();
source != sources.end(); ++source)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment