Add API to check if we're reading a includes or defines property.

This will allow the implementation of the LINKED generator expression.
This commit is contained in:
Stephen Kelly 2013-01-30 23:35:22 +01:00
parent 2c3654c3de
commit 0fa7f69c0e
2 changed files with 18 additions and 0 deletions

View File

@ -125,3 +125,19 @@ bool cmGeneratorExpressionDAGChecker::EvaluatingLinkLibraries()
|| strncmp(prop, "LINK_INTERFACE_LIBRARIES_", 26) == 0
|| strncmp(prop, "IMPORTED_LINK_INTERFACE_LIBRARIES_", 35) == 0);
}
//----------------------------------------------------------------------------
bool cmGeneratorExpressionDAGChecker::EvaluatingIncludeDirectories()
{
const char *prop = this->Property.c_str();
return (strcmp(prop, "INCLUDE_DIRECTORIES") == 0
|| strcmp(prop, "INTERFACE_INCLUDE_DIRECTORIES") == 0 );
}
//----------------------------------------------------------------------------
bool cmGeneratorExpressionDAGChecker::EvaluatingCompileDefinitions()
{
const char *prop = this->Property.c_str();
return (strcmp(prop, "COMPILE_DEFINITIONS") == 0
|| strcmp(prop, "INTERFACE_COMPILE_DEFINITIONS") == 0 );
}

View File

@ -37,6 +37,8 @@ struct cmGeneratorExpressionDAGChecker
const std::string &expr);
bool EvaluatingLinkLibraries();
bool EvaluatingIncludeDirectories();
bool EvaluatingCompileDefinitions();
private:
Result checkGraph() const;