cmCPluginAPI.cxx 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. /*
  14. this file contains the implementation of the C API to CMake. Generally
  15. these routines just manipulate arguments and then call the associated
  16. methods on the CMake classes. */
  17. #include "cmMakefile.h"
  18. #include "cmCPluginAPI.h"
  19. #include "cmSourceFile.h"
  20. extern "C"
  21. {
  22. void CCONV *cmGetClientData(void *info)
  23. {
  24. return ((cmLoadedCommandInfo *)info)->ClientData;
  25. }
  26. void CCONV cmSetClientData(void *info, void *cd)
  27. {
  28. ((cmLoadedCommandInfo *)info)->ClientData = cd;
  29. }
  30. void CCONV cmSetError(void *info, const char *err)
  31. {
  32. if (((cmLoadedCommandInfo *)info)->Error)
  33. {
  34. free(((cmLoadedCommandInfo *)info)->Error);
  35. }
  36. ((cmLoadedCommandInfo *)info)->Error = strdup(err);
  37. }
  38. unsigned int CCONV cmGetCacheMajorVersion(void *arg)
  39. {
  40. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  41. return mf->GetCacheMajorVersion();
  42. }
  43. unsigned int CCONV cmGetCacheMinorVersion(void *arg)
  44. {
  45. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  46. return mf->GetCacheMinorVersion();
  47. }
  48. unsigned int CCONV cmGetMajorVersion(void *)
  49. {
  50. return cmMakefile::GetMajorVersion();
  51. }
  52. unsigned int CCONV cmGetMinorVersion(void *)
  53. {
  54. return cmMakefile::GetMinorVersion();
  55. }
  56. void CCONV cmAddDefinition(void *arg, const char* name, const char* value)
  57. {
  58. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  59. mf->AddDefinition(name,value);
  60. }
  61. /* Add a definition to this makefile and the global cmake cache. */
  62. void CCONV cmAddCacheDefinition(void *arg, const char* name, const char* value,
  63. const char* doc,
  64. int type)
  65. {
  66. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  67. switch (type)
  68. {
  69. case CM_CACHE_BOOL:
  70. mf->AddCacheDefinition(name,value,doc,
  71. cmCacheManager::BOOL);
  72. break;
  73. case CM_CACHE_PATH:
  74. mf->AddCacheDefinition(name,value,doc,
  75. cmCacheManager::PATH);
  76. break;
  77. case CM_CACHE_FILEPATH:
  78. mf->AddCacheDefinition(name,value,doc,
  79. cmCacheManager::FILEPATH);
  80. break;
  81. case CM_CACHE_STRING:
  82. mf->AddCacheDefinition(name,value,doc,
  83. cmCacheManager::STRING);
  84. break;
  85. case CM_CACHE_INTERNAL:
  86. mf->AddCacheDefinition(name,value,doc,
  87. cmCacheManager::INTERNAL);
  88. break;
  89. case CM_CACHE_STATIC:
  90. mf->AddCacheDefinition(name,value,doc,
  91. cmCacheManager::STATIC);
  92. break;
  93. }
  94. }
  95. const char* CCONV cmGetProjectName(void *arg)
  96. {
  97. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  98. return mf->GetProjectName();
  99. }
  100. const char* CCONV cmGetHomeDirectory(void *arg)
  101. {
  102. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  103. return mf->GetHomeDirectory();
  104. }
  105. const char* CCONV cmGetHomeOutputDirectory(void *arg)
  106. {
  107. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  108. return mf->GetHomeOutputDirectory();
  109. }
  110. const char* CCONV cmGetStartDirectory(void *arg)
  111. {
  112. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  113. return mf->GetStartDirectory();
  114. }
  115. const char* CCONV cmGetStartOutputDirectory(void *arg)
  116. {
  117. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  118. return mf->GetStartOutputDirectory();
  119. }
  120. const char* CCONV cmGetCurrentDirectory(void *arg)
  121. {
  122. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  123. return mf->GetCurrentDirectory();
  124. }
  125. const char* CCONV cmGetCurrentOutputDirectory(void *arg)
  126. {
  127. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  128. return mf->GetCurrentOutputDirectory();
  129. }
  130. const char* CCONV cmGetDefinition(void *arg,const char*def)
  131. {
  132. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  133. return mf->GetDefinition(def);
  134. }
  135. int CCONV cmIsOn(void *arg, const char* name)
  136. {
  137. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  138. return static_cast<int>(mf->IsOn(name));
  139. }
  140. /** Check if a command exists. */
  141. int CCONV cmCommandExists(void *arg, const char* name)
  142. {
  143. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  144. return static_cast<int>(mf->CommandExists(name));
  145. }
  146. void CCONV cmAddDefineFlag(void *arg, const char* definition)
  147. {
  148. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  149. mf->AddDefineFlag(definition);
  150. }
  151. void CCONV cmAddLinkDirectoryForTarget(void *arg, const char *tgt, const char* d)
  152. {
  153. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  154. mf->AddLinkDirectoryForTarget(tgt,d);
  155. }
  156. void CCONV cmAddExecutable(void *arg, const char *exename,
  157. int numSrcs, const char **srcs, int win32)
  158. {
  159. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  160. std::vector<std::string> srcs2;
  161. int i;
  162. for (i = 0; i < numSrcs; ++i)
  163. {
  164. srcs2.push_back(srcs[i]);
  165. }
  166. cmTarget* tg = mf->AddExecutable(exename, srcs2);
  167. if ( win32 )
  168. {
  169. tg->SetProperty("WIN32_EXECUTABLE", "ON");
  170. }
  171. }
  172. void CCONV cmAddUtilityCommand(void *arg, const char* utilityName,
  173. const char* command,
  174. const char* arguments,
  175. int all,
  176. int numDepends,
  177. const char **depends,
  178. int numOutputs,
  179. const char **outputs)
  180. {
  181. // Get the makefile instance. Perform an extra variable expansion
  182. // now because the API caller expects it.
  183. cmMakefile* mf = static_cast<cmMakefile*>(arg);
  184. // Construct the command line for the command.
  185. cmCustomCommandLine commandLine;
  186. std::string expand = command;
  187. commandLine.push_back(mf->ExpandVariablesInString(expand));
  188. if(arguments && arguments[0])
  189. {
  190. // TODO: Parse arguments!
  191. expand = arguments;
  192. commandLine.push_back(mf->ExpandVariablesInString(expand));
  193. }
  194. cmCustomCommandLines commandLines;
  195. commandLines.push_back(commandLine);
  196. // Accumulate the list of dependencies.
  197. std::vector<std::string> depends2;
  198. for(int i = 0; i < numDepends; ++i)
  199. {
  200. expand = depends[i];
  201. depends2.push_back(mf->ExpandVariablesInString(expand));
  202. }
  203. // Only one output is allowed.
  204. const char* output = 0;
  205. std::string outputStr;
  206. if(numOutputs > 0)
  207. {
  208. expand = outputs[0];
  209. outputStr = mf->ExpandVariablesInString(expand);
  210. output = outputStr.c_str();
  211. }
  212. // Pass the call to the makefile instance.
  213. mf->AddUtilityCommand(utilityName, (all ? true : false),
  214. output, 0, depends2, commandLines);
  215. }
  216. void CCONV cmAddCustomCommand(void *arg, const char* source,
  217. const char* command,
  218. int numArgs, const char **args,
  219. int numDepends, const char **depends,
  220. int numOutputs, const char **outputs,
  221. const char *target)
  222. {
  223. // Get the makefile instance. Perform an extra variable expansion
  224. // now because the API caller expects it.
  225. cmMakefile* mf = static_cast<cmMakefile*>(arg);
  226. // Construct the command line for the command.
  227. cmCustomCommandLine commandLine;
  228. std::string expand = command;
  229. commandLine.push_back(mf->ExpandVariablesInString(expand));
  230. for(int i=0; i < numArgs; ++i)
  231. {
  232. expand = args[i];
  233. commandLine.push_back(mf->ExpandVariablesInString(expand));
  234. }
  235. cmCustomCommandLines commandLines;
  236. commandLines.push_back(commandLine);
  237. // Accumulate the list of dependencies.
  238. std::vector<std::string> depends2;
  239. for(int i = 0; i < numDepends; ++i)
  240. {
  241. expand = depends[i];
  242. depends2.push_back(mf->ExpandVariablesInString(expand));
  243. }
  244. // Accumulate the list of outputs.
  245. std::vector<std::string> outputs2;
  246. for(int i = 0; i < numOutputs; ++i)
  247. {
  248. expand = outputs[i];
  249. outputs2.push_back(mf->ExpandVariablesInString(expand));
  250. }
  251. // Pass the call to the makefile instance.
  252. const char* no_comment = 0;
  253. mf->AddCustomCommandOldStyle(target, outputs2, depends2, source,
  254. commandLines, no_comment);
  255. }
  256. void CCONV cmAddCustomCommandToOutput(void *arg, const char* output,
  257. const char* command,
  258. int numArgs, const char **args,
  259. const char* main_dependency,
  260. int numDepends, const char **depends)
  261. {
  262. // Get the makefile instance. Perform an extra variable expansion
  263. // now because the API caller expects it.
  264. cmMakefile* mf = static_cast<cmMakefile*>(arg);
  265. // Construct the command line for the command.
  266. cmCustomCommandLine commandLine;
  267. std::string expand = command;
  268. commandLine.push_back(mf->ExpandVariablesInString(expand));
  269. for(int i=0; i < numArgs; ++i)
  270. {
  271. expand = args[i];
  272. commandLine.push_back(mf->ExpandVariablesInString(expand));
  273. }
  274. cmCustomCommandLines commandLines;
  275. commandLines.push_back(commandLine);
  276. // Accumulate the list of dependencies.
  277. std::vector<std::string> depends2;
  278. for(int i = 0; i < numDepends; ++i)
  279. {
  280. expand = depends[i];
  281. depends2.push_back(mf->ExpandVariablesInString(expand));
  282. }
  283. // Pass the call to the makefile instance.
  284. const char* no_comment = 0;
  285. const char* no_working_dir = 0;
  286. mf->AddCustomCommandToOutput(output, depends2, main_dependency,
  287. commandLines, no_comment, no_working_dir);
  288. }
  289. void CCONV cmAddCustomCommandToTarget(void *arg, const char* target,
  290. const char* command,
  291. int numArgs, const char **args,
  292. int commandType)
  293. {
  294. // Get the makefile instance.
  295. cmMakefile* mf = static_cast<cmMakefile*>(arg);
  296. // Construct the command line for the command. Perform an extra
  297. // variable expansion now because the API caller expects it.
  298. cmCustomCommandLine commandLine;
  299. std::string expand = command;
  300. commandLine.push_back(mf->ExpandVariablesInString(expand));
  301. for(int i=0; i < numArgs; ++i)
  302. {
  303. expand = args[i];
  304. commandLine.push_back(mf->ExpandVariablesInString(expand));
  305. }
  306. cmCustomCommandLines commandLines;
  307. commandLines.push_back(commandLine);
  308. // Select the command type.
  309. cmTarget::CustomCommandType cctype = cmTarget::POST_BUILD;
  310. switch (commandType)
  311. {
  312. case CM_PRE_BUILD:
  313. cctype = cmTarget::PRE_BUILD;
  314. break;
  315. case CM_PRE_LINK:
  316. cctype = cmTarget::PRE_LINK;
  317. break;
  318. case CM_POST_BUILD:
  319. cctype = cmTarget::POST_BUILD;
  320. break;
  321. }
  322. // Pass the call to the makefile instance.
  323. std::vector<std::string> no_depends;
  324. const char* no_comment = 0;
  325. const char* no_working_dir = 0;
  326. mf->AddCustomCommandToTarget(target, no_depends, commandLines,
  327. cctype, no_comment, no_working_dir);
  328. }
  329. void CCONV cmAddLinkLibraryForTarget(void *arg, const char *tgt, const char*value,
  330. int libtype)
  331. {
  332. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  333. switch (libtype)
  334. {
  335. case CM_LIBRARY_GENERAL:
  336. mf->AddLinkLibraryForTarget(tgt,value, cmTarget::GENERAL);
  337. break;
  338. case CM_LIBRARY_DEBUG:
  339. mf->AddLinkLibraryForTarget(tgt,value, cmTarget::DEBUG);
  340. break;
  341. case CM_LIBRARY_OPTIMIZED:
  342. mf->AddLinkLibraryForTarget(tgt,value, cmTarget::OPTIMIZED);
  343. break;
  344. }
  345. }
  346. void CCONV cmAddLibrary(void *arg, const char *libname, int shared,
  347. int numSrcs, const char **srcs)
  348. {
  349. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  350. std::vector<std::string> srcs2;
  351. int i;
  352. for (i = 0; i < numSrcs; ++i)
  353. {
  354. srcs2.push_back(srcs[i]);
  355. }
  356. mf->AddLibrary(libname, (shared ? true : false), srcs2);
  357. }
  358. char CCONV *cmExpandVariablesInString(void *arg, const char *source,
  359. int escapeQuotes, int atOnly)
  360. {
  361. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  362. std::string barf = source;
  363. std::string result =
  364. mf->ExpandVariablesInString(barf,
  365. (escapeQuotes ? true : false),
  366. (atOnly ? true : false));
  367. char *res = static_cast<char *>(malloc(result.size() + 1));
  368. if (result.size())
  369. {
  370. strcpy(res,result.c_str());
  371. }
  372. res[result.size()] = '\0';
  373. return res;
  374. }
  375. int CCONV cmExecuteCommand(void *arg, const char *name,
  376. int numArgs, const char **args)
  377. {
  378. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  379. cmListFileFunction lff;
  380. lff.m_Name = name;
  381. for(int i = 0; i < numArgs; ++i)
  382. {
  383. // Assume all arguments are quoted.
  384. lff.m_Arguments.push_back(cmListFileArgument(args[i], true,
  385. "[CMake-Plugin]", 0));
  386. }
  387. return mf->ExecuteCommand(lff);
  388. }
  389. void CCONV cmExpandSourceListArguments(void *arg,
  390. int numArgs,
  391. const char **args,
  392. int *resArgc,
  393. char ***resArgv,
  394. unsigned int startArgumentIndex)
  395. {
  396. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  397. std::vector<std::string> result;
  398. std::vector<std::string> args2;
  399. int i;
  400. for (i = 0; i < numArgs; ++i)
  401. {
  402. args2.push_back(args[i]);
  403. }
  404. mf->ExpandSourceListArguments(args2, result, startArgumentIndex);
  405. int resargc = static_cast<int>(result.size());
  406. char **resargv = 0;
  407. if (resargc)
  408. {
  409. resargv = (char **)malloc(resargc*sizeof(char *));
  410. }
  411. for (i = 0; i < resargc; ++i)
  412. {
  413. resargv[i] = strdup(result[i].c_str());
  414. }
  415. *resArgc = resargc;
  416. *resArgv = resargv;
  417. }
  418. void CCONV cmFreeArguments(int argc, char **argv)
  419. {
  420. int i;
  421. for (i = 0; i < argc; ++i)
  422. {
  423. free(argv[i]);
  424. }
  425. if (argv)
  426. {
  427. free(argv);
  428. }
  429. }
  430. int CCONV cmGetTotalArgumentSize(int argc, char **argv)
  431. {
  432. int i;
  433. int result = 0;
  434. for (i = 0; i < argc; ++i)
  435. {
  436. if (argv[i])
  437. {
  438. result = result + static_cast<int>(strlen(argv[i]));
  439. }
  440. }
  441. return result;
  442. }
  443. void CCONV *cmGetSource(void *arg, const char *name)
  444. {
  445. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  446. return (void *)mf->GetSource(name);
  447. }
  448. void * CCONV cmAddSource(void *arg, void *arg2)
  449. {
  450. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  451. cmSourceFile *sf = static_cast<cmSourceFile *>(arg2);
  452. return (void *)mf->AddSource(*sf);
  453. }
  454. void * CCONV cmCreateSourceFile()
  455. {
  456. return (void *)(new cmSourceFile);
  457. }
  458. void CCONV cmDestroySourceFile(void *arg)
  459. {
  460. cmSourceFile *sf = static_cast<cmSourceFile *>(arg);
  461. delete sf;
  462. }
  463. const char * CCONV cmSourceFileGetSourceName(void *arg)
  464. {
  465. cmSourceFile *sf = static_cast<cmSourceFile *>(arg);
  466. return sf->GetSourceName().c_str();
  467. }
  468. const char * CCONV cmSourceFileGetFullPath(void *arg)
  469. {
  470. cmSourceFile *sf = static_cast<cmSourceFile *>(arg);
  471. return sf->GetFullPath().c_str();
  472. }
  473. const char * CCONV cmSourceFileGetProperty(void *arg,const char *prop)
  474. {
  475. cmSourceFile *sf = static_cast<cmSourceFile *>(arg);
  476. return sf->GetProperty(prop);
  477. }
  478. int CCONV cmSourceFileGetPropertyAsBool(void *arg,const char *prop)
  479. {
  480. cmSourceFile *sf = static_cast<cmSourceFile *>(arg);
  481. return (sf->GetPropertyAsBool(prop) ? 1: 0);
  482. }
  483. void CCONV cmSourceFileSetProperty(void *arg,const char *prop, const char *val)
  484. {
  485. cmSourceFile *sf = static_cast<cmSourceFile *>(arg);
  486. sf->SetProperty(prop,val);
  487. }
  488. void CCONV cmSourceFileAddDepend(void *arg, const char *depend)
  489. {
  490. cmSourceFile *sf = static_cast<cmSourceFile *>(arg);
  491. sf->GetDepends().push_back(depend);
  492. }
  493. void CCONV cmSourceFileSetName(void *arg, const char* name, const char* dir,
  494. int numSourceExtensions,
  495. const char **sourceExtensions,
  496. int numHeaderExtensions,
  497. const char **headerExtensions)
  498. {
  499. cmSourceFile *sf = static_cast<cmSourceFile *>(arg);
  500. std::vector<std::string> srcs;
  501. std::vector<std::string> hdrs;
  502. int i;
  503. for (i = 0; i < numSourceExtensions; ++i)
  504. {
  505. srcs.push_back(sourceExtensions[i]);
  506. }
  507. for (i = 0; i < numHeaderExtensions; ++i)
  508. {
  509. hdrs.push_back(headerExtensions[i]);
  510. }
  511. sf->SetName(name,dir, srcs, hdrs);
  512. }
  513. void CCONV cmSourceFileSetName2(void *arg, const char* name, const char* dir,
  514. const char *ext, int headerFileOnly)
  515. {
  516. cmSourceFile *sf = static_cast<cmSourceFile *>(arg);
  517. sf->SetName(name,dir,ext,(headerFileOnly ? true : false));
  518. }
  519. char * CCONV cmGetFilenameWithoutExtension(const char *name)
  520. {
  521. std::string sres = cmSystemTools::GetFilenameWithoutExtension(name);
  522. char *result = (char *)malloc(sres.size()+1);
  523. strcpy(result,sres.c_str());
  524. return result;
  525. }
  526. char * CCONV cmGetFilenamePath(const char *name)
  527. {
  528. std::string sres = cmSystemTools::GetFilenamePath(name);
  529. char *result = (char *)malloc(sres.size()+1);
  530. strcpy(result,sres.c_str());
  531. return result;
  532. }
  533. char * CCONV cmCapitalized(const char *name)
  534. {
  535. std::string sres = cmSystemTools::Capitalized(name);
  536. char *result = (char *)malloc(sres.size()+1);
  537. strcpy(result,sres.c_str());
  538. return result;
  539. }
  540. void CCONV cmCopyFileIfDifferent(const char *name1, const char *name2)
  541. {
  542. cmSystemTools::CopyFileIfDifferent(name1,name2);
  543. }
  544. void CCONV cmRemoveFile(const char *name)
  545. {
  546. cmSystemTools::RemoveFile(name);
  547. }
  548. void CCONV cmDisplayStatus(void *arg, const char* message)
  549. {
  550. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  551. mf->DisplayStatus(message, -1);
  552. }
  553. void CCONV cmFree(void *data)
  554. {
  555. free(data);
  556. }
  557. } // close the extern "C" scope
  558. cmCAPI cmStaticCAPI =
  559. {
  560. cmGetClientData,
  561. cmGetTotalArgumentSize,
  562. cmFreeArguments,
  563. cmSetClientData,
  564. cmSetError,
  565. cmAddCacheDefinition,
  566. cmAddCustomCommand,
  567. cmAddDefineFlag,
  568. cmAddDefinition,
  569. cmAddExecutable,
  570. cmAddLibrary,
  571. cmAddLinkDirectoryForTarget,
  572. cmAddLinkLibraryForTarget,
  573. cmAddUtilityCommand,
  574. cmCommandExists,
  575. cmExecuteCommand,
  576. cmExpandSourceListArguments,
  577. cmExpandVariablesInString,
  578. cmGetCacheMajorVersion,
  579. cmGetCacheMinorVersion,
  580. cmGetCurrentDirectory,
  581. cmGetCurrentOutputDirectory,
  582. cmGetDefinition,
  583. cmGetHomeDirectory,
  584. cmGetHomeOutputDirectory,
  585. cmGetMajorVersion,
  586. cmGetMinorVersion,
  587. cmGetProjectName,
  588. cmGetStartDirectory,
  589. cmGetStartOutputDirectory,
  590. cmIsOn,
  591. cmAddSource,
  592. cmCreateSourceFile,
  593. cmDestroySourceFile,
  594. cmGetSource,
  595. cmSourceFileAddDepend,
  596. cmSourceFileGetProperty,
  597. cmSourceFileGetPropertyAsBool,
  598. cmSourceFileGetSourceName,
  599. cmSourceFileGetFullPath,
  600. cmSourceFileSetName,
  601. cmSourceFileSetName2,
  602. cmSourceFileSetProperty,
  603. cmCapitalized,
  604. cmCopyFileIfDifferent,
  605. cmGetFilenameWithoutExtension,
  606. cmGetFilenamePath,
  607. cmRemoveFile,
  608. cmFree,
  609. cmAddCustomCommandToOutput,
  610. cmAddCustomCommandToTarget,
  611. cmDisplayStatus,
  612. };