summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionDAGChecker.h
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-06-10 14:01:59 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-06-10 14:13:21 (GMT)
commit0d8db250ceedf908a32c96c0a7e532f3fe9e61d9 (patch)
tree6fca18a5bcd3a77c1fd08e94e07e47bf4e0aa693 /Source/cmGeneratorExpressionDAGChecker.h
parent8a3b5bede8c8fc16b7b7b25d7e665e8936de04ee (diff)
downloadCMake-0d8db250ceedf908a32c96c0a7e532f3fe9e61d9.zip
CMake-0d8db250ceedf908a32c96c0a7e532f3fe9e61d9.tar.gz
CMake-0d8db250ceedf908a32c96c0a7e532f3fe9e61d9.tar.bz2
Use a preprocessor loop to manage the valid transitive properties.
Hopefully this will prevent regressions when adding further transitive properties in the future.
Diffstat (limited to 'Source/cmGeneratorExpressionDAGChecker.h')
-rw-r--r--Source/cmGeneratorExpressionDAGChecker.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/Source/cmGeneratorExpressionDAGChecker.h b/Source/cmGeneratorExpressionDAGChecker.h
index 8d9fd76..85b13e5 100644
--- a/Source/cmGeneratorExpressionDAGChecker.h
+++ b/Source/cmGeneratorExpressionDAGChecker.h
@@ -16,6 +16,16 @@
#include "cmGeneratorExpressionEvaluator.h"
+#define CM_FOR_EACH_TRANSITIVE_PROPERTY_METHOD(F) \
+ F(EvaluatingIncludeDirectories) \
+ F(EvaluatingCompileDefinitions) \
+ F(EvaluatingCompileOptions)
+
+#define CM_FOR_EACH_TRANSITIVE_PROPERTY_NAME(F) \
+ F(INTERFACE_INCLUDE_DIRECTORIES) \
+ F(INTERFACE_COMPILE_DEFINITIONS) \
+ F(INTERFACE_COMPILE_OPTIONS)
+
//----------------------------------------------------------------------------
struct cmGeneratorExpressionDAGChecker
{
@@ -38,9 +48,11 @@ struct cmGeneratorExpressionDAGChecker
const std::string &expr);
bool EvaluatingLinkLibraries();
- bool EvaluatingIncludeDirectories() const;
- bool EvaluatingCompileDefinitions() const;
- bool EvaluatingCompileOptions() const;
+
+#define DECLARE_TRANSITIVE_PROPERTY_METHOD(METHOD) \
+ bool METHOD () const;
+
+CM_FOR_EACH_TRANSITIVE_PROPERTY_METHOD(DECLARE_TRANSITIVE_PROPERTY_METHOD)
private:
Result checkGraph() const;