diff options
author | Justin Goshi <jgoshi@microsoft.com> | 2020-06-11 19:27:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-06-15 15:31:03 (GMT) |
commit | 0892c798f795c6072ce882552384187db86797f0 (patch) | |
tree | 70de16645f493c702419992a3c691de41e5a38f6 /Source | |
parent | 43b10e2411858ae7734c54480a8c0c6c3ccd659b (diff) | |
download | CMake-0892c798f795c6072ce882552384187db86797f0.zip CMake-0892c798f795c6072ce882552384187db86797f0.tar.gz CMake-0892c798f795c6072ce882552384187db86797f0.tar.bz2 |
cmMakefile: Change CompileFeatureKnown to take target name instead of target
The implementation needs only the target name.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGeneratorExpressionNode.cxx | 2 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 6 | ||||
-rw-r--r-- | Source/cmMakefile.h | 5 |
3 files changed, 7 insertions, 6 deletions
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index e4fb67e..6254c5b 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -1708,7 +1708,7 @@ static const struct CompileFeaturesNode : public cmGeneratorExpressionNode std::string error; std::string lang; if (!context->LG->GetMakefile()->CompileFeatureKnown( - context->HeadTarget->Target, p, lang, &error)) { + context->HeadTarget->Target->GetName(), p, lang, &error)) { reportError(context, content->GetOriginalExpression(), error); return std::string(); } diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 5c3063b..cf84b94 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4673,7 +4673,7 @@ bool cmMakefile::AddRequiredTargetFeature(cmTarget* target, } std::string lang; - if (!this->CompileFeatureKnown(target, feature, lang, error)) { + if (!this->CompileFeatureKnown(target->GetName(), feature, lang, error)) { return false; } @@ -4710,7 +4710,7 @@ bool cmMakefile::AddRequiredTargetFeature(cmTarget* target, return this->AddRequiredTargetCxxFeature(target, feature, lang, error); } -bool cmMakefile::CompileFeatureKnown(cmTarget const* target, +bool cmMakefile::CompileFeatureKnown(const std::string& targetName, const std::string& feature, std::string& lang, std::string* error) const @@ -4747,7 +4747,7 @@ bool cmMakefile::CompileFeatureKnown(cmTarget const* target, e << " unknown feature \"" << feature << "\" for " "target \"" - << target->GetName() << "\"."; + << targetName << "\"."; if (error) { *error = e.str(); } else { diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 45d7109..368676f 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -928,8 +928,9 @@ public: bool AddRequiredTargetFeature(cmTarget* target, const std::string& feature, std::string* error = nullptr) const; - bool CompileFeatureKnown(cmTarget const* target, const std::string& feature, - std::string& lang, std::string* error) const; + bool CompileFeatureKnown(const std::string& targetName, + const std::string& feature, std::string& lang, + std::string* error) const; const char* CompileFeaturesAvailable(const std::string& lang, std::string* error) const; |