ffc84f8fd191d5d77808d716f0c9e28d2b546679
[platform/upstream/cmake.git] / Source / cmGeneratorExpressionDAGChecker.h
1 /*============================================================================
2   CMake - Cross Platform Makefile Generator
3   Copyright 2012 Stephen Kelly <steveire@gmail.com>
4
5   Distributed under the OSI-approved BSD License (the "License");
6   see accompanying file Copyright.txt for details.
7
8   This software is distributed WITHOUT ANY WARRANTY; without even the
9   implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10   See the License for more information.
11 ============================================================================*/
12 #ifndef cmGeneratorExpressionDAGChecker_h
13 #define cmGeneratorExpressionDAGChecker_h
14
15 #include "cmStandardIncludes.h"
16
17 #include "cmGeneratorExpressionEvaluator.h"
18
19 //----------------------------------------------------------------------------
20 struct cmGeneratorExpressionDAGChecker
21 {
22   cmGeneratorExpressionDAGChecker(const cmListFileBacktrace &backtrace,
23                                   const std::string &target,
24                                   const std::string &property,
25                                   const GeneratorExpressionContent *content,
26                                   cmGeneratorExpressionDAGChecker *parent);
27
28   bool check() const;
29
30   void reportError(cmGeneratorExpressionContext *context,
31                    const std::string &expr);
32 private:
33   bool isDAG() const;
34
35 private:
36   const cmGeneratorExpressionDAGChecker * const Parent;
37   const std::string Target;
38   const std::string Property;
39   const GeneratorExpressionContent * const Content;
40   const cmListFileBacktrace Backtrace;
41   bool IsDAG;
42 };
43
44 #endif