summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpression.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-03-20 14:37:12 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-04-02 21:12:57 (GMT)
commit5de63265e3a22d9a8aa5ad437a5030ccfcbcd02d (patch)
tree558694f9724c696198c6be2faff1a06f98fe6de6 /Source/cmGeneratorExpression.cxx
parentaa0a3562dd47bdd6d9ca3058bd1dfd525e79d36d (diff)
downloadCMake-5de63265e3a22d9a8aa5ad437a5030ccfcbcd02d.zip
CMake-5de63265e3a22d9a8aa5ad437a5030ccfcbcd02d.tar.gz
CMake-5de63265e3a22d9a8aa5ad437a5030ccfcbcd02d.tar.bz2
Genex: Only evaluate TARGET_OBJECTS to determine target sources.
The output of this expression may contain macros for IDEs to replace such as $(Configuration), $(CURRENT_ARCH) etc. To avoid generating content which is not usable in other contexts, report an error if there is an attempt to use it in other contexts. This commit may be reverted in the future if a solution to the above difference is implemented.
Diffstat (limited to 'Source/cmGeneratorExpression.cxx')
-rw-r--r--Source/cmGeneratorExpression.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index e127f3a..d09e950 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -90,6 +90,7 @@ const char *cmCompiledGeneratorExpression::Evaluate(
context.HadError = false;
context.HadContextSensitiveCondition = false;
context.HeadTarget = headTarget;
+ context.EvaluateForBuildsystem = this->EvaluateForBuildsystem;
context.CurrentTarget = currentTarget ? currentTarget : headTarget;
context.Backtrace = this->Backtrace;
@@ -124,7 +125,8 @@ cmCompiledGeneratorExpression::cmCompiledGeneratorExpression(
cmListFileBacktrace const& backtrace,
const std::string& input)
: Backtrace(backtrace), Input(input),
- HadContextSensitiveCondition(false)
+ HadContextSensitiveCondition(false),
+ EvaluateForBuildsystem(false)
{
cmGeneratorExpressionLexer l;
std::vector<cmGeneratorExpressionToken> tokens =