diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-01-30 16:49:47 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-01-31 16:27:06 (GMT) |
commit | df4d2b28b24a3172daf1290070199633f7c46cf0 (patch) | |
tree | 855ffcc38839088c1571988199461e1959f99cb2 /Source/cmGeneratorExpressionEvaluator.cxx | |
parent | 7ceeba992b4fb35ca05760b3170e68f41dfc1bb5 (diff) | |
download | CMake-df4d2b28b24a3172daf1290070199633f7c46cf0.zip CMake-df4d2b28b24a3172daf1290070199633f7c46cf0.tar.gz CMake-df4d2b28b24a3172daf1290070199633f7c46cf0.tar.bz2 |
Make it an error for INSTALL_PREFIX to be evaluated.
An empty string is not likely going to produce expected results
in any evaluation context. It is replaced by preprocessing
currently.
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r-- | Source/cmGeneratorExpressionEvaluator.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index 55f54e4..fff7dab 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -621,14 +621,17 @@ static const struct InstallPrefixNode : public cmGeneratorExpressionNode { InstallPrefixNode() {} - virtual bool GeneratesContent() const { return false; } + virtual bool GeneratesContent() const { return true; } virtual int NumExpectedParameters() const { return 0; } std::string Evaluate(const std::vector<std::string> &, - cmGeneratorExpressionContext *, - const GeneratorExpressionContent *, + cmGeneratorExpressionContext *context, + const GeneratorExpressionContent *content, cmGeneratorExpressionDAGChecker *) const { + reportError(context, content->GetOriginalExpression(), + "INSTALL_PREFIX is a marker for install(EXPORT) only. It " + "should never be evaluated."); return std::string(); } |