cmAddExecutableCommand.h 2.19 KB
Newer Older
1
2
/*=========================================================================

3
  Program:   CMake - Cross-Platform Makefile Generator
4
5
6
7
8
  Module:    $RCSfile$
  Language:  C++
  Date:      $Date$
  Version:   $Revision$

9
10
  Copyright (c) 2002 Kitware, Inc., Insight Consortium.  All rights reserved.
  See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
11

Will Schroeder's avatar
Will Schroeder committed
12
13
14
     This software is distributed WITHOUT ANY WARRANTY; without even 
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     PURPOSE.  See the above copyright notices for more information.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42

=========================================================================*/
#ifndef cmExecutablesCommand_h
#define cmExecutablesCommand_h

#include "cmCommand.h"

/** \class cmExecutablesCommand
 * \brief Defines a list of executables to build.
 *
 * cmExecutablesCommand defines a list of executable (i.e., test)
 * programs to create.
 */
class cmAddExecutableCommand : public cmCommand
{
public:
  /**
   * This is a virtual constructor for the command.
   */
  virtual cmCommand* Clone() 
    {
    return new cmAddExecutableCommand;
    }

  /**
   * This is called when the command is first encountered in
   * the CMakeLists.txt file.
   */
43
  virtual bool InitialPass(std::vector<std::string> const& args);
44
45
46
47
48
49
50
51
52
53
54

  /**
   * The name of the command as specified in CMakeList.txt.
   */
  virtual const char* GetName() { return "ADD_EXECUTABLE";}

  /**
   * Succinct documentation.
   */
  virtual const char* GetTerseDocumentation() 
    {
55
    return "Add an executable to the project using the specified source files.";
56
57
58
59
60
61
62
63
    }
  
  /**
   * More documentation.
   */
  virtual const char* GetFullDocumentation()
    {
    return
64
65
66
      "  ADD_EXECUTABLE(exename [WIN32] source1\n"
      "                 source2 ... sourceN)\n"
      "This command adds an executable target to the current directory.  "
Bill Hoffman's avatar
Bill Hoffman committed
67
      "The executable will be built from the list of source files "
68
      "specified.  The second argument to this command can be WIN32 "
69
      "which indicates that the executable (when compiled on windows) "
Bill Hoffman's avatar
Bill Hoffman committed
70
      "is a windows app (using WinMain) not a console app (using main).";
71
72
73
74
75
76
77
    }
  
  cmTypeMacro(cmAddExecutableCommand, cmCommand);
};


#endif