~ubuntu-branches/ubuntu/jaunty/cmake/jaunty-security

« back to all changes in this revision

Viewing changes to Source/cmCreateTestSourceList.h

  • Committer: Bazaar Package Importer
  • Author(s): A. Maitland Bottoms
  • Date: 2005-03-02 09:22:44 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050302092244-y6o9j8wr27vqcqvx
Tags: 2.0.5-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*=========================================================================
 
2
 
 
3
  Program:   CMake - Cross-Platform Makefile Generator
 
4
  Module:    $RCSfile: cmCreateTestSourceList.h,v $
 
5
  Language:  C++
 
6
  Date:      $Date: 2004/04/28 16:31:18 $
 
7
  Version:   $Revision: 1.8 $
 
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.
 
11
 
 
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.
 
15
 
 
16
=========================================================================*/
 
17
#ifndef cmCreateTestSourceList_h
 
18
#define cmCreateTestSourceList_h
 
19
 
 
20
#include "cmCommand.h"
 
21
 
 
22
/** \class cmCreateTestSourceList
 
23
 * \brief 
 
24
 *
 
25
 */
 
26
 
 
27
class cmCreateTestSourceList : public cmCommand
 
28
{
 
29
public:
 
30
  /**
 
31
   * This is a virtual constructor for the command.
 
32
   */
 
33
  virtual cmCommand* Clone() 
 
34
    {
 
35
    return new cmCreateTestSourceList;
 
36
    }
 
37
 
 
38
  /**
 
39
   * This is called when the command is first encountered in
 
40
   * the CMakeLists.txt file.
 
41
   */
 
42
  virtual bool InitialPass(std::vector<std::string> const& args);
 
43
 
 
44
  /**
 
45
   * This determines if the command gets propagated down
 
46
   * to makefiles located in subdirectories.
 
47
   */
 
48
  virtual bool IsInherited() {return true;}
 
49
 
 
50
  /**
 
51
   * The name of the command as specified in CMakeList.txt.
 
52
   */
 
53
  virtual const char* GetName() {return "CREATE_TEST_SOURCELIST";}
 
54
  
 
55
  /**
 
56
   * Succinct documentation.
 
57
   */
 
58
  virtual const char* GetTerseDocumentation() 
 
59
    {
 
60
    return "Create a test driver and source list for building test programs.";
 
61
    }
 
62
  
 
63
  /**
 
64
   * More documentation.
 
65
   */
 
66
  virtual const char* GetFullDocumentation()
 
67
    {
 
68
    return
 
69
      "  CREATE_TEST_SOURCELIST(SourceListName DriverName\n"
 
70
      "                         test1 test2 test3\n"
 
71
      "                         EXTRA_INCLUDE include.h\n"
 
72
      "                         FUNCTION function)\n"
 
73
      "A test driver is a program that links together many small tests into "
 
74
      "a single executable.  This is useful when building static executables "
 
75
      "with large libraries to shrink the total required size.  "
 
76
      "The list of source files "
 
77
      "needed to build the testdriver will be in SourceListName.  "
 
78
      "DriverName is the name of the test driver program.  The rest of "
 
79
      "the arguments consist of a list of test source files, can be "
 
80
      "; separated.  Each test source file should have a function in it that "
 
81
      "is the same name as the file with no extension (foo.cxx should have "
 
82
      "int foo();) DriverName will be able to call each of the tests by "
 
83
      "name on the command line. If EXTRA_INCLUDE is specified, then the "
 
84
      "next argument is included into the generated file. If FUNCTION is "
 
85
      "specified, then the next argument is taken as a function name that "
 
86
      "is passed a pointer to ac and av.  This can be used to add extra "
 
87
      "command line processing to each test. The cmake variable "
 
88
      "CMAKE_TESTDRIVER_BEFORE_TESTMAIN can be set to have code that will be "
 
89
      "placed directly before calling the test main function.   "
 
90
      "CMAKE_TESTDRIVER_AFTER_TESTMAIN can be set to have code that will be "
 
91
      "placed directly after the call to the test main function.";
 
92
    }
 
93
  
 
94
  cmTypeMacro(cmCreateTestSourceList, cmCommand);
 
95
};
 
96
 
 
97
 
 
98
 
 
99
#endif