cmCommands.cxx 7.84 KB
Newer Older
Will Schroeder's avatar
Will Schroeder committed
1 2
/*=========================================================================

3
  Program:   CMake - Cross-Platform Makefile Generator
Will Schroeder's avatar
Will Schroeder committed
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.
Will Schroeder's avatar
Will Schroeder committed
11 12 13 14 15 16

     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.

=========================================================================*/
17 18 19 20 21
// This file is used to compile all the commands
// that CMake knows about at compile time.
// This is sort of a boot strapping approach since you would
// like to have CMake to build CMake.   
#include "cmCommands.h"
22 23
#include "cmAddCustomTargetCommand.cxx"
#include "cmAddDefinitionsCommand.cxx"
24 25
#include "cmAddExecutableCommand.cxx"
#include "cmAddLibraryCommand.cxx"
Jim Miller's avatar
Jim Miller committed
26
#include "cmAddTestCommand.cxx"
27 28
#include "cmBuildCommand.cxx"
#include "cmBuildNameCommand.cxx"
29
#include "cmCMakeMinimumRequired.cxx"
30
#include "cmConfigureFileCommand.cxx"
31
#include "cmCreateTestSourceList.cxx"
32
#include "cmElseCommand.cxx"
33
#include "cmEnableTestingCommand.cxx"
Ken Martin's avatar
Ken Martin committed
34
#include "cmEndForEachCommand.cxx"
35
#include "cmEndIfCommand.cxx"
36
#include "cmExecProgramCommand.cxx"
37
#include "cmFindFileCommand.cxx"
38
#include "cmFindLibraryCommand.cxx"
39
#include "cmFindPackageCommand.cxx"
Ken Martin's avatar
Ken Martin committed
40
#include "cmFindPathCommand.cxx"
41
#include "cmFindProgramCommand.cxx"
Ken Martin's avatar
Ken Martin committed
42
#include "cmForEachCommand.cxx"
43
#include "cmGetFilenameComponentCommand.cxx"
44
#include "cmIfCommand.cxx"
45
#include "cmIncludeCommand.cxx"
46 47
#include "cmIncludeDirectoryCommand.cxx"
#include "cmIncludeRegularExpressionCommand.cxx"
Ken Martin's avatar
Ken Martin committed
48
#include "cmInstallFilesCommand.cxx"
49
#include "cmInstallProgramsCommand.cxx"
Ken Martin's avatar
Ken Martin committed
50
#include "cmInstallTargetsCommand.cxx"
51
#include "cmLinkDirectoriesCommand.cxx"
Ken Martin's avatar
Ken Martin committed
52
#include "cmMacroCommand.cxx"
53
#include "cmMakeDirectoryCommand.cxx"
54
#include "cmMarkAsAdvancedCommand.cxx"
55
#include "cmMessageCommand.cxx"
56 57 58
#include "cmOptionCommand.cxx"
#include "cmProjectCommand.cxx"
#include "cmSetCommand.cxx"
59
#include "cmSiteNameCommand.cxx"
Brad King's avatar
Brad King committed
60
#include "cmStringCommand.cxx"
61
#include "cmSubdirCommand.cxx"
62
#include "cmSubdirDependsCommand.cxx"
63
#include "cmTargetLinkLibrariesCommand.cxx"
64
#include "cmTryCompileCommand.cxx"
Ken Martin's avatar
Ken Martin committed
65
#include "cmTryRunCommand.cxx"
66
#include "cmVariableRequiresCommand.cxx"
Ken Martin's avatar
Ken Martin committed
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
#include "cmWriteFileCommand.cxx"

// on regular builds add in these extra commands we do not add it in on the
// bootstrap because they are not needed and may require dynaic loading
// support etc, which makes the bootstrap configure file a mess
#if defined(CMAKE_BUILD_WITH_CMAKE)
#include "cmAbstractFilesCommand.cxx"
#include "cmAddCustomCommandCommand.cxx"
#include "cmAddDependenciesCommand.cxx"
#include "cmAuxSourceDirectoryCommand.cxx"
#include "cmExportLibraryDependencies.cxx"
#include "cmFLTKWrapUICommand.cxx"
#include "cmGetCMakePropertyCommand.cxx"
#include "cmGetSourceFilePropertyCommand.cxx"
#include "cmGetTargetPropertyCommand.cxx"
#include "cmITKWrapTclCommand.cxx"
#include "cmIncludeExternalMSProjectCommand.cxx"
#include "cmLinkLibrariesCommand.cxx"
#include "cmLoadCacheCommand.cxx"
#include "cmOutputRequiredFilesCommand.cxx"
#include "cmRemoveCommand.cxx"
#include "cmSeparateArgumentsCommand.cxx"
#include "cmSetSourceFilesPropertiesCommand.cxx"
#include "cmSetTargetPropertiesCommand.cxx"
#include "cmSourceFilesCommand.cxx"
#include "cmSourceFilesRemoveCommand.cxx"
#include "cmSourceGroupCommand.cxx"
Ken Martin's avatar
Ken Martin committed
94
#include "cmVTKMakeInstantiatorCommand.cxx"
95 96 97
#include "cmVTKWrapJavaCommand.cxx"
#include "cmVTKWrapPythonCommand.cxx"
#include "cmVTKWrapTclCommand.cxx"
Ian Scott's avatar
Ian Scott committed
98
#include "cmQTWrapCPPCommand.cxx"
99
#include "cmQTWrapUICommand.cxx"
Ken Martin's avatar
Ken Martin committed
100 101
#include "cmUseMangledMesaCommand.cxx"
#include "cmUtilitySourceCommand.cxx"
102
#include "cmWrapExcludeFilesCommand.cxx"
103 104 105 106 107 108

// This one must be last because it includes windows.h and
// windows.h #defines GetCurrentDirectory which is a member
// of cmMakefile
#include "cmLoadCommandCommand.cxx"

109
#endif
Ken Martin's avatar
Ken Martin committed
110

111 112
void GetPredefinedCommands(std::list<cmCommand*>& commands)
{
113 114
  commands.push_back(new cmAddCustomTargetCommand);
  commands.push_back(new cmAddDefinitionsCommand);
115 116
  commands.push_back(new cmAddExecutableCommand);
  commands.push_back(new cmAddLibraryCommand);
Jim Miller's avatar
Jim Miller committed
117
  commands.push_back(new cmAddTestCommand);
118 119
  commands.push_back(new cmBuildCommand);
  commands.push_back(new cmBuildNameCommand);
120
  commands.push_back(new cmCMakeMinimumRequired);
121
  commands.push_back(new cmConfigureFileCommand);
122
  commands.push_back(new cmCreateTestSourceList);
123
  commands.push_back(new cmElseCommand);
124
  commands.push_back(new cmEnableTestingCommand);  
Ken Martin's avatar
Ken Martin committed
125
  commands.push_back(new cmEndForEachCommand);
126
  commands.push_back(new cmEndIfCommand);
127
  commands.push_back(new cmExecProgramCommand);
128
  commands.push_back(new cmFindFileCommand);
129
  commands.push_back(new cmFindLibraryCommand);
130
  commands.push_back(new cmFindPackageCommand);
131
  commands.push_back(new cmFindPathCommand);
132
  commands.push_back(new cmFindProgramCommand);
Ken Martin's avatar
Ken Martin committed
133
  commands.push_back(new cmForEachCommand);
134
  commands.push_back(new cmGetFilenameComponentCommand);
135 136
  commands.push_back(new cmIfCommand);
  commands.push_back(new cmIncludeCommand);
137
  commands.push_back(new cmIncludeDirectoryCommand);
138
  commands.push_back(new cmIncludeRegularExpressionCommand);
Ken Martin's avatar
Ken Martin committed
139
  commands.push_back(new cmInstallFilesCommand);
140
  commands.push_back(new cmInstallProgramsCommand);
Ken Martin's avatar
Ken Martin committed
141
  commands.push_back(new cmInstallTargetsCommand);
142
  commands.push_back(new cmLinkDirectoriesCommand);
Ken Martin's avatar
Ken Martin committed
143
  commands.push_back(new cmMacroCommand);
144
  commands.push_back(new cmMakeDirectoryCommand);
145
  commands.push_back(new cmMarkAsAdvancedCommand);
146
  commands.push_back(new cmMessageCommand);
147
  commands.push_back(new cmOptionCommand);
148
  commands.push_back(new cmProjectCommand);
149 150
  commands.push_back(new cmSetCommand);
  commands.push_back(new cmSiteNameCommand);
Brad King's avatar
Brad King committed
151
  commands.push_back(new cmStringCommand);
152
  commands.push_back(new cmSubdirCommand);
153
  commands.push_back(new cmSubdirDependsCommand);
154
  commands.push_back(new cmTargetLinkLibrariesCommand);
155
  commands.push_back(new cmTryCompileCommand);
Ken Martin's avatar
Ken Martin committed
156
  commands.push_back(new cmTryRunCommand);
157
  commands.push_back(new cmVariableRequiresCommand);
Ken Martin's avatar
Ken Martin committed
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
  commands.push_back(new cmWriteFileCommand);

#if defined(CMAKE_BUILD_WITH_CMAKE)
  commands.push_back(new cmAbstractFilesCommand);
  commands.push_back(new cmAddCustomCommandCommand);
  commands.push_back(new cmAddDependenciesCommand);
  commands.push_back(new cmAuxSourceDirectoryCommand);
  commands.push_back(new cmExportLibraryDependenciesCommand);
  commands.push_back(new cmFLTKWrapUICommand);
  commands.push_back(new cmGetCMakePropertyCommand);
  commands.push_back(new cmGetSourceFilePropertyCommand);
  commands.push_back(new cmGetTargetPropertyCommand);
  commands.push_back(new cmITKWrapTclCommand);
  commands.push_back(new cmIncludeExternalMSProjectCommand);
  commands.push_back(new cmLinkLibrariesCommand);
  commands.push_back(new cmLoadCacheCommand);
  commands.push_back(new cmLoadCommandCommand);
  commands.push_back(new cmOutputRequiredFilesCommand);
  commands.push_back(new cmRemoveCommand);
  commands.push_back(new cmSeparateArgumentsCommand);
  commands.push_back(new cmSetSourceFilesPropertiesCommand);
  commands.push_back(new cmSetTargetPropertiesCommand);
  commands.push_back(new cmSourceFilesCommand);
  commands.push_back(new cmSourceFilesRemoveCommand);
  commands.push_back(new cmSourceGroupCommand);
Ken Martin's avatar
Ken Martin committed
183
  commands.push_back(new cmVTKMakeInstantiatorCommand);
Ken Martin's avatar
Ken Martin committed
184
  commands.push_back(new cmVTKWrapJavaCommand);
185 186
  commands.push_back(new cmVTKWrapPythonCommand);
  commands.push_back(new cmVTKWrapTclCommand);
Ian Scott's avatar
Ian Scott committed
187
  commands.push_back(new cmQTWrapCPPCommand);
188
  commands.push_back(new cmQTWrapUICommand);
Ken Martin's avatar
Ken Martin committed
189 190
  commands.push_back(new cmUseMangledMesaCommand);
  commands.push_back(new cmUtilitySourceCommand);
191
  commands.push_back(new cmWrapExcludeFilesCommand);
Ken Martin's avatar
Ken Martin committed
192
#endif
193
}