Merge topic 'genex-generator-objects'
2293d43d
cmLocalGenerator: Store cmGeneratorTargets.488723f5
cmMakefile: Store container of cmExportBuildFileGenerators.15834405
cmGeneratorExpression: Port interface to cmGeneratorTarget.11165525
cmGeneratorExpression: Port to cmLocalGenerator.
This commit is contained in:
commit
ad3ff60f4a
|
@ -18,7 +18,7 @@ void cmCPackPropertiesGenerator::GenerateScriptForConfig(std::ostream& os,
|
||||||
const std::string& config, Indent const& indent)
|
const std::string& config, Indent const& indent)
|
||||||
{
|
{
|
||||||
std::string const& expandedFileName =
|
std::string const& expandedFileName =
|
||||||
this->InstalledFile.GetNameExpression().Evaluate(this->LG->GetMakefile(),
|
this->InstalledFile.GetNameExpression().Evaluate(this->LG,
|
||||||
config);
|
config);
|
||||||
|
|
||||||
cmInstalledFile::PropertyMapType const& properties =
|
cmInstalledFile::PropertyMapType const& properties =
|
||||||
|
@ -38,7 +38,7 @@ void cmCPackPropertiesGenerator::GenerateScriptForConfig(std::ostream& os,
|
||||||
j = property.ValueExpressions.begin();
|
j = property.ValueExpressions.begin();
|
||||||
j != property.ValueExpressions.end(); ++j)
|
j != property.ValueExpressions.end(); ++j)
|
||||||
{
|
{
|
||||||
std::string value = (*j)->Evaluate(LG->GetMakefile(), config);
|
std::string value = (*j)->Evaluate(this->LG, config);
|
||||||
os << " " << cmOutputConverter::EscapeForCMake(value);
|
os << " " << cmOutputConverter::EscapeForCMake(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,15 +43,14 @@ std::string cmCustomCommandGenerator::GetCommand(unsigned int c) const
|
||||||
{
|
{
|
||||||
std::string const& argv0 = this->CC.GetCommandLines()[c][0];
|
std::string const& argv0 = this->CC.GetCommandLines()[c][0];
|
||||||
cmGeneratorTarget* target =
|
cmGeneratorTarget* target =
|
||||||
this->LG->GetMakefile()->FindGeneratorTargetToUse(argv0);
|
this->LG->FindGeneratorTargetToUse(argv0);
|
||||||
if(target && target->GetType() == cmTarget::EXECUTABLE &&
|
if(target && target->GetType() == cmTarget::EXECUTABLE &&
|
||||||
(target->Target->IsImported()
|
(target->Target->IsImported()
|
||||||
|| !this->LG->GetMakefile()->IsOn("CMAKE_CROSSCOMPILING")))
|
|| !this->LG->GetMakefile()->IsOn("CMAKE_CROSSCOMPILING")))
|
||||||
{
|
{
|
||||||
return target->GetLocation(this->Config);
|
return target->GetLocation(this->Config);
|
||||||
}
|
}
|
||||||
return this->GE->Parse(argv0)->Evaluate(this->LG->GetMakefile(),
|
return this->GE->Parse(argv0)->Evaluate(this->LG, this->Config);
|
||||||
this->Config);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
@ -92,7 +91,7 @@ cmCustomCommandGenerator
|
||||||
for(unsigned int j=1;j < commandLine.size(); ++j)
|
for(unsigned int j=1;j < commandLine.size(); ++j)
|
||||||
{
|
{
|
||||||
std::string arg =
|
std::string arg =
|
||||||
this->GE->Parse(commandLine[j])->Evaluate(this->LG->GetMakefile(),
|
this->GE->Parse(commandLine[j])->Evaluate(this->LG,
|
||||||
this->Config);
|
this->Config);
|
||||||
cmd += " ";
|
cmd += " ";
|
||||||
if(this->OldStyle)
|
if(this->OldStyle)
|
||||||
|
@ -146,7 +145,7 @@ std::vector<std::string> const& cmCustomCommandGenerator::GetDepends() const
|
||||||
= this->GE->Parse(*i);
|
= this->GE->Parse(*i);
|
||||||
std::vector<std::string> result;
|
std::vector<std::string> result;
|
||||||
cmSystemTools::ExpandListArgument(
|
cmSystemTools::ExpandListArgument(
|
||||||
cge->Evaluate(this->LG->GetMakefile(), this->Config), result);
|
cge->Evaluate(this->LG, this->Config), result);
|
||||||
for (std::vector<std::string>::iterator it = result.begin();
|
for (std::vector<std::string>::iterator it = result.begin();
|
||||||
it != result.end(); ++it)
|
it != result.end(); ++it)
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,12 +18,17 @@
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmExportBuildFileGenerator::cmExportBuildFileGenerator()
|
cmExportBuildFileGenerator::cmExportBuildFileGenerator()
|
||||||
: Backtrace()
|
|
||||||
{
|
{
|
||||||
this->Makefile = 0;
|
this->LG = 0;
|
||||||
this->ExportSet = 0;
|
this->ExportSet = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
void cmExportBuildFileGenerator::Compute(cmLocalGenerator* lg)
|
||||||
|
{
|
||||||
|
this->LG = lg;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
bool cmExportBuildFileGenerator::GenerateMainFile(std::ostream& os)
|
bool cmExportBuildFileGenerator::GenerateMainFile(std::ostream& os)
|
||||||
{
|
{
|
||||||
|
@ -37,7 +42,7 @@ bool cmExportBuildFileGenerator::GenerateMainFile(std::ostream& os)
|
||||||
tei = targets.begin();
|
tei = targets.begin();
|
||||||
tei != targets.end(); ++tei)
|
tei != targets.end(); ++tei)
|
||||||
{
|
{
|
||||||
cmGeneratorTarget *te = this->Makefile
|
cmGeneratorTarget *te = this->LG
|
||||||
->FindGeneratorTargetToUse(*tei);
|
->FindGeneratorTargetToUse(*tei);
|
||||||
expectedTargets += sep + this->Namespace + te->Target->GetExportName();
|
expectedTargets += sep + this->Namespace + te->Target->GetExportName();
|
||||||
sep = " ";
|
sep = " ";
|
||||||
|
@ -49,8 +54,9 @@ bool cmExportBuildFileGenerator::GenerateMainFile(std::ostream& os)
|
||||||
{
|
{
|
||||||
std::ostringstream e;
|
std::ostringstream e;
|
||||||
e << "given target \"" << te->GetName() << "\" more than once.";
|
e << "given target \"" << te->GetName() << "\" more than once.";
|
||||||
this->Makefile->GetCMakeInstance()
|
this->LG->GetGlobalGenerator()->GetCMakeInstance()
|
||||||
->IssueMessage(cmake::FATAL_ERROR, e.str(), this->Backtrace);
|
->IssueMessage(cmake::FATAL_ERROR, e.str(),
|
||||||
|
this->LG->GetMakefile()->GetBacktrace());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (te->GetType() == cmTarget::INTERFACE_LIBRARY)
|
if (te->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||||
|
@ -328,8 +334,9 @@ cmExportBuildFileGenerator
|
||||||
e << "If the required target is not easy to reference in this call, "
|
e << "If the required target is not easy to reference in this call, "
|
||||||
<< "consider using the APPEND option with multiple separate calls.";
|
<< "consider using the APPEND option with multiple separate calls.";
|
||||||
|
|
||||||
this->Makefile->GetCMakeInstance()
|
this->LG->GetGlobalGenerator()->GetCMakeInstance()
|
||||||
->IssueMessage(cmake::FATAL_ERROR, e.str(), this->Backtrace);
|
->IssueMessage(cmake::FATAL_ERROR, e.str(),
|
||||||
|
this->LG->GetMakefile()->GetBacktrace());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string
|
std::string
|
||||||
|
|
|
@ -43,10 +43,7 @@ public:
|
||||||
/** Set whether to append generated code to the output file. */
|
/** Set whether to append generated code to the output file. */
|
||||||
void SetAppendMode(bool append) { this->AppendMode = append; }
|
void SetAppendMode(bool append) { this->AppendMode = append; }
|
||||||
|
|
||||||
void SetMakefile(cmMakefile *mf) {
|
void Compute(cmLocalGenerator* lg);
|
||||||
this->Makefile = mf;
|
|
||||||
this->Backtrace = this->Makefile->GetBacktrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Implement virtual methods from the superclass.
|
// Implement virtual methods from the superclass.
|
||||||
|
@ -80,8 +77,7 @@ protected:
|
||||||
std::vector<std::string> Targets;
|
std::vector<std::string> Targets;
|
||||||
cmExportSet *ExportSet;
|
cmExportSet *ExportSet;
|
||||||
std::vector<cmGeneratorTarget*> Exports;
|
std::vector<cmGeneratorTarget*> Exports;
|
||||||
cmMakefile* Makefile;
|
cmLocalGenerator* LG;
|
||||||
cmListFileBacktrace Backtrace;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -221,7 +221,7 @@ bool cmExportCommand
|
||||||
{
|
{
|
||||||
ebfg->SetTargets(targets);
|
ebfg->SetTargets(targets);
|
||||||
}
|
}
|
||||||
ebfg->SetMakefile(this->Makefile);
|
this->Makefile->AddExportBuildFileGenerator(ebfg);
|
||||||
ebfg->SetExportOld(this->ExportOld.IsEnabled());
|
ebfg->SetExportOld(this->ExportOld.IsEnabled());
|
||||||
|
|
||||||
// Compute the set of configurations exported.
|
// Compute the set of configurations exported.
|
||||||
|
|
|
@ -456,8 +456,8 @@ void cmExportFileGenerator::PopulateIncludeDirectoriesInterface(
|
||||||
true);
|
true);
|
||||||
this->ReplaceInstallPrefix(dirs);
|
this->ReplaceInstallPrefix(dirs);
|
||||||
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(dirs);
|
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(dirs);
|
||||||
std::string exportDirs = cge->Evaluate(target->Target->GetMakefile(), "",
|
std::string exportDirs = cge->Evaluate(target->GetLocalGenerator(), "",
|
||||||
false, target->Target);
|
false, target);
|
||||||
|
|
||||||
if (cge->GetHadContextSensitiveCondition())
|
if (cge->GetHadContextSensitiveCondition())
|
||||||
{
|
{
|
||||||
|
|
|
@ -78,10 +78,11 @@ std::string cmExportTryCompileFileGenerator::FindTargets(
|
||||||
|
|
||||||
cmGeneratorTarget* gtgt =
|
cmGeneratorTarget* gtgt =
|
||||||
tgt->GetMakefile()->GetGlobalGenerator()->GetGeneratorTarget(tgt);
|
tgt->GetMakefile()->GetGlobalGenerator()->GetGeneratorTarget(tgt);
|
||||||
|
cmGeneratorTarget gDummyHead(&dummyHead, gtgt->GetLocalGenerator());
|
||||||
|
|
||||||
std::string result = cge->Evaluate(gtgt->Target->GetMakefile(), this->Config,
|
std::string result = cge->Evaluate(gtgt->GetLocalGenerator(), this->Config,
|
||||||
false, &dummyHead,
|
false, &gDummyHead,
|
||||||
gtgt->Target, &dagChecker);
|
gtgt, &dagChecker);
|
||||||
|
|
||||||
const std::set<cmTarget const*> &allTargets = cge->GetAllTargetsSeen();
|
const std::set<cmTarget const*> &allTargets = cge->GetAllTargetsSeen();
|
||||||
for(std::set<cmTarget const*>::const_iterator li = allTargets.begin();
|
for(std::set<cmTarget const*>::const_iterator li = allTargets.begin();
|
||||||
|
|
|
@ -965,8 +965,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||||
it != this->GlobalGenerator->GetLocalGenerators().end();
|
it != this->GlobalGenerator->GetLocalGenerators().end();
|
||||||
++it)
|
++it)
|
||||||
{
|
{
|
||||||
cmGeneratorTargetsType targets = (*it)->GetMakefile()
|
cmGeneratorTargetsType targets = (*it)->GetGeneratorTargets();
|
||||||
->GetGeneratorTargets();
|
|
||||||
for (cmGeneratorTargetsType::iterator l = targets.begin();
|
for (cmGeneratorTargetsType::iterator l = targets.begin();
|
||||||
l != targets.end(); ++l)
|
l != targets.end(); ++l)
|
||||||
{
|
{
|
||||||
|
|
|
@ -48,13 +48,13 @@ cmGeneratorExpression::~cmGeneratorExpression()
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
const char *cmCompiledGeneratorExpression::Evaluate(
|
const char *cmCompiledGeneratorExpression::Evaluate(cmLocalGenerator* lg,
|
||||||
cmMakefile* mf, const std::string& config, bool quiet,
|
const std::string& config, bool quiet,
|
||||||
cmTarget const* headTarget,
|
const cmGeneratorTarget* headTarget,
|
||||||
cmGeneratorExpressionDAGChecker *dagChecker,
|
cmGeneratorExpressionDAGChecker *dagChecker,
|
||||||
std::string const& language) const
|
std::string const& language) const
|
||||||
{
|
{
|
||||||
return this->Evaluate(mf,
|
return this->Evaluate(lg,
|
||||||
config,
|
config,
|
||||||
quiet,
|
quiet,
|
||||||
headTarget,
|
headTarget,
|
||||||
|
@ -65,13 +65,13 @@ const char *cmCompiledGeneratorExpression::Evaluate(
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
const char *cmCompiledGeneratorExpression::Evaluate(
|
const char *cmCompiledGeneratorExpression::Evaluate(
|
||||||
cmMakefile* mf, const std::string& config, bool quiet,
|
cmLocalGenerator* lg, const std::string& config, bool quiet,
|
||||||
cmTarget const* headTarget,
|
const cmGeneratorTarget* headTarget,
|
||||||
cmTarget const* currentTarget,
|
const cmGeneratorTarget* currentTarget,
|
||||||
cmGeneratorExpressionDAGChecker *dagChecker,
|
cmGeneratorExpressionDAGChecker *dagChecker,
|
||||||
std::string const& language) const
|
std::string const& language) const
|
||||||
{
|
{
|
||||||
cmGeneratorExpressionContext context(mf, config, quiet, headTarget,
|
cmGeneratorExpressionContext context(lg, config, quiet, headTarget,
|
||||||
currentTarget ? currentTarget : headTarget,
|
currentTarget ? currentTarget : headTarget,
|
||||||
this->EvaluateForBuildsystem,
|
this->EvaluateForBuildsystem,
|
||||||
this->Backtrace, language);
|
this->Backtrace, language);
|
||||||
|
|
|
@ -20,7 +20,8 @@
|
||||||
#include <cmsys/auto_ptr.hxx>
|
#include <cmsys/auto_ptr.hxx>
|
||||||
|
|
||||||
class cmTarget;
|
class cmTarget;
|
||||||
class cmMakefile;
|
class cmGeneratorTarget;
|
||||||
|
class cmLocalGenerator;
|
||||||
class cmListFileBacktrace;
|
class cmListFileBacktrace;
|
||||||
|
|
||||||
struct cmGeneratorExpressionEvaluator;
|
struct cmGeneratorExpressionEvaluator;
|
||||||
|
@ -78,15 +79,15 @@ private:
|
||||||
class cmCompiledGeneratorExpression
|
class cmCompiledGeneratorExpression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
const char* Evaluate(cmMakefile* mf, const std::string& config,
|
const char* Evaluate(cmLocalGenerator* lg, const std::string& config,
|
||||||
bool quiet = false,
|
bool quiet = false,
|
||||||
cmTarget const* headTarget = 0,
|
cmGeneratorTarget const* headTarget = 0,
|
||||||
cmTarget const* currentTarget = 0,
|
cmGeneratorTarget const* currentTarget = 0,
|
||||||
cmGeneratorExpressionDAGChecker *dagChecker = 0,
|
cmGeneratorExpressionDAGChecker *dagChecker = 0,
|
||||||
std::string const& language = std::string()) const;
|
std::string const& language = std::string()) const;
|
||||||
const char* Evaluate(cmMakefile* mf, const std::string& config,
|
const char* Evaluate(cmLocalGenerator* lg, const std::string& config,
|
||||||
bool quiet,
|
bool quiet,
|
||||||
cmTarget const* headTarget,
|
cmGeneratorTarget const* headTarget,
|
||||||
cmGeneratorExpressionDAGChecker *dagChecker,
|
cmGeneratorExpressionDAGChecker *dagChecker,
|
||||||
std::string const& language = std::string()) const;
|
std::string const& language = std::string()) const;
|
||||||
|
|
||||||
|
|
|
@ -11,20 +11,21 @@
|
||||||
============================================================================*/
|
============================================================================*/
|
||||||
|
|
||||||
#include "cmGeneratorExpressionContext.h"
|
#include "cmGeneratorExpressionContext.h"
|
||||||
|
#include "cmGeneratorTarget.h"
|
||||||
|
|
||||||
cmGeneratorExpressionContext::cmGeneratorExpressionContext(
|
cmGeneratorExpressionContext::cmGeneratorExpressionContext(
|
||||||
cmMakefile* mf, std::string const& config,
|
cmLocalGenerator* lg, std::string const& config,
|
||||||
bool quiet, cmTarget const* headTarget,
|
bool quiet, cmGeneratorTarget const* headTarget,
|
||||||
cmTarget const* currentTarget,
|
const cmGeneratorTarget* currentTarget,
|
||||||
bool evaluateForBuildsystem,
|
bool evaluateForBuildsystem,
|
||||||
cmListFileBacktrace const& backtrace,
|
cmListFileBacktrace const& backtrace,
|
||||||
std::string const& language)
|
std::string const& language)
|
||||||
: Backtrace(backtrace),
|
: Backtrace(backtrace),
|
||||||
Makefile(mf),
|
LG(lg),
|
||||||
Config(config),
|
Config(config),
|
||||||
Language(language),
|
Language(language),
|
||||||
HeadTarget(headTarget),
|
HeadTarget(headTarget ? headTarget->Target : 0),
|
||||||
CurrentTarget(currentTarget),
|
CurrentTarget(currentTarget ? currentTarget->Target : 0),
|
||||||
Quiet(quiet),
|
Quiet(quiet),
|
||||||
HadError(false),
|
HadError(false),
|
||||||
HadContextSensitiveCondition(false),
|
HadContextSensitiveCondition(false),
|
||||||
|
|
|
@ -19,13 +19,15 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
class cmTarget;
|
class cmTarget;
|
||||||
|
class cmGeneratorTarget;
|
||||||
|
class cmLocalGenerator;
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
struct cmGeneratorExpressionContext
|
struct cmGeneratorExpressionContext
|
||||||
{
|
{
|
||||||
cmGeneratorExpressionContext(cmMakefile* mf, std::string const& config,
|
cmGeneratorExpressionContext(cmLocalGenerator* lg, std::string const& config,
|
||||||
bool quiet, cmTarget const* headTarget,
|
bool quiet, const cmGeneratorTarget* headTarget,
|
||||||
cmTarget const* currentTarget,
|
cmGeneratorTarget const* currentTarget,
|
||||||
bool evaluateForBuildsystem,
|
bool evaluateForBuildsystem,
|
||||||
cmListFileBacktrace const& backtrace,
|
cmListFileBacktrace const& backtrace,
|
||||||
std::string const& language);
|
std::string const& language);
|
||||||
|
@ -38,7 +40,7 @@ struct cmGeneratorExpressionContext
|
||||||
std::set<cmTarget const*> SourceSensitiveTargets;
|
std::set<cmTarget const*> SourceSensitiveTargets;
|
||||||
std::map<cmTarget const*, std::map<std::string, std::string> >
|
std::map<cmTarget const*, std::map<std::string, std::string> >
|
||||||
MaxLanguageStandard;
|
MaxLanguageStandard;
|
||||||
cmMakefile *Makefile;
|
cmLocalGenerator *LG;
|
||||||
std::string Config;
|
std::string Config;
|
||||||
std::string Language;
|
std::string Language;
|
||||||
cmTarget const* HeadTarget; // The target whose property is being evaluated.
|
cmTarget const* HeadTarget; // The target whose property is being evaluated.
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include "cmGeneratorExpressionDAGChecker.h"
|
#include "cmGeneratorExpressionDAGChecker.h"
|
||||||
|
|
||||||
#include "cmMakefile.h"
|
#include "cmMakefile.h"
|
||||||
|
#include "cmLocalGenerator.h"
|
||||||
#include "cmAlgorithms.h"
|
#include "cmAlgorithms.h"
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
@ -110,7 +111,7 @@ void cmGeneratorExpressionDAGChecker::ReportError(
|
||||||
<< " " << expr << "\n"
|
<< " " << expr << "\n"
|
||||||
<< "Self reference on target \""
|
<< "Self reference on target \""
|
||||||
<< context->HeadTarget->GetName() << "\".\n";
|
<< context->HeadTarget->GetName() << "\".\n";
|
||||||
context->Makefile->GetCMakeInstance()
|
context->LG->GetCMakeInstance()
|
||||||
->IssueMessage(cmake::FATAL_ERROR, e.str(),
|
->IssueMessage(cmake::FATAL_ERROR, e.str(),
|
||||||
parent->Backtrace);
|
parent->Backtrace);
|
||||||
return;
|
return;
|
||||||
|
@ -121,7 +122,7 @@ void cmGeneratorExpressionDAGChecker::ReportError(
|
||||||
e << "Error evaluating generator expression:\n"
|
e << "Error evaluating generator expression:\n"
|
||||||
<< " " << expr << "\n"
|
<< " " << expr << "\n"
|
||||||
<< "Dependency loop found.";
|
<< "Dependency loop found.";
|
||||||
context->Makefile->GetCMakeInstance()
|
context->LG->GetCMakeInstance()
|
||||||
->IssueMessage(cmake::FATAL_ERROR, e.str(),
|
->IssueMessage(cmake::FATAL_ERROR, e.str(),
|
||||||
context->Backtrace);
|
context->Backtrace);
|
||||||
}
|
}
|
||||||
|
@ -134,7 +135,7 @@ void cmGeneratorExpressionDAGChecker::ReportError(
|
||||||
<< " "
|
<< " "
|
||||||
<< (parent->Content ? parent->Content->GetOriginalExpression() : expr)
|
<< (parent->Content ? parent->Content->GetOriginalExpression() : expr)
|
||||||
<< "\n";
|
<< "\n";
|
||||||
context->Makefile->GetCMakeInstance()
|
context->LG->GetCMakeInstance()
|
||||||
->IssueMessage(cmake::FATAL_ERROR, e.str(),
|
->IssueMessage(cmake::FATAL_ERROR, e.str(),
|
||||||
parent->Backtrace);
|
parent->Backtrace);
|
||||||
parent = parent->Parent;
|
parent = parent->Parent;
|
||||||
|
|
|
@ -44,7 +44,7 @@ void cmGeneratorExpressionEvaluationFile::Generate(cmLocalGenerator* lg,
|
||||||
std::string rawCondition = this->Condition->GetInput();
|
std::string rawCondition = this->Condition->GetInput();
|
||||||
if (!rawCondition.empty())
|
if (!rawCondition.empty())
|
||||||
{
|
{
|
||||||
std::string condResult = this->Condition->Evaluate(lg->GetMakefile(),
|
std::string condResult = this->Condition->Evaluate(lg,
|
||||||
config,
|
config,
|
||||||
false, 0, 0, 0, lang);
|
false, 0, 0, 0, lang);
|
||||||
if (condResult == "0")
|
if (condResult == "0")
|
||||||
|
@ -62,10 +62,10 @@ void cmGeneratorExpressionEvaluationFile::Generate(cmLocalGenerator* lg,
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string outputFileName
|
const std::string outputFileName
|
||||||
= this->OutputFileExpr->Evaluate(lg->GetMakefile(), config,
|
= this->OutputFileExpr->Evaluate(lg, config,
|
||||||
false, 0, 0, 0, lang);
|
false, 0, 0, 0, lang);
|
||||||
const std::string outputContent
|
const std::string outputContent
|
||||||
= inputExpression->Evaluate(lg->GetMakefile(),
|
= inputExpression->Evaluate(lg,
|
||||||
config,
|
config,
|
||||||
false, 0, 0, 0, lang);
|
false, 0, 0, 0, lang);
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ void cmGeneratorExpressionEvaluationFile::CreateOutputFile(
|
||||||
for(std::vector<std::string>::const_iterator le = enabledLanguages.begin();
|
for(std::vector<std::string>::const_iterator le = enabledLanguages.begin();
|
||||||
le != enabledLanguages.end(); ++le)
|
le != enabledLanguages.end(); ++le)
|
||||||
{
|
{
|
||||||
std::string name = this->OutputFileExpr->Evaluate(lg->GetMakefile(),
|
std::string name = this->OutputFileExpr->Evaluate(lg,
|
||||||
config,
|
config,
|
||||||
false, 0, 0, 0, *le);
|
false, 0, 0, 0, *le);
|
||||||
cmSourceFile* sf = lg->GetMakefile()->GetOrCreateSource(name);
|
cmSourceFile* sf = lg->GetMakefile()->GetOrCreateSource(name);
|
||||||
|
|
|
@ -17,15 +17,16 @@
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
std::string cmGeneratorExpressionNode::EvaluateDependentExpression(
|
std::string cmGeneratorExpressionNode::EvaluateDependentExpression(
|
||||||
std::string const& prop, cmMakefile *makefile,
|
std::string const& prop, cmLocalGenerator *lg,
|
||||||
cmGeneratorExpressionContext *context,
|
cmGeneratorExpressionContext *context,
|
||||||
cmTarget const* headTarget, cmTarget const* currentTarget,
|
cmGeneratorTarget const* headTarget,
|
||||||
|
cmGeneratorTarget const* currentTarget,
|
||||||
cmGeneratorExpressionDAGChecker *dagChecker)
|
cmGeneratorExpressionDAGChecker *dagChecker)
|
||||||
{
|
{
|
||||||
cmGeneratorExpression ge(context->Backtrace);
|
cmGeneratorExpression ge(context->Backtrace);
|
||||||
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(prop);
|
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(prop);
|
||||||
cge->SetEvaluateForBuildsystem(context->EvaluateForBuildsystem);
|
cge->SetEvaluateForBuildsystem(context->EvaluateForBuildsystem);
|
||||||
std::string result = cge->Evaluate(makefile,
|
std::string result = cge->Evaluate(lg,
|
||||||
context->Config,
|
context->Config,
|
||||||
context->Quiet,
|
context->Quiet,
|
||||||
headTarget,
|
headTarget,
|
||||||
|
@ -367,7 +368,8 @@ struct CompilerIdNode : public cmGeneratorExpressionNode
|
||||||
const std::string &lang) const
|
const std::string &lang) const
|
||||||
{
|
{
|
||||||
const char *compilerId =
|
const char *compilerId =
|
||||||
context->Makefile->GetSafeDefinition("CMAKE_" + lang + "_COMPILER_ID");
|
context->LG->GetMakefile()
|
||||||
|
->GetSafeDefinition("CMAKE_" + lang + "_COMPILER_ID");
|
||||||
if (parameters.empty())
|
if (parameters.empty())
|
||||||
{
|
{
|
||||||
return compilerId ? compilerId : "";
|
return compilerId ? compilerId : "";
|
||||||
|
@ -391,13 +393,13 @@ struct CompilerIdNode : public cmGeneratorExpressionNode
|
||||||
|
|
||||||
if (cmsysString_strcasecmp(parameters.begin()->c_str(), compilerId) == 0)
|
if (cmsysString_strcasecmp(parameters.begin()->c_str(), compilerId) == 0)
|
||||||
{
|
{
|
||||||
switch(context->Makefile->GetPolicyStatus(cmPolicies::CMP0044))
|
switch(context->LG->GetMakefile()->GetPolicyStatus(cmPolicies::CMP0044))
|
||||||
{
|
{
|
||||||
case cmPolicies::WARN:
|
case cmPolicies::WARN:
|
||||||
{
|
{
|
||||||
std::ostringstream e;
|
std::ostringstream e;
|
||||||
e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0044);
|
e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0044);
|
||||||
context->Makefile->GetCMakeInstance()
|
context->LG->GetCMakeInstance()
|
||||||
->IssueMessage(cmake::AUTHOR_WARNING,
|
->IssueMessage(cmake::AUTHOR_WARNING,
|
||||||
e.str(), context->Backtrace);
|
e.str(), context->Backtrace);
|
||||||
}
|
}
|
||||||
|
@ -470,8 +472,9 @@ struct CompilerVersionNode : public cmGeneratorExpressionNode
|
||||||
cmGeneratorExpressionDAGChecker *,
|
cmGeneratorExpressionDAGChecker *,
|
||||||
const std::string &lang) const
|
const std::string &lang) const
|
||||||
{
|
{
|
||||||
const char *compilerVersion = context->Makefile->GetSafeDefinition(
|
const char *compilerVersion =
|
||||||
"CMAKE_" + lang + "_COMPILER_VERSION");
|
context->LG->GetMakefile()->GetSafeDefinition(
|
||||||
|
"CMAKE_" + lang + "_COMPILER_VERSION");
|
||||||
if (parameters.empty())
|
if (parameters.empty())
|
||||||
{
|
{
|
||||||
return compilerVersion ? compilerVersion : "";
|
return compilerVersion ? compilerVersion : "";
|
||||||
|
@ -553,7 +556,7 @@ struct PlatformIdNode : public cmGeneratorExpressionNode
|
||||||
cmGeneratorExpressionDAGChecker *) const
|
cmGeneratorExpressionDAGChecker *) const
|
||||||
{
|
{
|
||||||
const char *platformId =
|
const char *platformId =
|
||||||
context->Makefile->GetSafeDefinition("CMAKE_SYSTEM_NAME");
|
context->LG->GetMakefile()->GetSafeDefinition("CMAKE_SYSTEM_NAME");
|
||||||
if (parameters.empty())
|
if (parameters.empty())
|
||||||
{
|
{
|
||||||
return platformId ? platformId : "";
|
return platformId ? platformId : "";
|
||||||
|
@ -768,7 +771,7 @@ static const struct CompileLanguageNode : public cmGeneratorExpressionNode
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::string> enabledLanguages;
|
std::vector<std::string> enabledLanguages;
|
||||||
cmGlobalGenerator* gg = context->Makefile->GetGlobalGenerator();
|
cmGlobalGenerator* gg = context->LG->GetGlobalGenerator();
|
||||||
gg->GetEnabledLanguages(enabledLanguages);
|
gg->GetEnabledLanguages(enabledLanguages);
|
||||||
if (!parameters.empty() &&
|
if (!parameters.empty() &&
|
||||||
std::find(enabledLanguages.begin(), enabledLanguages.end(),
|
std::find(enabledLanguages.begin(), enabledLanguages.end(),
|
||||||
|
@ -858,10 +861,10 @@ getLinkedTargetsContent(
|
||||||
{
|
{
|
||||||
linkedTargetsContent =
|
linkedTargetsContent =
|
||||||
cmGeneratorExpressionNode::EvaluateDependentExpression(depString,
|
cmGeneratorExpressionNode::EvaluateDependentExpression(depString,
|
||||||
target->Target->GetMakefile(),
|
target->GetLocalGenerator(),
|
||||||
context,
|
context,
|
||||||
headTarget->Target,
|
headTarget,
|
||||||
target->Target, dagChecker);
|
target, dagChecker);
|
||||||
}
|
}
|
||||||
linkedTargetsContent =
|
linkedTargetsContent =
|
||||||
cmGeneratorExpression::StripEmptyListElements(linkedTargetsContent);
|
cmGeneratorExpression::StripEmptyListElements(linkedTargetsContent);
|
||||||
|
@ -940,16 +943,17 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
|
||||||
}
|
}
|
||||||
if(propertyName == "ALIASED_TARGET")
|
if(propertyName == "ALIASED_TARGET")
|
||||||
{
|
{
|
||||||
if(context->Makefile->IsAlias(targetName))
|
if(context->LG->GetMakefile()->IsAlias(targetName))
|
||||||
{
|
{
|
||||||
if(cmTarget* tgt = context->Makefile->FindTargetToUse(targetName))
|
if(cmTarget* tgt =
|
||||||
|
context->LG->GetMakefile()->FindTargetToUse(targetName))
|
||||||
{
|
{
|
||||||
return tgt->GetName();
|
return tgt->GetName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
target = context->Makefile->FindTargetToUse(targetName);
|
target = context->LG->GetMakefile()->FindTargetToUse(targetName);
|
||||||
|
|
||||||
if (!target)
|
if (!target)
|
||||||
{
|
{
|
||||||
|
@ -994,7 +998,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
|
||||||
assert(target);
|
assert(target);
|
||||||
|
|
||||||
cmGeneratorTarget* gtgt =
|
cmGeneratorTarget* gtgt =
|
||||||
context->Makefile->GetGlobalGenerator()->GetGeneratorTarget(target);
|
context->LG->GetGlobalGenerator()->GetGeneratorTarget(target);
|
||||||
|
|
||||||
if (propertyName == "LINKER_LANGUAGE")
|
if (propertyName == "LINKER_LANGUAGE")
|
||||||
{
|
{
|
||||||
|
@ -1099,7 +1103,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
|
||||||
"COMPILE_DEFINITIONS_"))
|
"COMPILE_DEFINITIONS_"))
|
||||||
{
|
{
|
||||||
cmPolicies::PolicyStatus polSt =
|
cmPolicies::PolicyStatus polSt =
|
||||||
context->Makefile->GetPolicyStatus(cmPolicies::CMP0043);
|
context->LG->GetMakefile()->GetPolicyStatus(cmPolicies::CMP0043);
|
||||||
if (polSt == cmPolicies::WARN || polSt == cmPolicies::OLD)
|
if (polSt == cmPolicies::WARN || polSt == cmPolicies::OLD)
|
||||||
{
|
{
|
||||||
interfacePropertyName = "INTERFACE_COMPILE_DEFINITIONS";
|
interfacePropertyName = "INTERFACE_COMPILE_DEFINITIONS";
|
||||||
|
@ -1112,7 +1116,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
|
||||||
if(isInterfaceProperty)
|
if(isInterfaceProperty)
|
||||||
{
|
{
|
||||||
cmGeneratorTarget* gHeadTarget =
|
cmGeneratorTarget* gHeadTarget =
|
||||||
context->Makefile->GetGlobalGenerator()
|
context->LG->GetGlobalGenerator()
|
||||||
->GetGeneratorTarget(headTarget);
|
->GetGeneratorTarget(headTarget);
|
||||||
if(cmLinkInterfaceLibraries const* iface =
|
if(cmLinkInterfaceLibraries const* iface =
|
||||||
gtgt->GetLinkInterfaceLibraries(context->Config, gHeadTarget, true))
|
gtgt->GetLinkInterfaceLibraries(context->Config, gHeadTarget, true))
|
||||||
|
@ -1212,9 +1216,11 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
|
||||||
}
|
}
|
||||||
if(!interfacePropertyName.empty())
|
if(!interfacePropertyName.empty())
|
||||||
{
|
{
|
||||||
|
cmGeneratorTarget* gHeadTarget =
|
||||||
|
context->LG->GetGlobalGenerator()->GetGeneratorTarget(headTarget);
|
||||||
std::string result = this->EvaluateDependentExpression(prop,
|
std::string result = this->EvaluateDependentExpression(prop,
|
||||||
context->Makefile, context,
|
context->LG, context,
|
||||||
headTarget, target, &dagChecker);
|
gHeadTarget, gtgt, &dagChecker);
|
||||||
if (!linkedTargetsContent.empty())
|
if (!linkedTargetsContent.empty())
|
||||||
{
|
{
|
||||||
result += (result.empty() ? "" : ";") + linkedTargetsContent;
|
result += (result.empty() ? "" : ";") + linkedTargetsContent;
|
||||||
|
@ -1269,7 +1275,7 @@ static const struct TargetObjectsNode : public cmGeneratorExpressionNode
|
||||||
|
|
||||||
std::string tgtName = parameters.front();
|
std::string tgtName = parameters.front();
|
||||||
cmGeneratorTarget* gt =
|
cmGeneratorTarget* gt =
|
||||||
context->Makefile->FindGeneratorTargetToUse(tgtName);
|
context->LG->FindGeneratorTargetToUse(tgtName);
|
||||||
if (!gt)
|
if (!gt)
|
||||||
{
|
{
|
||||||
std::ostringstream e;
|
std::ostringstream e;
|
||||||
|
@ -1312,7 +1318,8 @@ static const struct TargetObjectsNode : public cmGeneratorExpressionNode
|
||||||
assert(!map_it->second.empty());
|
assert(!map_it->second.empty());
|
||||||
result += sep;
|
result += sep;
|
||||||
std::string objFile = obj_dir + map_it->second;
|
std::string objFile = obj_dir + map_it->second;
|
||||||
cmSourceFile* sf = context->Makefile->GetOrCreateSource(objFile, true);
|
cmSourceFile* sf =
|
||||||
|
context->LG->GetMakefile()->GetOrCreateSource(objFile, true);
|
||||||
sf->SetObjectLibrary(tgtName);
|
sf->SetObjectLibrary(tgtName);
|
||||||
sf->SetProperty("EXTERNAL_OBJECT", "1");
|
sf->SetProperty("EXTERNAL_OBJECT", "1");
|
||||||
result += objFile;
|
result += objFile;
|
||||||
|
@ -1354,7 +1361,7 @@ static const struct CompileFeaturesNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
std::string error;
|
std::string error;
|
||||||
std::string lang;
|
std::string lang;
|
||||||
if (!context->Makefile->CompileFeatureKnown(context->HeadTarget,
|
if (!context->LG->GetMakefile()->CompileFeatureKnown(context->HeadTarget,
|
||||||
*it, lang, &error))
|
*it, lang, &error))
|
||||||
{
|
{
|
||||||
reportError(context, content->GetOriginalExpression(), error);
|
reportError(context, content->GetOriginalExpression(), error);
|
||||||
|
@ -1365,7 +1372,8 @@ static const struct CompileFeaturesNode : public cmGeneratorExpressionNode
|
||||||
if (availableFeatures.find(lang) == availableFeatures.end())
|
if (availableFeatures.find(lang) == availableFeatures.end())
|
||||||
{
|
{
|
||||||
const char* featuresKnown
|
const char* featuresKnown
|
||||||
= context->Makefile->CompileFeaturesAvailable(lang, &error);
|
= context->LG->GetMakefile()->CompileFeaturesAvailable(lang,
|
||||||
|
&error);
|
||||||
if (!featuresKnown)
|
if (!featuresKnown)
|
||||||
{
|
{
|
||||||
reportError(context, content->GetOriginalExpression(), error);
|
reportError(context, content->GetOriginalExpression(), error);
|
||||||
|
@ -1383,7 +1391,7 @@ static const struct CompileFeaturesNode : public cmGeneratorExpressionNode
|
||||||
{
|
{
|
||||||
std::vector<std::string> const& langAvailable
|
std::vector<std::string> const& langAvailable
|
||||||
= availableFeatures[lit->first];
|
= availableFeatures[lit->first];
|
||||||
const char* standardDefault = context->Makefile
|
const char* standardDefault = context->LG->GetMakefile()
|
||||||
->GetDefinition("CMAKE_" + lit->first + "_STANDARD_DEFAULT");
|
->GetDefinition("CMAKE_" + lit->first + "_STANDARD_DEFAULT");
|
||||||
for (std::vector<std::string>::const_iterator it = lit->second.begin();
|
for (std::vector<std::string>::const_iterator it = lit->second.begin();
|
||||||
it != lit->second.end(); ++it)
|
it != lit->second.end(); ++it)
|
||||||
|
@ -1399,7 +1407,7 @@ static const struct CompileFeaturesNode : public cmGeneratorExpressionNode
|
||||||
// All features known for the language are always available.
|
// All features known for the language are always available.
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!context->Makefile->HaveStandardAvailable(target,
|
if (!context->LG->GetMakefile()->HaveStandardAvailable(target,
|
||||||
lit->first, *it))
|
lit->first, *it))
|
||||||
{
|
{
|
||||||
if (evalLL)
|
if (evalLL)
|
||||||
|
@ -1617,7 +1625,7 @@ struct TargetFilesystemArtifactResultCreator<ArtifactPdbTag>
|
||||||
|
|
||||||
std::string pdbSupportVar = "CMAKE_" + language + "_LINKER_SUPPORTS_PDB";
|
std::string pdbSupportVar = "CMAKE_" + language + "_LINKER_SUPPORTS_PDB";
|
||||||
|
|
||||||
if(!context->Makefile->IsOn(pdbSupportVar))
|
if(!context->LG->GetMakefile()->IsOn(pdbSupportVar))
|
||||||
{
|
{
|
||||||
::reportError(context, content->GetOriginalExpression(),
|
::reportError(context, content->GetOriginalExpression(),
|
||||||
"TARGET_PDB_FILE is not supported by the target linker.");
|
"TARGET_PDB_FILE is not supported by the target linker.");
|
||||||
|
@ -1731,7 +1739,7 @@ struct TargetFilesystemArtifact : public cmGeneratorExpressionNode
|
||||||
return std::string();
|
return std::string();
|
||||||
}
|
}
|
||||||
cmGeneratorTarget* target =
|
cmGeneratorTarget* target =
|
||||||
context->Makefile->FindGeneratorTargetToUse(name);
|
context->LG->FindGeneratorTargetToUse(name);
|
||||||
if(!target)
|
if(!target)
|
||||||
{
|
{
|
||||||
::reportError(context, content->GetOriginalExpression(),
|
::reportError(context, content->GetOriginalExpression(),
|
||||||
|
@ -1813,7 +1821,7 @@ static const struct ShellPathNode : public cmGeneratorExpressionNode
|
||||||
"\"" + parameters.front() + "\" is not an absolute path.");
|
"\"" + parameters.front() + "\" is not an absolute path.");
|
||||||
return std::string();
|
return std::string();
|
||||||
}
|
}
|
||||||
cmOutputConverter converter(context->Makefile->GetStateSnapshot());
|
cmOutputConverter converter(context->LG->GetStateSnapshot());
|
||||||
return converter.ConvertDirectorySeparatorsForShell(parameters.front());
|
return converter.ConvertDirectorySeparatorsForShell(parameters.front());
|
||||||
}
|
}
|
||||||
} shellPathNode;
|
} shellPathNode;
|
||||||
|
@ -1897,7 +1905,7 @@ void reportError(cmGeneratorExpressionContext *context,
|
||||||
e << "Error evaluating generator expression:\n"
|
e << "Error evaluating generator expression:\n"
|
||||||
<< " " << expr << "\n"
|
<< " " << expr << "\n"
|
||||||
<< result;
|
<< result;
|
||||||
context->Makefile->GetCMakeInstance()
|
context->LG->GetCMakeInstance()
|
||||||
->IssueMessage(cmake::FATAL_ERROR, e.str(),
|
->IssueMessage(cmake::FATAL_ERROR, e.str(),
|
||||||
context->Backtrace);
|
context->Backtrace);
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,9 +54,10 @@ struct cmGeneratorExpressionNode
|
||||||
) const = 0;
|
) const = 0;
|
||||||
|
|
||||||
static std::string EvaluateDependentExpression(
|
static std::string EvaluateDependentExpression(
|
||||||
std::string const& prop, cmMakefile *makefile,
|
std::string const& prop, cmLocalGenerator *lg,
|
||||||
cmGeneratorExpressionContext *context,
|
cmGeneratorExpressionContext *context,
|
||||||
cmTarget const* headTarget, cmTarget const* currentTarget,
|
const cmGeneratorTarget* headTarget,
|
||||||
|
const cmGeneratorTarget* currentTarget,
|
||||||
cmGeneratorExpressionDAGChecker *dagChecker);
|
cmGeneratorExpressionDAGChecker *dagChecker);
|
||||||
|
|
||||||
static const cmGeneratorExpressionNode* GetNode(
|
static const cmGeneratorExpressionNode* GetNode(
|
||||||
|
|
|
@ -453,7 +453,7 @@ std::string cmGeneratorTarget::GetOutputName(const std::string& config,
|
||||||
// Now evaluate genex and update the previously-prepared map entry.
|
// Now evaluate genex and update the previously-prepared map entry.
|
||||||
cmGeneratorExpression ge;
|
cmGeneratorExpression ge;
|
||||||
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(outName);
|
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(outName);
|
||||||
i->second = cge->Evaluate(this->Makefile, config);
|
i->second = cge->Evaluate(this->LocalGenerator, config);
|
||||||
}
|
}
|
||||||
else if(i->second.empty())
|
else if(i->second.empty())
|
||||||
{
|
{
|
||||||
|
@ -510,7 +510,7 @@ cmGeneratorTarget::GetSourceDepends(cmSourceFile const* sf) const
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handleSystemIncludesDep(cmMakefile *mf,
|
static void handleSystemIncludesDep(cmLocalGenerator *lg,
|
||||||
cmGeneratorTarget const* depTgt,
|
cmGeneratorTarget const* depTgt,
|
||||||
const std::string& config,
|
const std::string& config,
|
||||||
cmGeneratorTarget const* headTarget,
|
cmGeneratorTarget const* headTarget,
|
||||||
|
@ -523,9 +523,9 @@ static void handleSystemIncludesDep(cmMakefile *mf,
|
||||||
{
|
{
|
||||||
cmGeneratorExpression ge;
|
cmGeneratorExpression ge;
|
||||||
cmSystemTools::ExpandListArgument(ge.Parse(dirs)
|
cmSystemTools::ExpandListArgument(ge.Parse(dirs)
|
||||||
->Evaluate(mf,
|
->Evaluate(lg,
|
||||||
config, false, headTarget->Target,
|
config, false, headTarget,
|
||||||
depTgt->Target, dagChecker), result);
|
depTgt, dagChecker), result);
|
||||||
}
|
}
|
||||||
if (!depTgt->IsImported() || excludeImported)
|
if (!depTgt->IsImported() || excludeImported)
|
||||||
{
|
{
|
||||||
|
@ -537,9 +537,9 @@ static void handleSystemIncludesDep(cmMakefile *mf,
|
||||||
{
|
{
|
||||||
cmGeneratorExpression ge;
|
cmGeneratorExpression ge;
|
||||||
cmSystemTools::ExpandListArgument(ge.Parse(dirs)
|
cmSystemTools::ExpandListArgument(ge.Parse(dirs)
|
||||||
->Evaluate(mf,
|
->Evaluate(lg,
|
||||||
config, false, headTarget->Target,
|
config, false, headTarget,
|
||||||
depTgt->Target, dagChecker), result);
|
depTgt, dagChecker), result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -879,8 +879,8 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const std::string& dir,
|
||||||
{
|
{
|
||||||
cmGeneratorExpression ge;
|
cmGeneratorExpression ge;
|
||||||
cmSystemTools::ExpandListArgument(ge.Parse(*it)
|
cmSystemTools::ExpandListArgument(ge.Parse(*it)
|
||||||
->Evaluate(this->Makefile,
|
->Evaluate(this->LocalGenerator,
|
||||||
config, false, this->Target,
|
config, false, this,
|
||||||
&dagChecker), result);
|
&dagChecker), result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -889,7 +889,7 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const std::string& dir,
|
||||||
for(std::vector<cmGeneratorTarget const*>::const_iterator
|
for(std::vector<cmGeneratorTarget const*>::const_iterator
|
||||||
li = deps.begin(), le = deps.end(); li != le; ++li)
|
li = deps.begin(), le = deps.end(); li != le; ++li)
|
||||||
{
|
{
|
||||||
handleSystemIncludesDep(this->Makefile, *li, config, this,
|
handleSystemIncludesDep(this->LocalGenerator, *li, config, this,
|
||||||
&dagChecker, result, excludeImported);
|
&dagChecker, result, excludeImported);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -961,11 +961,12 @@ static bool processSources(cmGeneratorTarget const* tgt,
|
||||||
cmLinkImplItem const& item = (*it)->LinkImplItem;
|
cmLinkImplItem const& item = (*it)->LinkImplItem;
|
||||||
std::string const& targetName = item;
|
std::string const& targetName = item;
|
||||||
std::vector<std::string> entrySources;
|
std::vector<std::string> entrySources;
|
||||||
cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(mf,
|
cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(
|
||||||
|
tgt->GetLocalGenerator(),
|
||||||
config,
|
config,
|
||||||
false,
|
false,
|
||||||
tgt->Target,
|
tgt,
|
||||||
tgt->Target,
|
tgt,
|
||||||
dagChecker),
|
dagChecker),
|
||||||
entrySources);
|
entrySources);
|
||||||
|
|
||||||
|
@ -2054,10 +2055,10 @@ void cmGeneratorTarget::GetAutoUicOptions(std::vector<std::string> &result,
|
||||||
this->GetName(),
|
this->GetName(),
|
||||||
"AUTOUIC_OPTIONS", 0, 0);
|
"AUTOUIC_OPTIONS", 0, 0);
|
||||||
cmSystemTools::ExpandListArgument(ge.Parse(prop)
|
cmSystemTools::ExpandListArgument(ge.Parse(prop)
|
||||||
->Evaluate(this->Makefile,
|
->Evaluate(this->LocalGenerator,
|
||||||
config,
|
config,
|
||||||
false,
|
false,
|
||||||
this->Target,
|
this,
|
||||||
&dagChecker),
|
&dagChecker),
|
||||||
result);
|
result);
|
||||||
}
|
}
|
||||||
|
@ -2304,7 +2305,8 @@ bool cmTargetTraceDependencies::IsUtility(std::string const& dep)
|
||||||
|
|
||||||
// Check for a target with this name.
|
// Check for a target with this name.
|
||||||
if(cmGeneratorTarget* t
|
if(cmGeneratorTarget* t
|
||||||
= this->Makefile->FindGeneratorTargetToUse(util))
|
= this->GeneratorTarget->
|
||||||
|
GetLocalGenerator()->FindGeneratorTargetToUse(util))
|
||||||
{
|
{
|
||||||
// If we find the target and the dep was given as a full path,
|
// If we find the target and the dep was given as a full path,
|
||||||
// then make sure it was not a full path to something else, and
|
// then make sure it was not a full path to something else, and
|
||||||
|
@ -2376,7 +2378,7 @@ cmTargetTraceDependencies
|
||||||
{
|
{
|
||||||
const cmsys::auto_ptr<cmCompiledGeneratorExpression> cge
|
const cmsys::auto_ptr<cmCompiledGeneratorExpression> cge
|
||||||
= ge.Parse(*cli);
|
= ge.Parse(*cli);
|
||||||
cge->Evaluate(this->Makefile, "", true);
|
cge->Evaluate(this->GeneratorTarget->GetLocalGenerator(), "", true);
|
||||||
std::set<cmTarget*> geTargets = cge->GetTargets();
|
std::set<cmTarget*> geTargets = cge->GetTargets();
|
||||||
targets.insert(geTargets.begin(), geTargets.end());
|
targets.insert(geTargets.begin(), geTargets.end());
|
||||||
}
|
}
|
||||||
|
@ -2530,8 +2532,6 @@ static void processIncludeDirectories(cmGeneratorTarget const* tgt,
|
||||||
const std::string& config, bool debugIncludes,
|
const std::string& config, bool debugIncludes,
|
||||||
const std::string& language)
|
const std::string& language)
|
||||||
{
|
{
|
||||||
cmMakefile *mf = tgt->Target->GetMakefile();
|
|
||||||
|
|
||||||
for (std::vector<cmGeneratorTarget::TargetPropertyEntry*>::const_iterator
|
for (std::vector<cmGeneratorTarget::TargetPropertyEntry*>::const_iterator
|
||||||
it = entries.begin(), end = entries.end(); it != end; ++it)
|
it = entries.begin(), end = entries.end(); it != end; ++it)
|
||||||
{
|
{
|
||||||
|
@ -2540,10 +2540,11 @@ static void processIncludeDirectories(cmGeneratorTarget const* tgt,
|
||||||
bool const fromImported = item.Target && item.Target->IsImported();
|
bool const fromImported = item.Target && item.Target->IsImported();
|
||||||
bool const checkCMP0027 = item.FromGenex;
|
bool const checkCMP0027 = item.FromGenex;
|
||||||
std::vector<std::string> entryIncludes;
|
std::vector<std::string> entryIncludes;
|
||||||
cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(mf,
|
cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(
|
||||||
|
tgt->GetLocalGenerator(),
|
||||||
config,
|
config,
|
||||||
false,
|
false,
|
||||||
tgt->Target,
|
tgt,
|
||||||
dagChecker, language),
|
dagChecker, language),
|
||||||
entryIncludes);
|
entryIncludes);
|
||||||
|
|
||||||
|
@ -2746,16 +2747,15 @@ static void processCompileOptionsInternal(cmGeneratorTarget const* tgt,
|
||||||
const std::string& config, bool debugOptions, const char *logName,
|
const std::string& config, bool debugOptions, const char *logName,
|
||||||
std::string const& language)
|
std::string const& language)
|
||||||
{
|
{
|
||||||
cmMakefile *mf = tgt->Target->GetMakefile();
|
|
||||||
|
|
||||||
for (std::vector<cmGeneratorTarget::TargetPropertyEntry*>::const_iterator
|
for (std::vector<cmGeneratorTarget::TargetPropertyEntry*>::const_iterator
|
||||||
it = entries.begin(), end = entries.end(); it != end; ++it)
|
it = entries.begin(), end = entries.end(); it != end; ++it)
|
||||||
{
|
{
|
||||||
std::vector<std::string> entryOptions;
|
std::vector<std::string> entryOptions;
|
||||||
cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(mf,
|
cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(
|
||||||
|
tgt->GetLocalGenerator(),
|
||||||
config,
|
config,
|
||||||
false,
|
false,
|
||||||
tgt->Target,
|
tgt,
|
||||||
dagChecker,
|
dagChecker,
|
||||||
language),
|
language),
|
||||||
entryOptions);
|
entryOptions);
|
||||||
|
@ -4452,11 +4452,11 @@ void cmGeneratorTarget::ExpandLinkItems(std::string const& prop,
|
||||||
std::vector<std::string> libs;
|
std::vector<std::string> libs;
|
||||||
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(value);
|
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(value);
|
||||||
cmSystemTools::ExpandListArgument(cge->Evaluate(
|
cmSystemTools::ExpandListArgument(cge->Evaluate(
|
||||||
this->Makefile,
|
this->LocalGenerator,
|
||||||
config,
|
config,
|
||||||
false,
|
false,
|
||||||
headTarget->Target,
|
headTarget,
|
||||||
this->Target, &dagChecker), libs);
|
this, &dagChecker), libs);
|
||||||
this->LookupLinkItems(libs, items);
|
this->LookupLinkItems(libs, items);
|
||||||
hadHeadSensitiveCondition = cge->GetHadHeadSensitiveCondition();
|
hadHeadSensitiveCondition = cge->GetHadHeadSensitiveCondition();
|
||||||
}
|
}
|
||||||
|
@ -4777,7 +4777,7 @@ bool cmGeneratorTarget::ComputeOutputDir(const std::string& config,
|
||||||
cmGeneratorExpression ge;
|
cmGeneratorExpression ge;
|
||||||
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
|
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
|
||||||
ge.Parse(config_outdir);
|
ge.Parse(config_outdir);
|
||||||
out = cge->Evaluate(this->Makefile, config);
|
out = cge->Evaluate(this->LocalGenerator, config);
|
||||||
|
|
||||||
// Skip per-configuration subdirectory.
|
// Skip per-configuration subdirectory.
|
||||||
conf = "";
|
conf = "";
|
||||||
|
@ -4788,7 +4788,7 @@ bool cmGeneratorTarget::ComputeOutputDir(const std::string& config,
|
||||||
cmGeneratorExpression ge;
|
cmGeneratorExpression ge;
|
||||||
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
|
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
|
||||||
ge.Parse(outdir);
|
ge.Parse(outdir);
|
||||||
out = cge->Evaluate(this->Makefile, config);
|
out = cge->Evaluate(this->LocalGenerator, config);
|
||||||
|
|
||||||
// Skip per-configuration subdirectory if the value contained a
|
// Skip per-configuration subdirectory if the value contained a
|
||||||
// generator expression.
|
// generator expression.
|
||||||
|
@ -5347,7 +5347,7 @@ void cmGeneratorTarget::ComputeLinkImplementationLibraries(
|
||||||
cmsys::auto_ptr<cmCompiledGeneratorExpression> const cge =
|
cmsys::auto_ptr<cmCompiledGeneratorExpression> const cge =
|
||||||
ge.Parse(*le);
|
ge.Parse(*le);
|
||||||
std::string const evaluated =
|
std::string const evaluated =
|
||||||
cge->Evaluate(this->Makefile, config, false, head->Target, &dagChecker);
|
cge->Evaluate(this->LocalGenerator, config, false, head, &dagChecker);
|
||||||
cmSystemTools::ExpandListArgument(evaluated, llibs);
|
cmSystemTools::ExpandListArgument(evaluated, llibs);
|
||||||
if(cge->GetHadHeadSensitiveCondition())
|
if(cge->GetHadHeadSensitiveCondition())
|
||||||
{
|
{
|
||||||
|
|
|
@ -73,7 +73,7 @@ cmGlobalGenerator::cmGlobalGenerator(cmake* cm)
|
||||||
this->CurrentMakefile = 0;
|
this->CurrentMakefile = 0;
|
||||||
this->TryCompileOuterMakefile = 0;
|
this->TryCompileOuterMakefile = 0;
|
||||||
|
|
||||||
this->ConfigureDoneCMP0026 = false;
|
this->ConfigureDoneCMP0026AndCMP0024 = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmGlobalGenerator::~cmGlobalGenerator()
|
cmGlobalGenerator::~cmGlobalGenerator()
|
||||||
|
@ -234,6 +234,16 @@ bool cmGlobalGenerator::GenerateImportFile(const std::string &file)
|
||||||
if (it != this->BuildExportSets.end())
|
if (it != this->BuildExportSets.end())
|
||||||
{
|
{
|
||||||
bool result = it->second->GenerateImportFile();
|
bool result = it->second->GenerateImportFile();
|
||||||
|
|
||||||
|
if (!this->ConfigureDoneCMP0026AndCMP0024)
|
||||||
|
{
|
||||||
|
for (std::vector<cmMakefile*>::const_iterator mit =
|
||||||
|
this->Makefiles.begin(); mit != this->Makefiles.end(); ++mit)
|
||||||
|
{
|
||||||
|
(*mit)->RemoveExportBuildFileGeneratorCMP0024(it->second);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
delete it->second;
|
delete it->second;
|
||||||
it->second = 0;
|
it->second = 0;
|
||||||
this->BuildExportSets.erase(it);
|
this->BuildExportSets.erase(it);
|
||||||
|
@ -1122,11 +1132,11 @@ void cmGlobalGenerator::Configure()
|
||||||
this->CMakeInstance->GetHomeOutputDirectory());
|
this->CMakeInstance->GetHomeOutputDirectory());
|
||||||
|
|
||||||
// now do it
|
// now do it
|
||||||
this->ConfigureDoneCMP0026 = false;
|
this->ConfigureDoneCMP0026AndCMP0024 = false;
|
||||||
dirMf->Configure();
|
dirMf->Configure();
|
||||||
dirMf->EnforceDirectoryLevelRules();
|
dirMf->EnforceDirectoryLevelRules();
|
||||||
|
|
||||||
this->ConfigureDoneCMP0026 = true;
|
this->ConfigureDoneCMP0026AndCMP0024 = true;
|
||||||
|
|
||||||
// Put a copy of each global target in every directory.
|
// Put a copy of each global target in every directory.
|
||||||
cmTargets globalTargets;
|
cmTargets globalTargets;
|
||||||
|
@ -1226,6 +1236,20 @@ bool cmGlobalGenerator::CheckALLOW_DUPLICATE_CUSTOM_TARGETS() const
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cmGlobalGenerator::ComputeBuildFileGenerators()
|
||||||
|
{
|
||||||
|
for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i)
|
||||||
|
{
|
||||||
|
std::vector<cmExportBuildFileGenerator*> gens =
|
||||||
|
this->Makefiles[i]->GetExportBuildFileGenerators();
|
||||||
|
for (std::vector<cmExportBuildFileGenerator*>::const_iterator it =
|
||||||
|
gens.begin(); it != gens.end(); ++it)
|
||||||
|
{
|
||||||
|
(*it)->Compute(this->LocalGenerators[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool cmGlobalGenerator::Compute()
|
bool cmGlobalGenerator::Compute()
|
||||||
{
|
{
|
||||||
// Some generators track files replaced during the Generate.
|
// Some generators track files replaced during the Generate.
|
||||||
|
@ -1255,6 +1279,8 @@ bool cmGlobalGenerator::Compute()
|
||||||
this->CreateQtAutoGeneratorsTargets();
|
this->CreateQtAutoGeneratorsTargets();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
this->ComputeBuildFileGenerators();
|
||||||
|
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
// Add generator specific helper commands
|
// Add generator specific helper commands
|
||||||
|
@ -1552,7 +1578,7 @@ void cmGlobalGenerator::CreateGeneratorTargets(TargetTypes targetTypes,
|
||||||
this->GeneratorTargets[*j] = gt;
|
this->GeneratorTargets[*j] = gt;
|
||||||
generatorTargets[*j] = gt;
|
generatorTargets[*j] = gt;
|
||||||
}
|
}
|
||||||
mf->SetGeneratorTargets(generatorTargets);
|
lg->SetGeneratorTargets(generatorTargets);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
|
@ -362,7 +362,10 @@ public:
|
||||||
cmFileLockPool& GetFileLockPool() { return FileLockPool; }
|
cmFileLockPool& GetFileLockPool() { return FileLockPool; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool GetConfigureDoneCMP0026() const { return this->ConfigureDoneCMP0026; }
|
bool GetConfigureDoneCMP0026() const
|
||||||
|
{ return this->ConfigureDoneCMP0026AndCMP0024; }
|
||||||
|
|
||||||
|
void ComputeBuildFileGenerators();
|
||||||
|
|
||||||
std::string MakeSilentFlag;
|
std::string MakeSilentFlag;
|
||||||
protected:
|
protected:
|
||||||
|
@ -520,7 +523,7 @@ protected:
|
||||||
bool ForceUnixPaths;
|
bool ForceUnixPaths;
|
||||||
bool ToolSupportsColor;
|
bool ToolSupportsColor;
|
||||||
bool InstallTargetEnabled;
|
bool InstallTargetEnabled;
|
||||||
bool ConfigureDoneCMP0026;
|
bool ConfigureDoneCMP0026AndCMP0024;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -287,7 +287,7 @@ void cmGlobalGhsMultiGenerator::Generate()
|
||||||
{
|
{
|
||||||
cmLocalGhsMultiGenerator *lg =
|
cmLocalGhsMultiGenerator *lg =
|
||||||
static_cast<cmLocalGhsMultiGenerator *>(this->LocalGenerators[i]);
|
static_cast<cmLocalGhsMultiGenerator *>(this->LocalGenerators[i]);
|
||||||
cmGeneratorTargetsType tgts = lg->GetMakefile()->GetGeneratorTargets();
|
cmGeneratorTargetsType tgts = lg->GetGeneratorTargets();
|
||||||
this->UpdateBuildFiles(&tgts);
|
this->UpdateBuildFiles(&tgts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,8 +68,7 @@ void cmGlobalKdevelopGenerator::Generate()
|
||||||
for (std::vector<cmLocalGenerator*>::const_iterator lg=lgs.begin();
|
for (std::vector<cmLocalGenerator*>::const_iterator lg=lgs.begin();
|
||||||
lg!=lgs.end(); lg++)
|
lg!=lgs.end(); lg++)
|
||||||
{
|
{
|
||||||
cmMakefile* makefile=(*lg)->GetMakefile();
|
cmGeneratorTargetsType const& targets = (*lg)->GetGeneratorTargets();
|
||||||
cmGeneratorTargetsType const& targets = makefile->GetGeneratorTargets();
|
|
||||||
for (cmGeneratorTargetsType::const_iterator ti = targets.begin();
|
for (cmGeneratorTargetsType::const_iterator ti = targets.begin();
|
||||||
ti != targets.end(); ti++)
|
ti != targets.end(); ti++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -461,7 +461,7 @@ cmGlobalUnixMakefileGenerator3
|
||||||
// The directory-level rule should depend on the target-level rules
|
// The directory-level rule should depend on the target-level rules
|
||||||
// for all targets in the directory.
|
// for all targets in the directory.
|
||||||
std::vector<std::string> depends;
|
std::vector<std::string> depends;
|
||||||
cmGeneratorTargetsType targets = lg->GetMakefile()->GetGeneratorTargets();
|
cmGeneratorTargetsType targets = lg->GetGeneratorTargets();
|
||||||
for(cmGeneratorTargetsType::iterator l = targets.begin();
|
for(cmGeneratorTargetsType::iterator l = targets.begin();
|
||||||
l != targets.end(); ++l)
|
l != targets.end(); ++l)
|
||||||
{
|
{
|
||||||
|
@ -628,7 +628,7 @@ cmGlobalUnixMakefileGenerator3
|
||||||
lg = static_cast<cmLocalUnixMakefileGenerator3 *>
|
lg = static_cast<cmLocalUnixMakefileGenerator3 *>
|
||||||
(this->LocalGenerators[i]);
|
(this->LocalGenerators[i]);
|
||||||
// for each target Generate the rule files for each target.
|
// for each target Generate the rule files for each target.
|
||||||
cmGeneratorTargetsType targets = lg->GetMakefile()->GetGeneratorTargets();
|
cmGeneratorTargetsType targets = lg->GetGeneratorTargets();
|
||||||
for(cmGeneratorTargetsType::iterator t = targets.begin();
|
for(cmGeneratorTargetsType::iterator t = targets.begin();
|
||||||
t != targets.end(); ++t)
|
t != targets.end(); ++t)
|
||||||
{
|
{
|
||||||
|
@ -729,7 +729,7 @@ cmGlobalUnixMakefileGenerator3
|
||||||
depends.push_back("cmake_check_build_system");
|
depends.push_back("cmake_check_build_system");
|
||||||
|
|
||||||
// for each target Generate the rule files for each target.
|
// for each target Generate the rule files for each target.
|
||||||
cmGeneratorTargetsType targets = lg->GetMakefile()->GetGeneratorTargets();
|
cmGeneratorTargetsType targets = lg->GetGeneratorTargets();
|
||||||
for(cmGeneratorTargetsType::iterator t = targets.begin();
|
for(cmGeneratorTargetsType::iterator t = targets.begin();
|
||||||
t != targets.end(); ++t)
|
t != targets.end(); ++t)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1016,7 +1016,8 @@ cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild(
|
||||||
cmGeneratorExpression ge;
|
cmGeneratorExpression ge;
|
||||||
cmsys::auto_ptr<cmCompiledGeneratorExpression>
|
cmsys::auto_ptr<cmCompiledGeneratorExpression>
|
||||||
cge = ge.Parse(propertyValue);
|
cge = ge.Parse(propertyValue);
|
||||||
if(cmSystemTools::IsOn(cge->Evaluate(target->GetMakefile(), *i)))
|
cmGeneratorTarget* gt = this->GetGeneratorTarget(target);
|
||||||
|
if(cmSystemTools::IsOn(cge->Evaluate(gt->GetLocalGenerator(), *i)))
|
||||||
{
|
{
|
||||||
activeConfigs.insert(*i);
|
activeConfigs.insert(*i);
|
||||||
}
|
}
|
||||||
|
|
|
@ -256,7 +256,7 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget()
|
||||||
noCommandLines);
|
noCommandLines);
|
||||||
|
|
||||||
cmGeneratorTarget* gt = new cmGeneratorTarget(tgt, lg);
|
cmGeneratorTarget* gt = new cmGeneratorTarget(tgt, lg);
|
||||||
mf->AddGeneratorTarget(tgt, gt);
|
lg->AddGeneratorTarget(tgt, gt);
|
||||||
|
|
||||||
// Organize in the "predefined targets" folder:
|
// Organize in the "predefined targets" folder:
|
||||||
//
|
//
|
||||||
|
|
|
@ -87,7 +87,7 @@ void cmGlobalVisualStudioGenerator::AddExtraIDETargets()
|
||||||
"Build all projects");
|
"Build all projects");
|
||||||
|
|
||||||
cmGeneratorTarget* gt = new cmGeneratorTarget(allBuild, gen[0]);
|
cmGeneratorTarget* gt = new cmGeneratorTarget(allBuild, gen[0]);
|
||||||
allBuild->GetMakefile()->AddGeneratorTarget(allBuild, gt);
|
gen[0]->AddGeneratorTarget(allBuild, gt);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// Can't activate this code because we want ALL_BUILD
|
// Can't activate this code because we want ALL_BUILD
|
||||||
|
@ -108,7 +108,7 @@ void cmGlobalVisualStudioGenerator::AddExtraIDETargets()
|
||||||
i != gen.end(); ++i)
|
i != gen.end(); ++i)
|
||||||
{
|
{
|
||||||
cmGeneratorTargetsType targets =
|
cmGeneratorTargetsType targets =
|
||||||
(*i)->GetMakefile()->GetGeneratorTargets();
|
(*i)->GetGeneratorTargets();
|
||||||
for(cmGeneratorTargetsType::iterator t = targets.begin();
|
for(cmGeneratorTargetsType::iterator t = targets.begin();
|
||||||
t != targets.end(); ++t)
|
t != targets.end(); ++t)
|
||||||
{
|
{
|
||||||
|
|
|
@ -459,7 +459,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
|
||||||
"echo", "Build all projects");
|
"echo", "Build all projects");
|
||||||
|
|
||||||
cmGeneratorTarget* allBuildGt = new cmGeneratorTarget(allbuild, root);
|
cmGeneratorTarget* allBuildGt = new cmGeneratorTarget(allbuild, root);
|
||||||
mf->AddGeneratorTarget(allbuild, allBuildGt);
|
root->AddGeneratorTarget(allbuild, allBuildGt);
|
||||||
|
|
||||||
// Refer to the main build configuration file for easy editing.
|
// Refer to the main build configuration file for easy editing.
|
||||||
std::string listfile = root->GetCurrentSourceDirectory();
|
std::string listfile = root->GetCurrentSourceDirectory();
|
||||||
|
@ -494,7 +494,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
|
||||||
"make", "-f", file.c_str());
|
"make", "-f", file.c_str());
|
||||||
|
|
||||||
cmGeneratorTarget* checkGt = new cmGeneratorTarget(check, root);
|
cmGeneratorTarget* checkGt = new cmGeneratorTarget(check, root);
|
||||||
mf->AddGeneratorTarget(check, checkGt);
|
root->AddGeneratorTarget(check, checkGt);
|
||||||
}
|
}
|
||||||
|
|
||||||
// now make the allbuild depend on all the non-utility targets
|
// now make the allbuild depend on all the non-utility targets
|
||||||
|
@ -2486,7 +2486,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
|
||||||
{
|
{
|
||||||
cmGeneratorExpression ge;
|
cmGeneratorExpression ge;
|
||||||
std::string processed = ge.Parse(i->second.GetValue())
|
std::string processed = ge.Parse(i->second.GetValue())
|
||||||
->Evaluate(this->CurrentMakefile, configName);
|
->Evaluate(this->CurrentLocalGenerator, configName);
|
||||||
buildSettings->AddAttribute(attribute.c_str(),
|
buildSettings->AddAttribute(attribute.c_str(),
|
||||||
this->CreateString(processed));
|
this->CreateString(processed));
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,6 +126,7 @@ bool cmIncludeCommand
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gg->CreateGenerationObjects();
|
gg->CreateGenerationObjects();
|
||||||
|
gg->ComputeBuildFileGenerators();
|
||||||
gg->GenerateImportFile(fname_abs);
|
gg->GenerateImportFile(fname_abs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,5 +97,5 @@ cmInstallDirectoryGenerator::GetDestination(std::string const& config) const
|
||||||
{
|
{
|
||||||
cmGeneratorExpression ge;
|
cmGeneratorExpression ge;
|
||||||
return ge.Parse(this->Destination)
|
return ge.Parse(this->Destination)
|
||||||
->Evaluate(this->LocalGenerator->GetMakefile(), config);
|
->Evaluate(this->LocalGenerator, config);
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ cmInstallFilesGenerator::GetDestination(std::string const& config) const
|
||||||
{
|
{
|
||||||
cmGeneratorExpression ge;
|
cmGeneratorExpression ge;
|
||||||
return ge.Parse(this->Destination)
|
return ge.Parse(this->Destination)
|
||||||
->Evaluate(this->LocalGenerator->GetMakefile(), config);
|
->Evaluate(this->LocalGenerator, config);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
@ -117,7 +117,7 @@ void cmInstallFilesGenerator::GenerateScriptForConfig(std::ostream& os,
|
||||||
{
|
{
|
||||||
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(*i);
|
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(*i);
|
||||||
cmSystemTools::ExpandListArgument(cge->Evaluate(
|
cmSystemTools::ExpandListArgument(cge->Evaluate(
|
||||||
this->LocalGenerator->GetMakefile(), config), files);
|
this->LocalGenerator, config), files);
|
||||||
}
|
}
|
||||||
this->AddFilesInstallRule(os, config, indent, files);
|
this->AddFilesInstallRule(os, config, indent, files);
|
||||||
}
|
}
|
||||||
|
|
|
@ -351,7 +351,7 @@ cmInstallTargetGenerator::GetDestination(std::string const& config) const
|
||||||
{
|
{
|
||||||
cmGeneratorExpression ge;
|
cmGeneratorExpression ge;
|
||||||
return ge.Parse(this->Destination)
|
return ge.Parse(this->Destination)
|
||||||
->Evaluate(this->Target->Target->GetMakefile(), config);
|
->Evaluate(this->Target->GetLocalGenerator(), config);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
|
@ -132,7 +132,7 @@ void cmLocalGenerator::TraceDependencies()
|
||||||
this->GlobalGenerator->CreateEvaluationSourceFiles(*ci);
|
this->GlobalGenerator->CreateEvaluationSourceFiles(*ci);
|
||||||
}
|
}
|
||||||
// Generate the rule files for each target.
|
// Generate the rule files for each target.
|
||||||
cmGeneratorTargetsType targets = this->Makefile->GetGeneratorTargets();
|
cmGeneratorTargetsType targets = this->GetGeneratorTargets();
|
||||||
for(cmGeneratorTargetsType::iterator t = targets.begin();
|
for(cmGeneratorTargetsType::iterator t = targets.begin();
|
||||||
t != targets.end(); ++t)
|
t != targets.end(); ++t)
|
||||||
{
|
{
|
||||||
|
@ -448,6 +448,13 @@ void cmLocalGenerator::GenerateInstallRules()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void cmLocalGenerator::AddGeneratorTarget(cmTarget* t, cmGeneratorTarget* gt)
|
||||||
|
{
|
||||||
|
this->GeneratorTargets[t] = gt;
|
||||||
|
this->GetGlobalGenerator()->AddGeneratorTarget(t, gt);
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmLocalGenerator::ComputeTargetManifest()
|
void cmLocalGenerator::ComputeTargetManifest()
|
||||||
{
|
{
|
||||||
|
@ -460,7 +467,7 @@ void cmLocalGenerator::ComputeTargetManifest()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add our targets to the manifest for each configuration.
|
// Add our targets to the manifest for each configuration.
|
||||||
cmGeneratorTargetsType targets = this->Makefile->GetGeneratorTargets();
|
cmGeneratorTargetsType targets = this->GetGeneratorTargets();
|
||||||
for(cmGeneratorTargetsType::iterator t = targets.begin();
|
for(cmGeneratorTargetsType::iterator t = targets.begin();
|
||||||
t != targets.end(); ++t)
|
t != targets.end(); ++t)
|
||||||
{
|
{
|
||||||
|
@ -1766,6 +1773,17 @@ void cmLocalGenerator::AddLanguageFlags(std::string& flags,
|
||||||
this->AddConfigVariableFlags(flags, flagsVar, config);
|
this->AddConfigVariableFlags(flags, flagsVar, config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
cmGeneratorTarget*
|
||||||
|
cmLocalGenerator::FindGeneratorTargetToUse(const std::string& name) const
|
||||||
|
{
|
||||||
|
if (cmTarget *t = this->Makefile->FindTargetToUse(name))
|
||||||
|
{
|
||||||
|
return this->GetGlobalGenerator()->GetGeneratorTarget(t);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
bool cmLocalGenerator::GetRealDependency(const std::string& inName,
|
bool cmLocalGenerator::GetRealDependency(const std::string& inName,
|
||||||
const std::string& config,
|
const std::string& config,
|
||||||
|
@ -1792,7 +1810,7 @@ bool cmLocalGenerator::GetRealDependency(const std::string& inName,
|
||||||
|
|
||||||
// Look for a CMake target with the given name.
|
// Look for a CMake target with the given name.
|
||||||
if(cmGeneratorTarget* target =
|
if(cmGeneratorTarget* target =
|
||||||
this->Makefile->FindGeneratorTargetToUse(name))
|
this->FindGeneratorTargetToUse(name))
|
||||||
{
|
{
|
||||||
// make sure it is not just a coincidence that the target name
|
// make sure it is not just a coincidence that the target name
|
||||||
// found is part of the inName
|
// found is part of the inName
|
||||||
|
|
|
@ -112,6 +112,19 @@ public:
|
||||||
bool forResponseFile = false,
|
bool forResponseFile = false,
|
||||||
const std::string& config = "");
|
const std::string& config = "");
|
||||||
|
|
||||||
|
const cmGeneratorTargetsType &GetGeneratorTargets() const
|
||||||
|
{
|
||||||
|
return this->GeneratorTargets;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetGeneratorTargets(const cmGeneratorTargetsType &targets)
|
||||||
|
{
|
||||||
|
this->GeneratorTargets = targets;
|
||||||
|
}
|
||||||
|
void AddGeneratorTarget(cmTarget* t, cmGeneratorTarget* gt);
|
||||||
|
|
||||||
|
cmGeneratorTarget* FindGeneratorTargetToUse(const std::string& name) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encode a list of preprocessor definitions for the compiler
|
* Encode a list of preprocessor definitions for the compiler
|
||||||
* command line.
|
* command line.
|
||||||
|
@ -354,6 +367,7 @@ protected:
|
||||||
std::set<std::string> ObjectMaxPathViolations;
|
std::set<std::string> ObjectMaxPathViolations;
|
||||||
|
|
||||||
std::set<cmTarget const*> WarnCMP0063;
|
std::set<cmTarget const*> WarnCMP0063;
|
||||||
|
cmGeneratorTargetsType GeneratorTargets;
|
||||||
|
|
||||||
bool EmitUniversalBinaryFlags;
|
bool EmitUniversalBinaryFlags;
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ cmLocalGhsMultiGenerator::~cmLocalGhsMultiGenerator() {}
|
||||||
|
|
||||||
void cmLocalGhsMultiGenerator::Generate()
|
void cmLocalGhsMultiGenerator::Generate()
|
||||||
{
|
{
|
||||||
cmGeneratorTargetsType tgts = this->GetMakefile()->GetGeneratorTargets();
|
cmGeneratorTargetsType tgts = this->GetGeneratorTargets();
|
||||||
|
|
||||||
for (cmGeneratorTargetsType::iterator l = tgts.begin(); l != tgts.end();
|
for (cmGeneratorTargetsType::iterator l = tgts.begin(); l != tgts.end();
|
||||||
++l)
|
++l)
|
||||||
|
|
|
@ -73,7 +73,7 @@ void cmLocalNinjaGenerator::Generate()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cmGeneratorTargetsType targets = this->GetMakefile()->GetGeneratorTargets();
|
cmGeneratorTargetsType targets = this->GetGeneratorTargets();
|
||||||
for(cmGeneratorTargetsType::iterator t = targets.begin();
|
for(cmGeneratorTargetsType::iterator t = targets.begin();
|
||||||
t != targets.end(); ++t)
|
t != targets.end(); ++t)
|
||||||
{
|
{
|
||||||
|
|
|
@ -113,7 +113,7 @@ void cmLocalUnixMakefileGenerator3::Generate()
|
||||||
this->Makefile->IsOn("CMAKE_SKIP_ASSEMBLY_SOURCE_RULES");
|
this->Makefile->IsOn("CMAKE_SKIP_ASSEMBLY_SOURCE_RULES");
|
||||||
|
|
||||||
// Generate the rule files for each target.
|
// Generate the rule files for each target.
|
||||||
cmGeneratorTargetsType targets = this->Makefile->GetGeneratorTargets();
|
cmGeneratorTargetsType targets = this->GetGeneratorTargets();
|
||||||
cmGlobalUnixMakefileGenerator3* gg =
|
cmGlobalUnixMakefileGenerator3* gg =
|
||||||
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
|
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
|
||||||
for(cmGeneratorTargetsType::iterator t = targets.begin();
|
for(cmGeneratorTargetsType::iterator t = targets.begin();
|
||||||
|
@ -175,7 +175,7 @@ void cmLocalUnixMakefileGenerator3::
|
||||||
GetLocalObjectFiles(std::map<std::string, LocalObjectInfo> &localObjectFiles)
|
GetLocalObjectFiles(std::map<std::string, LocalObjectInfo> &localObjectFiles)
|
||||||
{
|
{
|
||||||
std::set<std::string> emitted;
|
std::set<std::string> emitted;
|
||||||
cmGeneratorTargetsType targets = this->Makefile->GetGeneratorTargets();
|
cmGeneratorTargetsType targets = this->GetGeneratorTargets();
|
||||||
for(cmGeneratorTargetsType::iterator ti = targets.begin();
|
for(cmGeneratorTargetsType::iterator ti = targets.begin();
|
||||||
ti != targets.end(); ++ti)
|
ti != targets.end(); ++ti)
|
||||||
{
|
{
|
||||||
|
@ -418,7 +418,7 @@ void cmLocalUnixMakefileGenerator3
|
||||||
|
|
||||||
// for each target we just provide a rule to cd up to the top and do a make
|
// for each target we just provide a rule to cd up to the top and do a make
|
||||||
// on the target
|
// on the target
|
||||||
cmGeneratorTargetsType targets = this->Makefile->GetGeneratorTargets();
|
cmGeneratorTargetsType targets = this->GetGeneratorTargets();
|
||||||
std::string localName;
|
std::string localName;
|
||||||
for(cmGeneratorTargetsType::iterator t = targets.begin();
|
for(cmGeneratorTargetsType::iterator t = targets.begin();
|
||||||
t != targets.end(); ++t)
|
t != targets.end(); ++t)
|
||||||
|
|
|
@ -667,6 +667,29 @@ cmMakefile::GetEvaluationFiles() const
|
||||||
return this->EvaluationFiles;
|
return this->EvaluationFiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<cmExportBuildFileGenerator*>
|
||||||
|
cmMakefile::GetExportBuildFileGenerators() const
|
||||||
|
{
|
||||||
|
return this->ExportBuildFileGenerators;
|
||||||
|
}
|
||||||
|
|
||||||
|
void cmMakefile::RemoveExportBuildFileGeneratorCMP0024(
|
||||||
|
cmExportBuildFileGenerator* gen)
|
||||||
|
{
|
||||||
|
std::vector<cmExportBuildFileGenerator*>::iterator it =
|
||||||
|
std::find(this->ExportBuildFileGenerators.begin(),
|
||||||
|
this->ExportBuildFileGenerators.end(), gen);
|
||||||
|
if(it != this->ExportBuildFileGenerators.end())
|
||||||
|
{
|
||||||
|
this->ExportBuildFileGenerators.erase(it);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void cmMakefile::AddExportBuildFileGenerator(cmExportBuildFileGenerator* gen)
|
||||||
|
{
|
||||||
|
this->ExportBuildFileGenerators.push_back(gen);
|
||||||
|
}
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
struct file_not_persistent
|
struct file_not_persistent
|
||||||
|
@ -1757,12 +1780,6 @@ const char* cmMakefile::GetCurrentBinaryDirectory() const
|
||||||
return this->StateSnapshot.GetDirectory().GetCurrentBinary();
|
return this->StateSnapshot.GetDirectory().GetCurrentBinary();
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmMakefile::AddGeneratorTarget(cmTarget* t, cmGeneratorTarget* gt)
|
|
||||||
{
|
|
||||||
this->GeneratorTargets[t] = gt;
|
|
||||||
this->GetGlobalGenerator()->AddGeneratorTarget(t, gt);
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmMakefile::AddIncludeDirectories(const std::vector<std::string> &incs,
|
void cmMakefile::AddIncludeDirectories(const std::vector<std::string> &incs,
|
||||||
bool before)
|
bool before)
|
||||||
|
@ -4213,17 +4230,6 @@ bool cmMakefile::IsAlias(const std::string& name) const
|
||||||
return this->GetGlobalGenerator()->IsAlias(name);
|
return this->GetGlobalGenerator()->IsAlias(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
|
||||||
cmGeneratorTarget*
|
|
||||||
cmMakefile::FindGeneratorTargetToUse(const std::string& name) const
|
|
||||||
{
|
|
||||||
if (cmTarget *t = this->FindTargetToUse(name))
|
|
||||||
{
|
|
||||||
return this->GetGlobalGenerator()->GetGeneratorTarget(t);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
bool cmMakefile::EnforceUniqueName(std::string const& name, std::string& msg,
|
bool cmMakefile::EnforceUniqueName(std::string const& name, std::string& msg,
|
||||||
bool isCustom) const
|
bool isCustom) const
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
#include "cmSystemTools.h"
|
#include "cmSystemTools.h"
|
||||||
#include "cmTarget.h"
|
#include "cmTarget.h"
|
||||||
#include "cmNewLineStyle.h"
|
#include "cmNewLineStyle.h"
|
||||||
#include "cmGeneratorTarget.h"
|
|
||||||
#include "cmExpandedCommandArgument.h"
|
#include "cmExpandedCommandArgument.h"
|
||||||
#include "cmake.h"
|
#include "cmake.h"
|
||||||
#include "cmState.h"
|
#include "cmState.h"
|
||||||
|
@ -51,6 +50,7 @@ class cmake;
|
||||||
class cmMakefileCall;
|
class cmMakefileCall;
|
||||||
class cmCMakePolicyCommand;
|
class cmCMakePolicyCommand;
|
||||||
class cmGeneratorExpressionEvaluationFile;
|
class cmGeneratorExpressionEvaluationFile;
|
||||||
|
class cmExportBuildFileGenerator;
|
||||||
|
|
||||||
/** \class cmMakefile
|
/** \class cmMakefile
|
||||||
* \brief Process the input CMakeLists.txt file.
|
* \brief Process the input CMakeLists.txt file.
|
||||||
|
@ -392,17 +392,6 @@ public:
|
||||||
return this->ImportedTargetsOwned;
|
return this->ImportedTargetsOwned;
|
||||||
}
|
}
|
||||||
|
|
||||||
const cmGeneratorTargetsType &GetGeneratorTargets() const
|
|
||||||
{
|
|
||||||
return this->GeneratorTargets;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetGeneratorTargets(const cmGeneratorTargetsType &targets)
|
|
||||||
{
|
|
||||||
this->GeneratorTargets = targets;
|
|
||||||
}
|
|
||||||
void AddGeneratorTarget(cmTarget* t, cmGeneratorTarget* gt);
|
|
||||||
|
|
||||||
cmTarget* FindTarget(const std::string& name,
|
cmTarget* FindTarget(const std::string& name,
|
||||||
bool excludeAliases = false) const;
|
bool excludeAliases = false) const;
|
||||||
|
|
||||||
|
@ -411,7 +400,6 @@ public:
|
||||||
cmTarget* FindTargetToUse(const std::string& name,
|
cmTarget* FindTargetToUse(const std::string& name,
|
||||||
bool excludeAliases = false) const;
|
bool excludeAliases = false) const;
|
||||||
bool IsAlias(const std::string& name) const;
|
bool IsAlias(const std::string& name) const;
|
||||||
cmGeneratorTarget* FindGeneratorTargetToUse(const std::string& name) const;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mark include directories as system directories.
|
* Mark include directories as system directories.
|
||||||
|
@ -789,6 +777,11 @@ public:
|
||||||
bool inputIsContent);
|
bool inputIsContent);
|
||||||
std::vector<cmGeneratorExpressionEvaluationFile*> GetEvaluationFiles() const;
|
std::vector<cmGeneratorExpressionEvaluationFile*> GetEvaluationFiles() const;
|
||||||
|
|
||||||
|
std::vector<cmExportBuildFileGenerator*>
|
||||||
|
GetExportBuildFileGenerators() const;
|
||||||
|
void RemoveExportBuildFileGeneratorCMP0024(cmExportBuildFileGenerator* gen);
|
||||||
|
void AddExportBuildFileGenerator(cmExportBuildFileGenerator* gen);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// add link libraries and directories to the target
|
// add link libraries and directories to the target
|
||||||
void AddGlobalLinkInformation(const std::string& name, cmTarget& target);
|
void AddGlobalLinkInformation(const std::string& name, cmTarget& target);
|
||||||
|
@ -810,7 +803,6 @@ protected:
|
||||||
typedef std::map<std::string, cmTarget*> TargetMap;
|
typedef std::map<std::string, cmTarget*> TargetMap;
|
||||||
#endif
|
#endif
|
||||||
TargetMap AliasTargets;
|
TargetMap AliasTargets;
|
||||||
cmGeneratorTargetsType GeneratorTargets;
|
|
||||||
std::vector<cmSourceFile*> SourceFiles;
|
std::vector<cmSourceFile*> SourceFiles;
|
||||||
|
|
||||||
// Tests
|
// Tests
|
||||||
|
@ -881,6 +873,7 @@ private:
|
||||||
mutable cmsys::RegularExpression cmNamedCurly;
|
mutable cmsys::RegularExpression cmNamedCurly;
|
||||||
|
|
||||||
std::vector<cmMakefile*> UnConfiguredDirectories;
|
std::vector<cmMakefile*> UnConfiguredDirectories;
|
||||||
|
std::vector<cmExportBuildFileGenerator*> ExportBuildFileGenerators;
|
||||||
|
|
||||||
std::vector<cmGeneratorExpressionEvaluationFile*> EvaluationFiles;
|
std::vector<cmGeneratorExpressionEvaluationFile*> EvaluationFiles;
|
||||||
|
|
||||||
|
|
|
@ -147,8 +147,11 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules()
|
||||||
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
|
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
|
||||||
ge.Parse(additional_clean_files);
|
ge.Parse(additional_clean_files);
|
||||||
|
|
||||||
cmSystemTools::ExpandListArgument(cge->Evaluate(this->Makefile, config,
|
cmSystemTools::ExpandListArgument(cge->Evaluate(this->LocalGenerator,
|
||||||
false, this->Target, 0, 0),
|
config,
|
||||||
|
false,
|
||||||
|
this->GeneratorTarget,
|
||||||
|
0, 0),
|
||||||
this->CleanFiles);
|
this->CleanFiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -886,7 +886,7 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenTarget(
|
||||||
commandLines, false, autogenComment.c_str());
|
commandLines, false, autogenComment.c_str());
|
||||||
|
|
||||||
cmGeneratorTarget* gt = new cmGeneratorTarget(autogenTarget, lg);
|
cmGeneratorTarget* gt = new cmGeneratorTarget(autogenTarget, lg);
|
||||||
makefile->AddGeneratorTarget(autogenTarget, gt);
|
lg->AddGeneratorTarget(autogenTarget, gt);
|
||||||
|
|
||||||
// Set target folder
|
// Set target folder
|
||||||
const char* autogenFolder = makefile->GetState()
|
const char* autogenFolder = makefile->GetState()
|
||||||
|
|
|
@ -89,7 +89,7 @@ void cmTestGenerator::GenerateScriptForConfig(std::ostream& os,
|
||||||
// be translated.
|
// be translated.
|
||||||
std::string exe = command[0];
|
std::string exe = command[0];
|
||||||
cmGeneratorTarget* target =
|
cmGeneratorTarget* target =
|
||||||
this->LG->GetMakefile()->FindGeneratorTargetToUse(exe);
|
this->LG->FindGeneratorTargetToUse(exe);
|
||||||
if(target && target->GetType() == cmTarget::EXECUTABLE)
|
if(target && target->GetType() == cmTarget::EXECUTABLE)
|
||||||
{
|
{
|
||||||
// Use the target file on disk.
|
// Use the target file on disk.
|
||||||
|
@ -117,7 +117,7 @@ void cmTestGenerator::GenerateScriptForConfig(std::ostream& os,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Use the command name given.
|
// Use the command name given.
|
||||||
exe = ge.Parse(exe.c_str())->Evaluate(this->LG->GetMakefile(), config);
|
exe = ge.Parse(exe.c_str())->Evaluate(this->LG, config);
|
||||||
cmSystemTools::ConvertToUnixSlashes(exe);
|
cmSystemTools::ConvertToUnixSlashes(exe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ void cmTestGenerator::GenerateScriptForConfig(std::ostream& os,
|
||||||
{
|
{
|
||||||
os << " " << cmOutputConverter::EscapeForCMake(
|
os << " " << cmOutputConverter::EscapeForCMake(
|
||||||
ge.Parse(*ci)->Evaluate(
|
ge.Parse(*ci)->Evaluate(
|
||||||
this->LG->GetMakefile(), config));
|
this->LG, config));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finish the test command.
|
// Finish the test command.
|
||||||
|
@ -145,7 +145,7 @@ void cmTestGenerator::GenerateScriptForConfig(std::ostream& os,
|
||||||
{
|
{
|
||||||
os << " " << i->first
|
os << " " << i->first
|
||||||
<< " " << cmOutputConverter::EscapeForCMake(
|
<< " " << cmOutputConverter::EscapeForCMake(
|
||||||
ge.Parse(i->second.GetValue())->Evaluate(this->LG->GetMakefile(),
|
ge.Parse(i->second.GetValue())->Evaluate(this->LG,
|
||||||
config));
|
config));
|
||||||
}
|
}
|
||||||
os << ")" << std::endl;
|
os << ")" << std::endl;
|
||||||
|
|
|
@ -1370,7 +1370,7 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
|
||||||
}
|
}
|
||||||
for(size_t i = 0; i != this->Configurations.size(); ++i)
|
for(size_t i = 0; i != this->Configurations.size(); ++i)
|
||||||
{
|
{
|
||||||
if(0 == strcmp(cge->Evaluate(this->Makefile,
|
if(0 == strcmp(cge->Evaluate(this->LocalGenerator,
|
||||||
this->Configurations[i]), "1"))
|
this->Configurations[i]), "1"))
|
||||||
{
|
{
|
||||||
this->WriteString("<DeploymentContent Condition=\""
|
this->WriteString("<DeploymentContent Condition=\""
|
||||||
|
@ -2301,7 +2301,8 @@ void cmVisualStudio10TargetGenerator::WriteAntBuildOptions(
|
||||||
cmGeneratorExpression ge;
|
cmGeneratorExpression ge;
|
||||||
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
|
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
|
||||||
ge.Parse(nativeLibDirectoriesExpression);
|
ge.Parse(nativeLibDirectoriesExpression);
|
||||||
std::string nativeLibDirs = cge->Evaluate(this->Makefile, configName);
|
std::string nativeLibDirs = cge->Evaluate(this->LocalGenerator,
|
||||||
|
configName);
|
||||||
this->WriteString("<NativeLibDirectories>", 3);
|
this->WriteString("<NativeLibDirectories>", 3);
|
||||||
(*this->BuildFileStream) << cmVS10EscapeXML(nativeLibDirs) <<
|
(*this->BuildFileStream) << cmVS10EscapeXML(nativeLibDirs) <<
|
||||||
"</NativeLibDirectories>\n";
|
"</NativeLibDirectories>\n";
|
||||||
|
@ -2313,7 +2314,8 @@ void cmVisualStudio10TargetGenerator::WriteAntBuildOptions(
|
||||||
cmGeneratorExpression ge;
|
cmGeneratorExpression ge;
|
||||||
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
|
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
|
||||||
ge.Parse(nativeLibDependenciesExpression);
|
ge.Parse(nativeLibDependenciesExpression);
|
||||||
std::string nativeLibDeps = cge->Evaluate(this->Makefile, configName);
|
std::string nativeLibDeps = cge->Evaluate(this->LocalGenerator,
|
||||||
|
configName);
|
||||||
this->WriteString("<NativeLibDependencies>", 3);
|
this->WriteString("<NativeLibDependencies>", 3);
|
||||||
(*this->BuildFileStream) << cmVS10EscapeXML(nativeLibDeps) <<
|
(*this->BuildFileStream) << cmVS10EscapeXML(nativeLibDeps) <<
|
||||||
"</NativeLibDependencies>\n";
|
"</NativeLibDependencies>\n";
|
||||||
|
@ -2333,7 +2335,8 @@ void cmVisualStudio10TargetGenerator::WriteAntBuildOptions(
|
||||||
cmGeneratorExpression ge;
|
cmGeneratorExpression ge;
|
||||||
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
|
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
|
||||||
ge.Parse(jarDirectoriesExpression);
|
ge.Parse(jarDirectoriesExpression);
|
||||||
std::string jarDirectories = cge->Evaluate(this->Makefile, configName);
|
std::string jarDirectories = cge->Evaluate(this->LocalGenerator,
|
||||||
|
configName);
|
||||||
this->WriteString("<JarDirectories>", 3);
|
this->WriteString("<JarDirectories>", 3);
|
||||||
(*this->BuildFileStream) << cmVS10EscapeXML(jarDirectories) <<
|
(*this->BuildFileStream) << cmVS10EscapeXML(jarDirectories) <<
|
||||||
"</JarDirectories>\n";
|
"</JarDirectories>\n";
|
||||||
|
|
|
@ -261,6 +261,7 @@ CMAKE_CXX_SOURCES="\
|
||||||
cmPropertyDefinitionMap \
|
cmPropertyDefinitionMap \
|
||||||
cmMakeDepend \
|
cmMakeDepend \
|
||||||
cmMakefile \
|
cmMakefile \
|
||||||
|
cmExportBuildFileGenerator \
|
||||||
cmExportFileGenerator \
|
cmExportFileGenerator \
|
||||||
cmExportInstallFileGenerator \
|
cmExportInstallFileGenerator \
|
||||||
cmExportTryCompileFileGenerator \
|
cmExportTryCompileFileGenerator \
|
||||||
|
|
Loading…
Reference in New Issue