summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpression.h
diff options
context:
space:
mode:
authorDaniel Eiband <daniel.eiband@brainlab.com>2019-09-21 21:39:48 (GMT)
committerDaniel Eiband <daniel.eiband@brainlab.com>2019-09-22 07:49:41 (GMT)
commit1811411fecf3d9769ad7a13f6ecd01c5351df9c4 (patch)
tree13b7d923cac709aefd3bcf1cf999ccddeebd0a40 /Source/cmGeneratorExpression.h
parentedb0bbd18b5c3dac16ab7d219f787513203529e4 (diff)
downloadCMake-1811411fecf3d9769ad7a13f6ecd01c5351df9c4.zip
CMake-1811411fecf3d9769ad7a13f6ecd01c5351df9c4.tar.gz
CMake-1811411fecf3d9769ad7a13f6ecd01c5351df9c4.tar.bz2
cmGeneratorExpression: Move quiet flag to cmCompiledGeneratorExpression
The quiet flag is false for all but one call to Evaluate. Make the quiet flag a setter of cmCompiledGeneratorExpression to be able to remove it from the Evaluate function signature.
Diffstat (limited to 'Source/cmGeneratorExpression.h')
-rw-r--r--Source/cmGeneratorExpression.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h
index ef76651..7ed024a 100644
--- a/Source/cmGeneratorExpression.h
+++ b/Source/cmGeneratorExpression.h
@@ -41,8 +41,9 @@ public:
cmGeneratorExpression& operator=(cmGeneratorExpression const&) = delete;
std::unique_ptr<cmCompiledGeneratorExpression> Parse(
- std::string const& input);
- std::unique_ptr<cmCompiledGeneratorExpression> Parse(const char* input);
+ std::string input) const;
+ std::unique_ptr<cmCompiledGeneratorExpression> Parse(
+ const char* input) const;
enum PreprocessContext
{
@@ -87,13 +88,13 @@ public:
cmCompiledGeneratorExpression const&) = delete;
const std::string& Evaluate(
- cmLocalGenerator* lg, const std::string& config, bool quiet = false,
+ cmLocalGenerator* lg, const std::string& config,
cmGeneratorTarget const* headTarget = nullptr,
cmGeneratorTarget const* currentTarget = nullptr,
cmGeneratorExpressionDAGChecker* dagChecker = nullptr,
std::string const& language = std::string()) const;
const std::string& Evaluate(
- cmLocalGenerator* lg, const std::string& config, bool quiet,
+ cmLocalGenerator* lg, const std::string& config,
cmGeneratorTarget const* headTarget,
cmGeneratorExpressionDAGChecker* dagChecker,
std::string const& language = std::string()) const;
@@ -135,6 +136,8 @@ public:
this->EvaluateForBuildsystem = eval;
}
+ void SetQuiet(bool quiet) { this->Quiet = quiet; }
+
void GetMaxLanguageStandard(cmGeneratorTarget const* tgt,
std::map<std::string, std::string>& mapping);
@@ -152,6 +155,8 @@ private:
std::vector<cmGeneratorExpressionEvaluator*> Evaluators;
const std::string Input;
bool NeedsEvaluation;
+ bool EvaluateForBuildsystem;
+ bool Quiet;
mutable std::set<cmGeneratorTarget*> DependTargets;
mutable std::set<cmGeneratorTarget const*> AllTargetsSeen;
@@ -163,7 +168,6 @@ private:
mutable bool HadContextSensitiveCondition;
mutable bool HadHeadSensitiveCondition;
mutable std::set<cmGeneratorTarget const*> SourceSensitiveTargets;
- bool EvaluateForBuildsystem;
};
class cmGeneratorExpressionInterpreter
@@ -172,11 +176,11 @@ public:
cmGeneratorExpressionInterpreter(cmLocalGenerator* localGenerator,
std::string config,
cmGeneratorTarget const* headTarget,
- std::string lang = std::string())
+ std::string language = std::string())
: LocalGenerator(localGenerator)
, Config(std::move(config))
, HeadTarget(headTarget)
- , Language(std::move(lang))
+ , Language(std::move(language))
{
}
@@ -185,13 +189,10 @@ public:
cmGeneratorExpressionInterpreter& operator=(
cmGeneratorExpressionInterpreter const&) = delete;
+ const std::string& Evaluate(std::string expression,
+ const std::string& property);
const std::string& Evaluate(const char* expression,
const std::string& property);
- const std::string& Evaluate(const std::string& expression,
- const std::string& property)
- {
- return this->Evaluate(expression.c_str(), property);
- }
protected:
cmGeneratorExpression GeneratorExpression;