diff options
author | Stephen Kelly <steveire@gmail.com> | 2012-10-27 14:16:17 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2012-11-20 23:11:54 (GMT) |
commit | d8a59ea4b370eaf4a5b6162631af9e272fdb24b4 (patch) | |
tree | 6b3d14c622b89eaf615b9522752ca12881d7ea1c /Source | |
parent | 8faf4e93801a025d4cb17d2ef12437e5554798b1 (diff) | |
download | CMake-d8a59ea4b370eaf4a5b6162631af9e272fdb24b4.zip CMake-d8a59ea4b370eaf4a5b6162631af9e272fdb24b4.tar.gz CMake-d8a59ea4b370eaf4a5b6162631af9e272fdb24b4.tar.bz2 |
Port cmGeneratorExpression to cmTarget from cmGeneratorTarget.
Following from the discussion here:
http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/3615/focus=5170
(Re: Generator expressisons in target properties, 26 Oct 12:10)
we can't split cmTarget API for linking into cmGeneratorTarget. In
the future we will probably also need to move the include and compile
definitions API back to cmTarget so that it can be used by export().
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGeneratorExpression.cxx | 2 | ||||
-rw-r--r-- | Source/cmGeneratorExpression.h | 3 | ||||
-rw-r--r-- | Source/cmGeneratorExpressionEvaluator.cxx | 4 | ||||
-rw-r--r-- | Source/cmGeneratorExpressionEvaluator.h | 3 | ||||
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 4 |
5 files changed, 7 insertions, 9 deletions
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index 7d8df37..32bf941 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -68,7 +68,7 @@ cmGeneratorExpression::~cmGeneratorExpression() //---------------------------------------------------------------------------- const char *cmCompiledGeneratorExpression::Evaluate( cmMakefile* mf, const char* config, bool quiet, - cmGeneratorTarget *target, + cmTarget *target, cmGeneratorExpressionDAGChecker *dagChecker) const { if (!this->NeedsParsing) diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h index 29d3f44..ea3e7d0 100644 --- a/Source/cmGeneratorExpression.h +++ b/Source/cmGeneratorExpression.h @@ -20,7 +20,6 @@ #include <cmsys/RegularExpression.hxx> class cmTarget; -class cmGeneratorTarget; class cmMakefile; class cmListFileBacktrace; @@ -68,7 +67,7 @@ class cmCompiledGeneratorExpression public: const char* Evaluate(cmMakefile* mf, const char* config, bool quiet = false, - cmGeneratorTarget *target = 0, + cmTarget *target = 0, cmGeneratorExpressionDAGChecker *dagChecker = 0) const; /** Get set of targets found during evaluations. */ diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index 2e123a4..c609000 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -287,7 +287,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode cmsys::RegularExpression propertyNameValidator; propertyNameValidator.compile("^[A-Za-z0-9_]+$"); - cmGeneratorTarget* target = context->Target; + cmTarget* target = context->Target; std::string propertyName = *parameters.begin(); if (parameters.size() == 2) { @@ -320,7 +320,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode "Target name not supported."); return std::string(); } - target = context->Makefile->FindGeneratorTargetToUse( + target = context->Makefile->FindTargetToUse( targetName.c_str()); if (!target) diff --git a/Source/cmGeneratorExpressionEvaluator.h b/Source/cmGeneratorExpressionEvaluator.h index 04a2acd..d37337e 100644 --- a/Source/cmGeneratorExpressionEvaluator.h +++ b/Source/cmGeneratorExpressionEvaluator.h @@ -18,7 +18,6 @@ #include "cmListFileCache.h" class cmTarget; -class cmGeneratorTarget; //---------------------------------------------------------------------------- struct cmGeneratorExpressionContext @@ -27,7 +26,7 @@ struct cmGeneratorExpressionContext std::set<cmTarget*> Targets; cmMakefile *Makefile; const char *Config; - cmGeneratorTarget *Target; + cmTarget *Target; bool Quiet; bool HadError; }; diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 19b55c6..a68abca 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -308,7 +308,7 @@ std::vector<std::string> cmGeneratorTarget::GetIncludeDirectories( .Evaluate(this->Makefile, config, false, - this, + this->Target, &dagChecker), includes); @@ -356,6 +356,6 @@ std::string cmGeneratorTarget::GetCompileDefinitions(const char *config) return ge.Parse(prop).Evaluate(this->Makefile, config, false, - this, + this->Target, &dagChecker); } |