Imported Upstream version 2.8.12.2
[platform/upstream/cmake.git] / Source / cmMakeDirectoryCommand.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 cmMakeDirectoryCommand_h
13 #define cmMakeDirectoryCommand_h
14
15 #include "cmCommand.h"
16
17 /** \class cmMakeDirectoryCommand
18  * \brief Specify auxiliary source code directories.
19  *
20  * cmMakeDirectoryCommand specifies source code directories
21  * that must be built as part of this build process. This directories
22  * are not recursively processed like the SUBDIR command (cmSubdirCommand).
23  * A side effect of this command is to create a subdirectory in the build
24  * directory structure.
25  */
26 class cmMakeDirectoryCommand : public cmCommand
27 {
28 public:
29   /**
30    * This is a virtual constructor for the command.
31    */
32   virtual cmCommand* Clone()
33     {
34     return new cmMakeDirectoryCommand;
35     }
36
37   /**
38    * This is called when the command is first encountered in
39    * the CMakeLists.txt file.
40    */
41   virtual bool InitialPass(std::vector<std::string> const& args,
42                            cmExecutionStatus &status);
43
44   /**
45    * The name of the command as specified in CMakeList.txt.
46    */
47   virtual const char* GetName() const { return "make_directory";}
48
49   /**
50    * This determines if the command is invoked when in script mode.
51    */
52   virtual bool IsScriptable() const { return true; }
53
54   /**
55    * Succinct documentation.
56    */
57   virtual const char* GetTerseDocumentation() const
58     {
59     return "Deprecated. Use the file(MAKE_DIRECTORY ) command instead.";
60     }
61
62   /**
63    * More documentation.
64    */
65   virtual const char* GetFullDocumentation() const
66     {
67     return
68       "  make_directory(directory)\n"
69       "Creates the specified directory.  Full paths should be given.  Any "
70       "parent directories that do not exist will also be created.  Use with "
71       "care.";
72     }
73
74   /** This command is kept for compatibility with older CMake versions. */
75   virtual bool IsDiscouraged() const
76     {
77     return true;
78     }
79
80   cmTypeMacro(cmMakeDirectoryCommand, cmCommand);
81 };
82
83
84
85 #endif