1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
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 ============================================================================*/
15 #include "cmCustomCommand.h"
16 #include "cmPropertyMap.h"
18 class cmListFileBacktrace;
21 * \brief Represent a test
23 * cmTest is representation of a test.
30 cmTest(cmMakefile* mf);
33 ///! Set the test name
34 void SetName(const char* name);
35 const char* GetName() const { return this->Name.c_str(); }
37 void SetCommand(std::vector<std::string> const& command);
38 std::vector<std::string> const& GetCommand() const
44 * Print the structure to std::cout.
48 ///! Set/Get a property of this source file
49 void SetProperty(const char *prop, const char *value);
50 void AppendProperty(const char* prop, const char* value,bool asString=false);
51 const char *GetProperty(const char *prop) const;
52 bool GetPropertyAsBool(const char *prop) const;
53 cmPropertyMap &GetProperties() { return this->Properties; };
55 // Define the properties
56 static void DefineProperties(cmake *cm);
58 /** Get the cmMakefile instance that owns this test. */
59 cmMakefile *GetMakefile() { return this->Makefile;};
61 /** Get the backtrace of the command that created this test. */
62 cmListFileBacktrace const& GetBacktrace() const;
64 /** Get/Set whether this is an old-style test. */
65 bool GetOldStyle() const { return this->OldStyle; }
66 void SetOldStyle(bool b) { this->OldStyle = b; }
69 cmPropertyMap Properties;
71 std::vector<std::string> Command;
76 cmListFileBacktrace* Backtrace;