mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 19:00:54 -06:00
cmMakefile: Change CompileFeatureKnown to take target name instead of target
The implementation needs only the target name.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user