ENH: add submit via cp mode
[cmake.git] / Source / cmTest.h
blob9caa9fd2d0b590174251a5d85c3b7a1961bf4408
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmTest.h,v $
5 Language: C++
6 Date: $Date: 2009-03-16 14:51:20 $
7 Version: $Revision: 1.8 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #ifndef cmTest_h
18 #define cmTest_h
20 #include "cmCustomCommand.h"
21 #include "cmPropertyMap.h"
22 class cmMakefile;
24 /** \class cmTest
25 * \brief Represent a test
27 * cmTest is representation of a test.
29 class cmTest
31 public:
32 /**
34 cmTest();
35 ~cmTest();
37 ///! Set the test name
38 void SetName(const char* name);
39 const char* GetName() const { return this->Name.c_str(); }
41 void SetCommand(std::vector<std::string> const& command);
42 std::vector<std::string> const& GetCommand() const
44 return this->Command;
47 /**
48 * Print the structure to std::cout.
50 void Print() const;
52 ///! Set/Get a property of this source file
53 void SetProperty(const char *prop, const char *value);
54 void AppendProperty(const char* prop, const char* value);
55 const char *GetProperty(const char *prop) const;
56 bool GetPropertyAsBool(const char *prop) const;
57 cmPropertyMap &GetProperties() { return this->Properties; };
59 // Define the properties
60 static void DefineProperties(cmake *cm);
62 ///! Set the cmMakefile that owns this test
63 void SetMakefile(cmMakefile *mf);
64 cmMakefile *GetMakefile() { return this->Makefile;};
66 /** Get/Set whether this is an old-style test. */
67 bool GetOldStyle() const { return this->OldStyle; }
68 void SetOldStyle(bool b) { this->OldStyle = b; }
70 private:
71 cmPropertyMap Properties;
72 cmStdString Name;
73 std::vector<std::string> Command;
75 bool OldStyle;
77 // The cmMakefile instance that owns this target. This should
78 // always be set.
79 cmMakefile* Makefile;
82 #endif