cmCPluginAPI.cxx 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686
  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,
  183. const char **)
  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. // Pass the call to the makefile instance.
  208. mf->AddUtilityCommand(utilityName, (all ? true : false),
  209. 0, depends2, commandLines);
  210. }
  211. void CCONV cmAddCustomCommand(void *arg, const char* source,
  212. const char* command,
  213. int numArgs, const char **args,
  214. int numDepends, const char **depends,
  215. int numOutputs, const char **outputs,
  216. const char *target)
  217. {
  218. // Get the makefile instance. Perform an extra variable expansion
  219. // now because the API caller expects it.
  220. cmMakefile* mf = static_cast<cmMakefile*>(arg);
  221. // Construct the command line for the command.
  222. cmCustomCommandLine commandLine;
  223. std::string expand = command;
  224. commandLine.push_back(mf->ExpandVariablesInString(expand));
  225. for(int i=0; i < numArgs; ++i)
  226. {
  227. expand = args[i];
  228. commandLine.push_back(mf->ExpandVariablesInString(expand));
  229. }
  230. cmCustomCommandLines commandLines;
  231. commandLines.push_back(commandLine);
  232. // Accumulate the list of dependencies.
  233. std::vector<std::string> depends2;
  234. for(int i = 0; i < numDepends; ++i)
  235. {
  236. expand = depends[i];
  237. depends2.push_back(mf->ExpandVariablesInString(expand));
  238. }
  239. // Accumulate the list of outputs.
  240. std::vector<std::string> outputs2;
  241. for(int i = 0; i < numOutputs; ++i)
  242. {
  243. expand = outputs[i];
  244. outputs2.push_back(mf->ExpandVariablesInString(expand));
  245. }
  246. // Pass the call to the makefile instance.
  247. const char* no_comment = 0;
  248. mf->AddCustomCommandOldStyle(target, outputs2, depends2, source,
  249. commandLines, no_comment);
  250. }
  251. void CCONV cmAddCustomCommandToOutput(void *arg, const char* output,
  252. const char* command,
  253. int numArgs, const char **args,
  254. const char* main_dependency,
  255. int numDepends, const char **depends)
  256. {
  257. // Get the makefile instance. Perform an extra variable expansion
  258. // now because the API caller expects it.
  259. cmMakefile* mf = static_cast<cmMakefile*>(arg);
  260. // Construct the command line for the command.
  261. cmCustomCommandLine commandLine;
  262. std::string expand = command;
  263. commandLine.push_back(mf->ExpandVariablesInString(expand));
  264. for(int i=0; i < numArgs; ++i)
  265. {
  266. expand = args[i];
  267. commandLine.push_back(mf->ExpandVariablesInString(expand));
  268. }
  269. cmCustomCommandLines commandLines;
  270. commandLines.push_back(commandLine);
  271. // Accumulate the list of dependencies.
  272. std::vector<std::string> depends2;
  273. for(int i = 0; i < numDepends; ++i)
  274. {
  275. expand = depends[i];
  276. depends2.push_back(mf->ExpandVariablesInString(expand));
  277. }
  278. // Pass the call to the makefile instance.
  279. const char* no_comment = 0;
  280. const char* no_working_dir = 0;
  281. mf->AddCustomCommandToOutput(output, depends2, main_dependency,
  282. commandLines, no_comment, no_working_dir);
  283. }
  284. void CCONV cmAddCustomCommandToTarget(void *arg, const char* target,
  285. const char* command,
  286. int numArgs, const char **args,
  287. int commandType)
  288. {
  289. // Get the makefile instance.
  290. cmMakefile* mf = static_cast<cmMakefile*>(arg);
  291. // Construct the command line for the command. Perform an extra
  292. // variable expansion now because the API caller expects it.
  293. cmCustomCommandLine commandLine;
  294. std::string expand = command;
  295. commandLine.push_back(mf->ExpandVariablesInString(expand));
  296. for(int i=0; i < numArgs; ++i)
  297. {
  298. expand = args[i];
  299. commandLine.push_back(mf->ExpandVariablesInString(expand));
  300. }
  301. cmCustomCommandLines commandLines;
  302. commandLines.push_back(commandLine);
  303. // Select the command type.
  304. cmTarget::CustomCommandType cctype = cmTarget::POST_BUILD;
  305. switch (commandType)
  306. {
  307. case CM_PRE_BUILD:
  308. cctype = cmTarget::PRE_BUILD;
  309. break;
  310. case CM_PRE_LINK:
  311. cctype = cmTarget::PRE_LINK;
  312. break;
  313. case CM_POST_BUILD:
  314. cctype = cmTarget::POST_BUILD;
  315. break;
  316. }
  317. // Pass the call to the makefile instance.
  318. std::vector<std::string> no_depends;
  319. const char* no_comment = 0;
  320. const char* no_working_dir = 0;
  321. mf->AddCustomCommandToTarget(target, no_depends, commandLines,
  322. cctype, no_comment, no_working_dir);
  323. }
  324. void CCONV cmAddLinkLibraryForTarget(void *arg, const char *tgt,
  325. const char*value, int libtype)
  326. {
  327. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  328. switch (libtype)
  329. {
  330. case CM_LIBRARY_GENERAL:
  331. mf->AddLinkLibraryForTarget(tgt,value, cmTarget::GENERAL);
  332. break;
  333. case CM_LIBRARY_DEBUG:
  334. mf->AddLinkLibraryForTarget(tgt,value, cmTarget::DEBUG);
  335. break;
  336. case CM_LIBRARY_OPTIMIZED:
  337. mf->AddLinkLibraryForTarget(tgt,value, cmTarget::OPTIMIZED);
  338. break;
  339. }
  340. }
  341. void CCONV cmAddLibrary(void *arg, const char *libname, int shared,
  342. int numSrcs, const char **srcs)
  343. {
  344. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  345. std::vector<std::string> srcs2;
  346. int i;
  347. for (i = 0; i < numSrcs; ++i)
  348. {
  349. srcs2.push_back(srcs[i]);
  350. }
  351. mf->AddLibrary(libname, (shared ? true : false), srcs2);
  352. }
  353. char CCONV *cmExpandVariablesInString(void *arg, const char *source,
  354. int escapeQuotes, int atOnly)
  355. {
  356. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  357. std::string barf = source;
  358. std::string result =
  359. mf->ExpandVariablesInString(barf,
  360. (escapeQuotes ? true : false),
  361. (atOnly ? true : false));
  362. char *res = static_cast<char *>(malloc(result.size() + 1));
  363. if (result.size())
  364. {
  365. strcpy(res,result.c_str());
  366. }
  367. res[result.size()] = '\0';
  368. return res;
  369. }
  370. int CCONV cmExecuteCommand(void *arg, const char *name,
  371. int numArgs, const char **args)
  372. {
  373. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  374. cmListFileFunction lff;
  375. lff.Name = name;
  376. for(int i = 0; i < numArgs; ++i)
  377. {
  378. // Assume all arguments are quoted.
  379. lff.Arguments.push_back(cmListFileArgument(args[i], true,
  380. "[CMake-Plugin]", 0));
  381. }
  382. return mf->ExecuteCommand(lff);
  383. }
  384. void CCONV cmExpandSourceListArguments(void *arg,
  385. int numArgs,
  386. const char **args,
  387. int *resArgc,
  388. char ***resArgv,
  389. unsigned int startArgumentIndex)
  390. {
  391. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  392. std::vector<std::string> result;
  393. std::vector<std::string> args2;
  394. int i;
  395. for (i = 0; i < numArgs; ++i)
  396. {
  397. args2.push_back(args[i]);
  398. }
  399. mf->ExpandSourceListArguments(args2, result, startArgumentIndex);
  400. int resargc = static_cast<int>(result.size());
  401. char **resargv = 0;
  402. if (resargc)
  403. {
  404. resargv = (char **)malloc(resargc*sizeof(char *));
  405. }
  406. for (i = 0; i < resargc; ++i)
  407. {
  408. resargv[i] = strdup(result[i].c_str());
  409. }
  410. *resArgc = resargc;
  411. *resArgv = resargv;
  412. }
  413. void CCONV cmFreeArguments(int argc, char **argv)
  414. {
  415. int i;
  416. for (i = 0; i < argc; ++i)
  417. {
  418. free(argv[i]);
  419. }
  420. if (argv)
  421. {
  422. free(argv);
  423. }
  424. }
  425. int CCONV cmGetTotalArgumentSize(int argc, char **argv)
  426. {
  427. int i;
  428. int result = 0;
  429. for (i = 0; i < argc; ++i)
  430. {
  431. if (argv[i])
  432. {
  433. result = result + static_cast<int>(strlen(argv[i]));
  434. }
  435. }
  436. return result;
  437. }
  438. void CCONV *cmGetSource(void *arg, const char *name)
  439. {
  440. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  441. return (void *)mf->GetSource(name);
  442. }
  443. void * CCONV cmAddSource(void *arg, void *arg2)
  444. {
  445. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  446. cmSourceFile *sf = static_cast<cmSourceFile *>(arg2);
  447. return (void *)mf->AddSource(*sf);
  448. }
  449. void * CCONV cmCreateSourceFile()
  450. {
  451. return (void *)(new cmSourceFile);
  452. }
  453. void CCONV cmDestroySourceFile(void *arg)
  454. {
  455. cmSourceFile *sf = static_cast<cmSourceFile *>(arg);
  456. delete sf;
  457. }
  458. const char * CCONV cmSourceFileGetSourceName(void *arg)
  459. {
  460. cmSourceFile *sf = static_cast<cmSourceFile *>(arg);
  461. return sf->GetSourceName().c_str();
  462. }
  463. const char * CCONV cmSourceFileGetFullPath(void *arg)
  464. {
  465. cmSourceFile *sf = static_cast<cmSourceFile *>(arg);
  466. return sf->GetFullPath().c_str();
  467. }
  468. const char * CCONV cmSourceFileGetProperty(void *arg,const char *prop)
  469. {
  470. cmSourceFile *sf = static_cast<cmSourceFile *>(arg);
  471. return sf->GetProperty(prop);
  472. }
  473. int CCONV cmSourceFileGetPropertyAsBool(void *arg,const char *prop)
  474. {
  475. cmSourceFile *sf = static_cast<cmSourceFile *>(arg);
  476. return (sf->GetPropertyAsBool(prop) ? 1: 0);
  477. }
  478. void CCONV cmSourceFileSetProperty(void *arg,const char *prop,
  479. const char *val)
  480. {
  481. cmSourceFile *sf = static_cast<cmSourceFile *>(arg);
  482. sf->SetProperty(prop,val);
  483. }
  484. void CCONV cmSourceFileAddDepend(void *arg, const char *depend)
  485. {
  486. cmSourceFile *sf = static_cast<cmSourceFile *>(arg);
  487. sf->GetDepends().push_back(depend);
  488. }
  489. void CCONV cmSourceFileSetName(void *arg, const char* name, const char* dir,
  490. int numSourceExtensions,
  491. const char **sourceExtensions,
  492. int numHeaderExtensions,
  493. const char **headerExtensions)
  494. {
  495. cmSourceFile *sf = static_cast<cmSourceFile *>(arg);
  496. std::vector<std::string> srcs;
  497. std::vector<std::string> hdrs;
  498. int i;
  499. for (i = 0; i < numSourceExtensions; ++i)
  500. {
  501. srcs.push_back(sourceExtensions[i]);
  502. }
  503. for (i = 0; i < numHeaderExtensions; ++i)
  504. {
  505. hdrs.push_back(headerExtensions[i]);
  506. }
  507. sf->SetName(name,dir, srcs, hdrs);
  508. }
  509. void CCONV cmSourceFileSetName2(void *arg, const char* name, const char* dir,
  510. const char *ext, int headerFileOnly)
  511. {
  512. cmSourceFile *sf = static_cast<cmSourceFile *>(arg);
  513. sf->SetName(name,dir,ext,(headerFileOnly ? true : false));
  514. }
  515. char * CCONV cmGetFilenameWithoutExtension(const char *name)
  516. {
  517. std::string sres = cmSystemTools::GetFilenameWithoutExtension(name);
  518. char *result = (char *)malloc(sres.size()+1);
  519. strcpy(result,sres.c_str());
  520. return result;
  521. }
  522. char * CCONV cmGetFilenamePath(const char *name)
  523. {
  524. std::string sres = cmSystemTools::GetFilenamePath(name);
  525. char *result = (char *)malloc(sres.size()+1);
  526. strcpy(result,sres.c_str());
  527. return result;
  528. }
  529. char * CCONV cmCapitalized(const char *name)
  530. {
  531. std::string sres = cmSystemTools::Capitalized(name);
  532. char *result = (char *)malloc(sres.size()+1);
  533. strcpy(result,sres.c_str());
  534. return result;
  535. }
  536. void CCONV cmCopyFileIfDifferent(const char *name1, const char *name2)
  537. {
  538. cmSystemTools::CopyFileIfDifferent(name1,name2);
  539. }
  540. void CCONV cmRemoveFile(const char *name)
  541. {
  542. cmSystemTools::RemoveFile(name);
  543. }
  544. void CCONV cmDisplayStatus(void *arg, const char* message)
  545. {
  546. cmMakefile *mf = static_cast<cmMakefile *>(arg);
  547. mf->DisplayStatus(message, -1);
  548. }
  549. void CCONV cmFree(void *data)
  550. {
  551. free(data);
  552. }
  553. } // close the extern "C" scope
  554. cmCAPI cmStaticCAPI =
  555. {
  556. cmGetClientData,
  557. cmGetTotalArgumentSize,
  558. cmFreeArguments,
  559. cmSetClientData,
  560. cmSetError,
  561. cmAddCacheDefinition,
  562. cmAddCustomCommand,
  563. cmAddDefineFlag,
  564. cmAddDefinition,
  565. cmAddExecutable,
  566. cmAddLibrary,
  567. cmAddLinkDirectoryForTarget,
  568. cmAddLinkLibraryForTarget,
  569. cmAddUtilityCommand,
  570. cmCommandExists,
  571. cmExecuteCommand,
  572. cmExpandSourceListArguments,
  573. cmExpandVariablesInString,
  574. cmGetCacheMajorVersion,
  575. cmGetCacheMinorVersion,
  576. cmGetCurrentDirectory,
  577. cmGetCurrentOutputDirectory,
  578. cmGetDefinition,
  579. cmGetHomeDirectory,
  580. cmGetHomeOutputDirectory,
  581. cmGetMajorVersion,
  582. cmGetMinorVersion,
  583. cmGetProjectName,
  584. cmGetStartDirectory,
  585. cmGetStartOutputDirectory,
  586. cmIsOn,
  587. cmAddSource,
  588. cmCreateSourceFile,
  589. cmDestroySourceFile,
  590. cmGetSource,
  591. cmSourceFileAddDepend,
  592. cmSourceFileGetProperty,
  593. cmSourceFileGetPropertyAsBool,
  594. cmSourceFileGetSourceName,
  595. cmSourceFileGetFullPath,
  596. cmSourceFileSetName,
  597. cmSourceFileSetName2,
  598. cmSourceFileSetProperty,
  599. cmCapitalized,
  600. cmCopyFileIfDifferent,
  601. cmGetFilenameWithoutExtension,
  602. cmGetFilenamePath,
  603. cmRemoveFile,
  604. cmFree,
  605. cmAddCustomCommandToOutput,
  606. cmAddCustomCommandToTarget,
  607. cmDisplayStatus,
  608. };