Genex: Extend EvaluatingLinkLibraries to also check the top target name.
This will allow testing whether we are evaluating the link libraries of a particular target.
This commit is contained in:
parent
b1c19ce383
commit
b58aff90c5
|
@ -139,7 +139,7 @@ cmGeneratorExpressionDAGChecker::checkGraph() const
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
bool cmGeneratorExpressionDAGChecker::EvaluatingLinkLibraries()
|
bool cmGeneratorExpressionDAGChecker::EvaluatingLinkLibraries(const char *tgt)
|
||||||
{
|
{
|
||||||
const cmGeneratorExpressionDAGChecker *top = this;
|
const cmGeneratorExpressionDAGChecker *top = this;
|
||||||
const cmGeneratorExpressionDAGChecker *parent = this->Parent;
|
const cmGeneratorExpressionDAGChecker *parent = this->Parent;
|
||||||
|
@ -150,6 +150,12 @@ bool cmGeneratorExpressionDAGChecker::EvaluatingLinkLibraries()
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *prop = top->Property.c_str();
|
const char *prop = top->Property.c_str();
|
||||||
|
|
||||||
|
if (tgt)
|
||||||
|
{
|
||||||
|
return top->Target == tgt && strcmp(prop, "LINK_LIBRARIES") == 0;
|
||||||
|
}
|
||||||
|
|
||||||
return (strcmp(prop, "LINK_LIBRARIES") == 0
|
return (strcmp(prop, "LINK_LIBRARIES") == 0
|
||||||
|| strcmp(prop, "LINK_INTERFACE_LIBRARIES") == 0
|
|| strcmp(prop, "LINK_INTERFACE_LIBRARIES") == 0
|
||||||
|| strcmp(prop, "IMPORTED_LINK_INTERFACE_LIBRARIES") == 0
|
|| strcmp(prop, "IMPORTED_LINK_INTERFACE_LIBRARIES") == 0
|
||||||
|
|
|
@ -47,7 +47,7 @@ struct cmGeneratorExpressionDAGChecker
|
||||||
void reportError(cmGeneratorExpressionContext *context,
|
void reportError(cmGeneratorExpressionContext *context,
|
||||||
const std::string &expr);
|
const std::string &expr);
|
||||||
|
|
||||||
bool EvaluatingLinkLibraries();
|
bool EvaluatingLinkLibraries(const char *tgt = 0);
|
||||||
|
|
||||||
#define DECLARE_TRANSITIVE_PROPERTY_METHOD(METHOD) \
|
#define DECLARE_TRANSITIVE_PROPERTY_METHOD(METHOD) \
|
||||||
bool METHOD () const;
|
bool METHOD () const;
|
||||||
|
|
Loading…
Reference in New Issue