summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionDAGChecker.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGeneratorExpressionDAGChecker.h')
-rw-r--r--Source/cmGeneratorExpressionDAGChecker.h34
1 files changed, 22 insertions, 12 deletions
diff --git a/Source/cmGeneratorExpressionDAGChecker.h b/Source/cmGeneratorExpressionDAGChecker.h
index 0b7ef02..b6effa1 100644
--- a/Source/cmGeneratorExpressionDAGChecker.h
+++ b/Source/cmGeneratorExpressionDAGChecker.h
@@ -16,17 +16,25 @@
#include "cmGeneratorExpressionEvaluator.h"
+#define CM_SELECT_BOTH(F, A1, A2) F(A1, A2)
+#define CM_SELECT_FIRST(F, A1, A2) F(A1)
+#define CM_SELECT_SECOND(F, A1, A2) F(A2)
+
+#define CM_FOR_EACH_TRANSITIVE_PROPERTY_IMPL(F, SELECT) \
+ SELECT(F, EvaluatingIncludeDirectories, INCLUDE_DIRECTORIES) \
+ SELECT(F, EvaluatingSystemIncludeDirectories, SYSTEM_INCLUDE_DIRECTORIES) \
+ SELECT(F, EvaluatingCompileDefinitions, COMPILE_DEFINITIONS) \
+ SELECT(F, EvaluatingCompileOptions, COMPILE_OPTIONS) \
+ SELECT(F, EvaluatingAutoUicOptions, AUTOUIC_OPTIONS)
+
+#define CM_FOR_EACH_TRANSITIVE_PROPERTY(F) \
+ CM_FOR_EACH_TRANSITIVE_PROPERTY_IMPL(F, CM_SELECT_BOTH)
+
#define CM_FOR_EACH_TRANSITIVE_PROPERTY_METHOD(F) \
- F(EvaluatingIncludeDirectories) \
- F(EvaluatingSystemIncludeDirectories) \
- F(EvaluatingCompileDefinitions) \
- F(EvaluatingCompileOptions)
+ CM_FOR_EACH_TRANSITIVE_PROPERTY_IMPL(F, CM_SELECT_FIRST)
#define CM_FOR_EACH_TRANSITIVE_PROPERTY_NAME(F) \
- F(INTERFACE_INCLUDE_DIRECTORIES) \
- F(INTERFACE_SYSTEM_INCLUDE_DIRECTORIES) \
- F(INTERFACE_COMPILE_DEFINITIONS) \
- F(INTERFACE_COMPILE_OPTIONS)
+ CM_FOR_EACH_TRANSITIVE_PROPERTY_IMPL(F, CM_SELECT_SECOND)
//----------------------------------------------------------------------------
struct cmGeneratorExpressionDAGChecker
@@ -44,9 +52,9 @@ struct cmGeneratorExpressionDAGChecker
ALREADY_SEEN
};
- Result check() const;
+ Result Check() const;
- void reportError(cmGeneratorExpressionContext *context,
+ void ReportError(cmGeneratorExpressionContext *context,
const std::string &expr);
bool EvaluatingLinkLibraries(const char *tgt = 0);
@@ -54,14 +62,16 @@ struct cmGeneratorExpressionDAGChecker
#define DECLARE_TRANSITIVE_PROPERTY_METHOD(METHOD) \
bool METHOD () const;
-CM_FOR_EACH_TRANSITIVE_PROPERTY_METHOD(DECLARE_TRANSITIVE_PROPERTY_METHOD)
+ CM_FOR_EACH_TRANSITIVE_PROPERTY_METHOD(DECLARE_TRANSITIVE_PROPERTY_METHOD)
+
+#undef DECLARE_TRANSITIVE_PROPERTY_METHOD
bool GetTransitivePropertiesOnly();
void SetTransitivePropertiesOnly()
{ this->TransitivePropertiesOnly = true; }
private:
- Result checkGraph() const;
+ Result CheckGraph() const;
private:
const cmGeneratorExpressionDAGChecker * const Parent;