cmCPluginAPI.cxx 19 KB

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