cmCommands.cxx 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #include "cmCommands.h"
  4. #include "cmAddCustomCommandCommand.h"
  5. #include "cmAddCustomTargetCommand.h"
  6. #include "cmAddDefinitionsCommand.h"
  7. #include "cmAddDependenciesCommand.h"
  8. #include "cmAddExecutableCommand.h"
  9. #include "cmAddLibraryCommand.h"
  10. #include "cmAddSubDirectoryCommand.h"
  11. #include "cmAddTestCommand.h"
  12. #include "cmBreakCommand.h"
  13. #include "cmBuildCommand.h"
  14. #include "cmCMakeMinimumRequired.h"
  15. #include "cmCMakePolicyCommand.h"
  16. #include "cmCommandArgumentsHelper.h"
  17. #include "cmConditionEvaluator.h"
  18. #include "cmConfigureFileCommand.h"
  19. #include "cmContinueCommand.h"
  20. #include "cmCoreTryCompile.h"
  21. #include "cmCreateTestSourceList.h"
  22. #include "cmDefinePropertyCommand.h"
  23. #include "cmElseCommand.h"
  24. #include "cmEnableLanguageCommand.h"
  25. #include "cmEnableTestingCommand.h"
  26. #include "cmEndForEachCommand.h"
  27. #include "cmEndFunctionCommand.h"
  28. #include "cmEndIfCommand.h"
  29. #include "cmEndMacroCommand.h"
  30. #include "cmEndWhileCommand.h"
  31. #include "cmExecProgramCommand.h"
  32. #include "cmExecuteProcessCommand.h"
  33. #include "cmExpandedCommandArgument.h"
  34. #include "cmFileCommand.h"
  35. #include "cmFindBase.h"
  36. #include "cmFindCommon.h"
  37. #include "cmFindFileCommand.h"
  38. #include "cmFindLibraryCommand.h"
  39. #include "cmFindPackageCommand.h"
  40. #include "cmFindPathCommand.h"
  41. #include "cmFindProgramCommand.h"
  42. #include "cmForEachCommand.h"
  43. #include "cmFunctionCommand.h"
  44. #include "cmGetCMakePropertyCommand.h"
  45. #include "cmGetDirectoryPropertyCommand.h"
  46. #include "cmGetFilenameComponentCommand.h"
  47. #include "cmGetPropertyCommand.h"
  48. #include "cmGetSourceFilePropertyCommand.h"
  49. #include "cmGetTargetPropertyCommand.h"
  50. #include "cmGetTestPropertyCommand.h"
  51. #include "cmHexFileConverter.h"
  52. #include "cmIfCommand.h"
  53. #include "cmIncludeCommand.h"
  54. #include "cmIncludeDirectoryCommand.h"
  55. #include "cmIncludeRegularExpressionCommand.h"
  56. #include "cmInstallCommand.h"
  57. #include "cmInstallCommandArguments.h"
  58. #include "cmInstallFilesCommand.h"
  59. #include "cmInstallTargetsCommand.h"
  60. #include "cmLinkDirectoriesCommand.h"
  61. #include "cmListCommand.h"
  62. #include "cmMacroCommand.h"
  63. #include "cmMakeDirectoryCommand.h"
  64. #include "cmMarkAsAdvancedCommand.h"
  65. #include "cmMathCommand.h"
  66. #include "cmMessageCommand.h"
  67. #include "cmOptionCommand.h"
  68. #include "cmParseArgumentsCommand.h"
  69. #include "cmPathLabel.h"
  70. #include "cmProjectCommand.h"
  71. #include "cmReturnCommand.h"
  72. #include "cmSearchPath.h"
  73. #include "cmSeparateArgumentsCommand.h"
  74. #include "cmSetCommand.h"
  75. #include "cmSetDirectoryPropertiesCommand.h"
  76. #include "cmSetPropertyCommand.h"
  77. #include "cmSetSourceFilesPropertiesCommand.h"
  78. #include "cmSetTargetPropertiesCommand.h"
  79. #include "cmSetTestsPropertiesCommand.h"
  80. #include "cmSiteNameCommand.h"
  81. #include "cmStringCommand.h"
  82. #include "cmSubdirCommand.h"
  83. #include "cmTargetLinkLibrariesCommand.h"
  84. #include "cmTimestamp.h"
  85. #include "cmTryCompileCommand.h"
  86. #include "cmTryRunCommand.h"
  87. #include "cmUnsetCommand.h"
  88. #include "cmWhileCommand.h"
  89. #if defined(CMAKE_BUILD_WITH_CMAKE)
  90. #include "cmAddCompileOptionsCommand.h"
  91. #include "cmAuxSourceDirectoryCommand.h"
  92. #include "cmBuildNameCommand.h"
  93. #include "cmCMakeHostSystemInformationCommand.h"
  94. #include "cmElseIfCommand.h"
  95. #include "cmExportCommand.h"
  96. #include "cmExportLibraryDependenciesCommand.h"
  97. #include "cmFLTKWrapUICommand.h"
  98. #include "cmIncludeExternalMSProjectCommand.h"
  99. #include "cmInstallProgramsCommand.h"
  100. #include "cmLinkLibrariesCommand.h"
  101. #include "cmLoadCacheCommand.h"
  102. #include "cmLoadCommandCommand.h"
  103. #include "cmOutputRequiredFilesCommand.h"
  104. #include "cmQTWrapCPPCommand.h"
  105. #include "cmQTWrapUICommand.h"
  106. #include "cmRemoveCommand.h"
  107. #include "cmRemoveDefinitionsCommand.h"
  108. #include "cmSourceGroupCommand.h"
  109. #include "cmSubdirDependsCommand.h"
  110. #include "cmTargetCompileDefinitionsCommand.h"
  111. #include "cmTargetCompileFeaturesCommand.h"
  112. #include "cmTargetCompileOptionsCommand.h"
  113. #include "cmTargetIncludeDirectoriesCommand.h"
  114. #include "cmTargetPropCommandBase.h"
  115. #include "cmTargetSourcesCommand.h"
  116. #include "cmUseMangledMesaCommand.h"
  117. #include "cmUtilitySourceCommand.h"
  118. #include "cmVariableRequiresCommand.h"
  119. #include "cmVariableWatchCommand.h"
  120. #include "cmWriteFileCommand.h"
  121. #endif
  122. std::vector<cmCommand*> GetPredefinedCommands()
  123. {
  124. std::vector<cmCommand*> commands;
  125. commands.push_back(new cmAddCustomCommandCommand);
  126. commands.push_back(new cmAddCustomTargetCommand);
  127. commands.push_back(new cmAddDefinitionsCommand);
  128. commands.push_back(new cmAddDependenciesCommand);
  129. commands.push_back(new cmAddExecutableCommand);
  130. commands.push_back(new cmAddLibraryCommand);
  131. commands.push_back(new cmAddSubDirectoryCommand);
  132. commands.push_back(new cmAddTestCommand);
  133. commands.push_back(new cmBreakCommand);
  134. commands.push_back(new cmBuildCommand);
  135. commands.push_back(new cmCMakeMinimumRequired);
  136. commands.push_back(new cmCMakePolicyCommand);
  137. commands.push_back(new cmConfigureFileCommand);
  138. commands.push_back(new cmContinueCommand);
  139. commands.push_back(new cmCreateTestSourceList);
  140. commands.push_back(new cmDefinePropertyCommand);
  141. commands.push_back(new cmElseCommand);
  142. commands.push_back(new cmEnableLanguageCommand);
  143. commands.push_back(new cmEnableTestingCommand);
  144. commands.push_back(new cmEndForEachCommand);
  145. commands.push_back(new cmEndFunctionCommand);
  146. commands.push_back(new cmEndIfCommand);
  147. commands.push_back(new cmEndMacroCommand);
  148. commands.push_back(new cmEndWhileCommand);
  149. commands.push_back(new cmExecProgramCommand);
  150. commands.push_back(new cmExecuteProcessCommand);
  151. commands.push_back(new cmFileCommand);
  152. commands.push_back(new cmFindFileCommand);
  153. commands.push_back(new cmFindLibraryCommand);
  154. commands.push_back(new cmFindPackageCommand);
  155. commands.push_back(new cmFindPathCommand);
  156. commands.push_back(new cmFindProgramCommand);
  157. commands.push_back(new cmForEachCommand);
  158. commands.push_back(new cmFunctionCommand);
  159. commands.push_back(new cmGetCMakePropertyCommand);
  160. commands.push_back(new cmGetDirectoryPropertyCommand);
  161. commands.push_back(new cmGetFilenameComponentCommand);
  162. commands.push_back(new cmGetPropertyCommand);
  163. commands.push_back(new cmGetSourceFilePropertyCommand);
  164. commands.push_back(new cmGetTargetPropertyCommand);
  165. commands.push_back(new cmGetTestPropertyCommand);
  166. commands.push_back(new cmIfCommand);
  167. commands.push_back(new cmIncludeCommand);
  168. commands.push_back(new cmIncludeDirectoryCommand);
  169. commands.push_back(new cmIncludeRegularExpressionCommand);
  170. commands.push_back(new cmInstallCommand);
  171. commands.push_back(new cmInstallFilesCommand);
  172. commands.push_back(new cmInstallTargetsCommand);
  173. commands.push_back(new cmLinkDirectoriesCommand);
  174. commands.push_back(new cmListCommand);
  175. commands.push_back(new cmMacroCommand);
  176. commands.push_back(new cmMakeDirectoryCommand);
  177. commands.push_back(new cmMarkAsAdvancedCommand);
  178. commands.push_back(new cmMathCommand);
  179. commands.push_back(new cmMessageCommand);
  180. commands.push_back(new cmOptionCommand);
  181. commands.push_back(new cmParseArgumentsCommand);
  182. commands.push_back(new cmProjectCommand);
  183. commands.push_back(new cmReturnCommand);
  184. commands.push_back(new cmSeparateArgumentsCommand);
  185. commands.push_back(new cmSetCommand);
  186. commands.push_back(new cmSetDirectoryPropertiesCommand);
  187. commands.push_back(new cmSetPropertyCommand);
  188. commands.push_back(new cmSetSourceFilesPropertiesCommand);
  189. commands.push_back(new cmSetTargetPropertiesCommand);
  190. commands.push_back(new cmSetTestsPropertiesCommand);
  191. commands.push_back(new cmSiteNameCommand);
  192. commands.push_back(new cmStringCommand);
  193. commands.push_back(new cmSubdirCommand);
  194. commands.push_back(new cmTargetLinkLibrariesCommand);
  195. commands.push_back(new cmTryCompileCommand);
  196. commands.push_back(new cmTryRunCommand);
  197. commands.push_back(new cmUnsetCommand);
  198. commands.push_back(new cmWhileCommand);
  199. #if defined(CMAKE_BUILD_WITH_CMAKE)
  200. commands.push_back(new cmAddCompileOptionsCommand);
  201. commands.push_back(new cmAuxSourceDirectoryCommand);
  202. commands.push_back(new cmBuildNameCommand);
  203. commands.push_back(new cmCMakeHostSystemInformationCommand);
  204. commands.push_back(new cmElseIfCommand);
  205. commands.push_back(new cmExportCommand);
  206. commands.push_back(new cmExportLibraryDependenciesCommand);
  207. commands.push_back(new cmFLTKWrapUICommand);
  208. commands.push_back(new cmIncludeExternalMSProjectCommand);
  209. commands.push_back(new cmInstallProgramsCommand);
  210. commands.push_back(new cmLinkLibrariesCommand);
  211. commands.push_back(new cmLoadCacheCommand);
  212. commands.push_back(new cmLoadCommandCommand);
  213. commands.push_back(new cmOutputRequiredFilesCommand);
  214. commands.push_back(new cmQTWrapCPPCommand);
  215. commands.push_back(new cmQTWrapUICommand);
  216. commands.push_back(new cmRemoveCommand);
  217. commands.push_back(new cmRemoveDefinitionsCommand);
  218. commands.push_back(new cmSourceGroupCommand);
  219. commands.push_back(new cmSubdirDependsCommand);
  220. commands.push_back(new cmTargetCompileDefinitionsCommand);
  221. commands.push_back(new cmTargetCompileFeaturesCommand);
  222. commands.push_back(new cmTargetCompileOptionsCommand);
  223. commands.push_back(new cmTargetIncludeDirectoriesCommand);
  224. commands.push_back(new cmTargetSourcesCommand);
  225. commands.push_back(new cmUseMangledMesaCommand);
  226. commands.push_back(new cmUtilitySourceCommand);
  227. commands.push_back(new cmVariableRequiresCommand);
  228. commands.push_back(new cmVariableWatchCommand);
  229. commands.push_back(new cmWriteFileCommand);
  230. #endif
  231. return commands;
  232. }