Imported Upstream version 2.8.12.2
[platform/upstream/cmake.git] / Source / cmTestGenerator.h
1 /*============================================================================
2   CMake - Cross Platform Makefile Generator
3   Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
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 cmTestGenerator_h
13 #define cmTestGenerator_h
14
15 #include "cmScriptGenerator.h"
16
17 class cmTest;
18
19 /** \class cmTestGenerator
20  * \brief Support class for generating install scripts.
21  *
22  */
23 class cmTestGenerator: public cmScriptGenerator
24 {
25 public:
26   cmTestGenerator(cmTest* test,
27                   std::vector<std::string> const&
28                   configurations = std::vector<std::string>());
29   virtual ~cmTestGenerator();
30
31 protected:
32   virtual void GenerateScriptConfigs(std::ostream& os, Indent const& indent);
33   virtual void GenerateScriptActions(std::ostream& os, Indent const& indent);
34   virtual void GenerateScriptForConfig(std::ostream& os,
35                                        const char* config,
36                                        Indent const& indent);
37   virtual void GenerateScriptNoConfig(std::ostream& os, Indent const& indent);
38   virtual bool NeedsScriptNoConfig() const;
39   void GenerateOldStyle(std::ostream& os, Indent const& indent);
40
41   cmTest* Test;
42   bool TestGenerated;
43 };
44
45 #endif