1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
8 This software is distributed WITHOUT ANY WARRANTY; without even the
9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License for more information.
11 ============================================================================*/
13 this file contains the implementation of the C API to CMake. Generally
14 these routines just manipulate arguments and then call the associated
15 methods on the CMake classes. */
17 #include "cmMakefile.h"
18 #include "cmCPluginAPI.h"
19 #include "cmVersion.h"
21 #include "cmSourceFile.h"
26 # include <malloc.h> /* for malloc/free on QNX */
32 void CCONV *cmGetClientData(void *info)
34 return ((cmLoadedCommandInfo *)info)->ClientData;
37 void CCONV cmSetClientData(void *info, void *cd)
39 ((cmLoadedCommandInfo *)info)->ClientData = cd;
42 void CCONV cmSetError(void *info, const char *err)
44 if (((cmLoadedCommandInfo *)info)->Error)
46 free(((cmLoadedCommandInfo *)info)->Error);
48 ((cmLoadedCommandInfo *)info)->Error = strdup(err);
51 unsigned int CCONV cmGetCacheMajorVersion(void *arg)
53 cmMakefile *mf = static_cast<cmMakefile *>(arg);
54 return mf->GetCacheMajorVersion();
56 unsigned int CCONV cmGetCacheMinorVersion(void *arg)
58 cmMakefile *mf = static_cast<cmMakefile *>(arg);
59 return mf->GetCacheMinorVersion();
62 unsigned int CCONV cmGetMajorVersion(void *)
64 return cmVersion::GetMajorVersion();
67 unsigned int CCONV cmGetMinorVersion(void *)
69 return cmVersion::GetMinorVersion();
72 void CCONV cmAddDefinition(void *arg, const char* name, const char* value)
74 cmMakefile *mf = static_cast<cmMakefile *>(arg);
75 mf->AddDefinition(name,value);
78 /* Add a definition to this makefile and the global cmake cache. */
79 void CCONV cmAddCacheDefinition(void *arg, const char* name,
80 const char* value, const char* doc, int type)
82 cmMakefile *mf = static_cast<cmMakefile *>(arg);
87 mf->AddCacheDefinition(name,value,doc,
88 cmCacheManager::BOOL);
91 mf->AddCacheDefinition(name,value,doc,
92 cmCacheManager::PATH);
94 case CM_CACHE_FILEPATH:
95 mf->AddCacheDefinition(name,value,doc,
96 cmCacheManager::FILEPATH);
99 mf->AddCacheDefinition(name,value,doc,
100 cmCacheManager::STRING);
102 case CM_CACHE_INTERNAL:
103 mf->AddCacheDefinition(name,value,doc,
104 cmCacheManager::INTERNAL);
106 case CM_CACHE_STATIC:
107 mf->AddCacheDefinition(name,value,doc,
108 cmCacheManager::STATIC);
113 const char* CCONV cmGetProjectName(void *arg)
115 cmMakefile *mf = static_cast<cmMakefile *>(arg);
116 return mf->GetProjectName();
119 const char* CCONV cmGetHomeDirectory(void *arg)
121 cmMakefile *mf = static_cast<cmMakefile *>(arg);
122 return mf->GetHomeDirectory();
124 const char* CCONV cmGetHomeOutputDirectory(void *arg)
126 cmMakefile *mf = static_cast<cmMakefile *>(arg);
127 return mf->GetHomeOutputDirectory();
129 const char* CCONV cmGetStartDirectory(void *arg)
131 cmMakefile *mf = static_cast<cmMakefile *>(arg);
132 return mf->GetStartDirectory();
134 const char* CCONV cmGetStartOutputDirectory(void *arg)
136 cmMakefile *mf = static_cast<cmMakefile *>(arg);
137 return mf->GetStartOutputDirectory();
139 const char* CCONV cmGetCurrentDirectory(void *arg)
141 cmMakefile *mf = static_cast<cmMakefile *>(arg);
142 return mf->GetCurrentDirectory();
144 const char* CCONV cmGetCurrentOutputDirectory(void *arg)
146 cmMakefile *mf = static_cast<cmMakefile *>(arg);
147 return mf->GetCurrentOutputDirectory();
149 const char* CCONV cmGetDefinition(void *arg,const char*def)
151 cmMakefile *mf = static_cast<cmMakefile *>(arg);
152 return mf->GetDefinition(def);
155 int CCONV cmIsOn(void *arg, const char* name)
157 cmMakefile *mf = static_cast<cmMakefile *>(arg);
158 return static_cast<int>(mf->IsOn(name));
161 /** Check if a command exists. */
162 int CCONV cmCommandExists(void *arg, const char* name)
164 cmMakefile *mf = static_cast<cmMakefile *>(arg);
165 return static_cast<int>(mf->CommandExists(name));
168 void CCONV cmAddDefineFlag(void *arg, const char* definition)
170 cmMakefile *mf = static_cast<cmMakefile *>(arg);
171 mf->AddDefineFlag(definition);
174 void CCONV cmAddLinkDirectoryForTarget(void *arg, const char *tgt,
177 cmMakefile *mf = static_cast<cmMakefile *>(arg);
178 mf->AddLinkDirectoryForTarget(tgt,d);
182 void CCONV cmAddExecutable(void *arg, const char *exename,
183 int numSrcs, const char **srcs, int win32)
185 cmMakefile *mf = static_cast<cmMakefile *>(arg);
186 std::vector<std::string> srcs2;
188 for (i = 0; i < numSrcs; ++i)
190 srcs2.push_back(srcs[i]);
192 cmTarget* tg = mf->AddExecutable(exename, srcs2);
195 tg->SetProperty("WIN32_EXECUTABLE", "ON");
199 void CCONV cmAddUtilityCommand(void *arg, const char* utilityName,
201 const char* arguments,
204 const char **depends,
208 // Get the makefile instance. Perform an extra variable expansion
209 // now because the API caller expects it.
210 cmMakefile* mf = static_cast<cmMakefile*>(arg);
212 // Construct the command line for the command.
213 cmCustomCommandLine commandLine;
214 std::string expand = command;
215 commandLine.push_back(mf->ExpandVariablesInString(expand));
216 if(arguments && arguments[0])
218 // TODO: Parse arguments!
220 commandLine.push_back(mf->ExpandVariablesInString(expand));
222 cmCustomCommandLines commandLines;
223 commandLines.push_back(commandLine);
225 // Accumulate the list of dependencies.
226 std::vector<std::string> depends2;
227 for(int i = 0; i < numDepends; ++i)
230 depends2.push_back(mf->ExpandVariablesInString(expand));
233 // Pass the call to the makefile instance.
234 mf->AddUtilityCommand(utilityName, (all ? false : true),
235 0, depends2, commandLines);
237 void CCONV cmAddCustomCommand(void *arg, const char* source,
239 int numArgs, const char **args,
240 int numDepends, const char **depends,
241 int numOutputs, const char **outputs,
244 // Get the makefile instance. Perform an extra variable expansion
245 // now because the API caller expects it.
246 cmMakefile* mf = static_cast<cmMakefile*>(arg);
248 // Construct the command line for the command.
249 cmCustomCommandLine commandLine;
250 std::string expand = command;
251 commandLine.push_back(mf->ExpandVariablesInString(expand));
252 for(int i=0; i < numArgs; ++i)
255 commandLine.push_back(mf->ExpandVariablesInString(expand));
257 cmCustomCommandLines commandLines;
258 commandLines.push_back(commandLine);
260 // Accumulate the list of dependencies.
261 std::vector<std::string> depends2;
262 for(int i = 0; i < numDepends; ++i)
265 depends2.push_back(mf->ExpandVariablesInString(expand));
268 // Accumulate the list of outputs.
269 std::vector<std::string> outputs2;
270 for(int i = 0; i < numOutputs; ++i)
273 outputs2.push_back(mf->ExpandVariablesInString(expand));
276 // Pass the call to the makefile instance.
277 const char* no_comment = 0;
278 mf->AddCustomCommandOldStyle(target, outputs2, depends2, source,
279 commandLines, no_comment);
282 void CCONV cmAddCustomCommandToOutput(void *arg, const char* output,
284 int numArgs, const char **args,
285 const char* main_dependency,
286 int numDepends, const char **depends)
288 // Get the makefile instance. Perform an extra variable expansion
289 // now because the API caller expects it.
290 cmMakefile* mf = static_cast<cmMakefile*>(arg);
292 // Construct the command line for the command.
293 cmCustomCommandLine commandLine;
294 std::string expand = command;
295 commandLine.push_back(mf->ExpandVariablesInString(expand));
296 for(int i=0; i < numArgs; ++i)
299 commandLine.push_back(mf->ExpandVariablesInString(expand));
301 cmCustomCommandLines commandLines;
302 commandLines.push_back(commandLine);
304 // Accumulate the list of dependencies.
305 std::vector<std::string> depends2;
306 for(int i = 0; i < numDepends; ++i)
309 depends2.push_back(mf->ExpandVariablesInString(expand));
312 // Pass the call to the makefile instance.
313 const char* no_comment = 0;
314 const char* no_working_dir = 0;
315 mf->AddCustomCommandToOutput(output, depends2, main_dependency,
316 commandLines, no_comment, no_working_dir);
319 void CCONV cmAddCustomCommandToTarget(void *arg, const char* target,
321 int numArgs, const char **args,
324 // Get the makefile instance.
325 cmMakefile* mf = static_cast<cmMakefile*>(arg);
327 // Construct the command line for the command. Perform an extra
328 // variable expansion now because the API caller expects it.
329 cmCustomCommandLine commandLine;
330 std::string expand = command;
331 commandLine.push_back(mf->ExpandVariablesInString(expand));
332 for(int i=0; i < numArgs; ++i)
335 commandLine.push_back(mf->ExpandVariablesInString(expand));
337 cmCustomCommandLines commandLines;
338 commandLines.push_back(commandLine);
340 // Select the command type.
341 cmTarget::CustomCommandType cctype = cmTarget::POST_BUILD;
345 cctype = cmTarget::PRE_BUILD;
348 cctype = cmTarget::PRE_LINK;
351 cctype = cmTarget::POST_BUILD;
355 // Pass the call to the makefile instance.
356 std::vector<std::string> no_depends;
357 const char* no_comment = 0;
358 const char* no_working_dir = 0;
359 mf->AddCustomCommandToTarget(target, no_depends, commandLines,
360 cctype, no_comment, no_working_dir);
363 void CCONV cmAddLinkLibraryForTarget(void *arg, const char *tgt,
364 const char*value, int libtype)
366 cmMakefile *mf = static_cast<cmMakefile *>(arg);
370 case CM_LIBRARY_GENERAL:
371 mf->AddLinkLibraryForTarget(tgt,value, cmTarget::GENERAL);
373 case CM_LIBRARY_DEBUG:
374 mf->AddLinkLibraryForTarget(tgt,value, cmTarget::DEBUG);
376 case CM_LIBRARY_OPTIMIZED:
377 mf->AddLinkLibraryForTarget(tgt,value, cmTarget::OPTIMIZED);
382 void CCONV cmAddLibrary(void *arg, const char *libname, int shared,
383 int numSrcs, const char **srcs)
385 cmMakefile *mf = static_cast<cmMakefile *>(arg);
386 std::vector<std::string> srcs2;
388 for (i = 0; i < numSrcs; ++i)
390 srcs2.push_back(srcs[i]);
392 mf->AddLibrary(libname,
393 (shared? cmTarget::SHARED_LIBRARY : cmTarget::STATIC_LIBRARY),
397 char CCONV *cmExpandVariablesInString(void *arg, const char *source,
398 int escapeQuotes, int atOnly)
400 cmMakefile *mf = static_cast<cmMakefile *>(arg);
401 std::string barf = source;
403 mf->ExpandVariablesInString(barf,
404 (escapeQuotes ? true : false),
405 (atOnly ? true : false));
406 char *res = static_cast<char *>(malloc(result.size() + 1));
409 strcpy(res,result.c_str());
411 res[result.size()] = '\0';
416 int CCONV cmExecuteCommand(void *arg, const char *name,
417 int numArgs, const char **args)
419 cmMakefile *mf = static_cast<cmMakefile *>(arg);
420 cmListFileFunction lff;
422 for(int i = 0; i < numArgs; ++i)
424 // Assume all arguments are quoted.
425 lff.Arguments.push_back(
426 cmListFileArgument(args[i], cmListFileArgument::Quoted,
427 "[CMake-Plugin]", 0));
429 cmExecutionStatus status;
430 return mf->ExecuteCommand(lff,status);
433 void CCONV cmExpandSourceListArguments(void *arg,
438 unsigned int startArgumentIndex)
440 cmMakefile *mf = static_cast<cmMakefile *>(arg);
441 std::vector<std::string> result;
442 std::vector<std::string> args2;
444 for (i = 0; i < numArgs; ++i)
446 args2.push_back(args[i]);
448 mf->ExpandSourceListArguments(args2, result, startArgumentIndex);
449 int resargc = static_cast<int>(result.size());
453 resargv = (char **)malloc(resargc*sizeof(char *));
455 for (i = 0; i < resargc; ++i)
457 resargv[i] = strdup(result[i].c_str());
463 void CCONV cmFreeArguments(int argc, char **argv)
466 for (i = 0; i < argc; ++i)
476 int CCONV cmGetTotalArgumentSize(int argc, char **argv)
480 for (i = 0; i < argc; ++i)
484 result = result + static_cast<int>(strlen(argv[i]));
490 // Source file proxy object to support the old cmSourceFile/cmMakefile
491 // API for source files.
492 struct cmCPluginAPISourceFile
494 cmCPluginAPISourceFile(): RealSourceFile(0) {}
495 cmSourceFile* RealSourceFile;
496 std::string SourceName;
497 std::string SourceExtension;
498 std::string FullPath;
499 std::vector<std::string> Depends;
500 cmPropertyMap Properties;
503 // Keep a map from real cmSourceFile instances stored in a makefile to
504 // the CPluginAPI proxy source file.
505 class cmCPluginAPISourceFileMap:
506 public std::map<cmSourceFile*, cmCPluginAPISourceFile*>
509 typedef std::map<cmSourceFile*, cmCPluginAPISourceFile*> derived;
510 typedef derived::iterator iterator;
511 typedef derived::value_type value_type;
512 ~cmCPluginAPISourceFileMap()
514 for(iterator i=this->begin(); i != this->end(); ++i)
520 cmCPluginAPISourceFileMap cmCPluginAPISourceFiles;
522 void * CCONV cmCreateSourceFile(void)
524 return (void*)new cmCPluginAPISourceFile;
527 void * CCONV cmCreateNewSourceFile(void *arg)
529 cmMakefile *mf = static_cast<cmMakefile *>(arg);
530 cmCPluginAPISourceFile *sf = new cmCPluginAPISourceFile;
531 sf->Properties.SetCMakeInstance(mf->GetCMakeInstance());
535 void CCONV cmDestroySourceFile(void *arg)
537 cmCPluginAPISourceFile* sf = static_cast<cmCPluginAPISourceFile*>(arg);
538 // Only delete if it was created by cmCreateSourceFile or
539 // cmCreateNewSourceFile and is therefore not in the map.
540 if(!sf->RealSourceFile)
546 void CCONV *cmGetSource(void *arg, const char *name)
548 cmMakefile *mf = static_cast<cmMakefile *>(arg);
549 if(cmSourceFile* rsf = mf->GetSource(name))
551 // Lookup the proxy source file object for this source.
552 cmCPluginAPISourceFileMap::iterator i = cmCPluginAPISourceFiles.find(rsf);
553 if(i == cmCPluginAPISourceFiles.end())
555 // Create a proxy source file object for this source.
556 cmCPluginAPISourceFile* sf = new cmCPluginAPISourceFile;
557 sf->RealSourceFile = rsf;
558 sf->FullPath = rsf->GetFullPath();
560 cmSystemTools::GetFilenameWithoutLastExtension(sf->FullPath.c_str());
561 sf->SourceExtension =
562 cmSystemTools::GetFilenameLastExtension(sf->FullPath.c_str());
564 // Store the proxy in the map so it can be re-used and deleted later.
565 cmCPluginAPISourceFileMap::value_type entry(rsf, sf);
566 i = cmCPluginAPISourceFiles.insert(entry).first;
568 return (void *)i->second;
576 void * CCONV cmAddSource(void *arg, void *arg2)
578 cmMakefile *mf = static_cast<cmMakefile *>(arg);
579 cmCPluginAPISourceFile* osf = static_cast<cmCPluginAPISourceFile*>(arg2);
580 if(osf->FullPath.empty())
585 // Create the real cmSourceFile instance and copy over saved information.
586 cmSourceFile* rsf = mf->GetOrCreateSource(osf->FullPath.c_str());
587 rsf->GetProperties() = osf->Properties;
588 for(std::vector<std::string>::iterator i = osf->Depends.begin();
589 i != osf->Depends.end(); ++i)
591 rsf->AddDepend(i->c_str());
594 // Create the proxy for the real source file.
595 cmCPluginAPISourceFile* sf = new cmCPluginAPISourceFile;
596 sf->RealSourceFile = rsf;
597 sf->FullPath = osf->FullPath;
598 sf->SourceName = osf->SourceName;
599 sf->SourceExtension = osf->SourceExtension;
601 // Store the proxy in the map so it can be re-used and deleted later.
602 cmCPluginAPISourceFiles[rsf] = sf;
606 const char * CCONV cmSourceFileGetSourceName(void *arg)
608 cmCPluginAPISourceFile* sf = static_cast<cmCPluginAPISourceFile*>(arg);
609 return sf->SourceName.c_str();
612 const char * CCONV cmSourceFileGetFullPath(void *arg)
614 cmCPluginAPISourceFile* sf = static_cast<cmCPluginAPISourceFile*>(arg);
615 return sf->FullPath.c_str();
618 const char * CCONV cmSourceFileGetProperty(void *arg,const char *prop)
620 cmCPluginAPISourceFile* sf = static_cast<cmCPluginAPISourceFile*>(arg);
621 if(cmSourceFile* rsf = sf->RealSourceFile)
623 return rsf->GetProperty(prop);
627 if(!strcmp(prop,"LOCATION"))
629 return sf->FullPath.c_str();
632 // Ignore chain because old code will not expect it and it is a
633 // pain to implement here anyway.
634 return sf->Properties.GetPropertyValue(prop, cmProperty::SOURCE_FILE,
639 int CCONV cmSourceFileGetPropertyAsBool(void *arg,const char *prop)
641 cmCPluginAPISourceFile* sf = static_cast<cmCPluginAPISourceFile*>(arg);
642 if(cmSourceFile* rsf = sf->RealSourceFile)
644 return rsf->GetPropertyAsBool(prop) ? 1:0;
648 return cmSystemTools::IsOn(cmSourceFileGetProperty(arg, prop))? 1:0;
652 void CCONV cmSourceFileSetProperty(void *arg,const char *prop,
655 cmCPluginAPISourceFile* sf = static_cast<cmCPluginAPISourceFile*>(arg);
656 if(cmSourceFile* rsf = sf->RealSourceFile)
658 rsf->SetProperty(prop, value);
662 if(!value) { value = "NOTFOUND"; }
663 sf->Properties.SetProperty(prop, value, cmProperty::SOURCE_FILE);
667 void CCONV cmSourceFileAddDepend(void *arg, const char *depend)
669 cmCPluginAPISourceFile* sf = static_cast<cmCPluginAPISourceFile*>(arg);
670 if(cmSourceFile* rsf = sf->RealSourceFile)
672 rsf->AddDepend(depend);
676 sf->Depends.push_back(depend);
680 void CCONV cmSourceFileSetName(void *arg, const char* name, const char* dir,
681 int numSourceExtensions,
682 const char **sourceExtensions,
683 int numHeaderExtensions,
684 const char **headerExtensions)
686 cmCPluginAPISourceFile* sf = static_cast<cmCPluginAPISourceFile*>(arg);
687 if(sf->RealSourceFile)
689 // SetName is allowed only on temporary source files created by
690 // the command for building and passing to AddSource.
693 std::vector<std::string> sourceExts;
694 std::vector<std::string> headerExts;
696 for (i = 0; i < numSourceExtensions; ++i)
698 sourceExts.push_back(sourceExtensions[i]);
700 for (i = 0; i < numHeaderExtensions; ++i)
702 headerExts.push_back(headerExtensions[i]);
705 // Save the original name given.
706 sf->SourceName = name;
708 // Convert the name to a full path in case the given name is a
710 std::string pathname = cmSystemTools::CollapseFullPath(name, dir);
712 // First try and see whether the listed file can be found
713 // as is without extensions added on.
714 std::string hname = pathname;
715 if(cmSystemTools::FileExists(hname.c_str()))
717 sf->SourceName = cmSystemTools::GetFilenamePath(name);
718 if ( sf->SourceName.size() > 0 )
720 sf->SourceName += "/";
722 sf->SourceName += cmSystemTools::GetFilenameWithoutLastExtension(name);
723 std::string::size_type pos = hname.rfind('.');
724 if(pos != std::string::npos)
726 sf->SourceExtension = hname.substr(pos+1, hname.size()-pos);
727 if ( cmSystemTools::FileIsFullPath(name) )
729 std::string::size_type pos2 = hname.rfind('/');
730 if(pos2 != std::string::npos)
732 sf->SourceName = hname.substr(pos2+1, pos - pos2-1);
737 sf->FullPath = hname;
741 // Next, try the various source extensions
742 for( std::vector<std::string>::const_iterator ext = sourceExts.begin();
743 ext != sourceExts.end(); ++ext )
748 if(cmSystemTools::FileExists(hname.c_str()))
750 sf->SourceExtension = *ext;
751 sf->FullPath = hname;
756 // Finally, try the various header extensions
757 for( std::vector<std::string>::const_iterator ext = headerExts.begin();
758 ext != headerExts.end(); ++ext )
763 if(cmSystemTools::FileExists(hname.c_str()))
765 sf->SourceExtension = *ext;
766 sf->FullPath = hname;
772 e << "Cannot find source file \"" << pathname << "\"";
773 e << "\n\nTried extensions";
774 for( std::vector<std::string>::const_iterator ext = sourceExts.begin();
775 ext != sourceExts.end(); ++ext )
779 for( std::vector<std::string>::const_iterator ext = headerExts.begin();
780 ext != headerExts.end(); ++ext )
784 cmSystemTools::Error(e.str().c_str());
788 void CCONV cmSourceFileSetName2(void *arg, const char* name, const char* dir,
789 const char *ext, int headerFileOnly)
791 cmCPluginAPISourceFile* sf = static_cast<cmCPluginAPISourceFile*>(arg);
792 if(sf->RealSourceFile)
794 // SetName is allowed only on temporary source files created by
795 // the command for building and passing to AddSource.
799 // Implement the old SetName method code here.
802 sf->Properties.SetProperty("HEADER_FILE_ONLY", "1",
803 cmProperty::SOURCE_FILE);
805 sf->SourceName = name;
806 std::string fname = sf->SourceName;
807 if(ext && strlen(ext))
812 sf->FullPath = cmSystemTools::CollapseFullPath(fname.c_str(), dir);
813 cmSystemTools::ConvertToUnixSlashes(sf->FullPath);
814 sf->SourceExtension = ext;
817 char * CCONV cmGetFilenameWithoutExtension(const char *name)
819 std::string sres = cmSystemTools::GetFilenameWithoutExtension(name);
820 char *result = (char *)malloc(sres.size()+1);
821 strcpy(result,sres.c_str());
825 char * CCONV cmGetFilenamePath(const char *name)
827 std::string sres = cmSystemTools::GetFilenamePath(name);
828 char *result = (char *)malloc(sres.size()+1);
829 strcpy(result,sres.c_str());
833 char * CCONV cmCapitalized(const char *name)
835 std::string sres = cmSystemTools::Capitalized(name);
836 char *result = (char *)malloc(sres.size()+1);
837 strcpy(result,sres.c_str());
841 void CCONV cmCopyFileIfDifferent(const char *name1, const char *name2)
843 cmSystemTools::CopyFileIfDifferent(name1,name2);
846 void CCONV cmRemoveFile(const char *name)
848 cmSystemTools::RemoveFile(name);
851 void CCONV cmDisplayStatus(void *arg, const char* message)
853 cmMakefile *mf = static_cast<cmMakefile *>(arg);
854 mf->DisplayStatus(message, -1);
857 void CCONV cmFree(void *data)
862 void CCONV DefineSourceFileProperty (void *arg, const char *name,
863 const char *briefDocs,
864 const char *longDocs,
867 cmMakefile *mf = static_cast<cmMakefile *>(arg);
868 mf->GetCMakeInstance()->DefineProperty(name,cmProperty::SOURCE_FILE,
873 } // close the extern "C" scope
875 cmCAPI cmStaticCAPI =
878 cmGetTotalArgumentSize,
882 cmAddCacheDefinition,
888 cmAddLinkDirectoryForTarget,
889 cmAddLinkLibraryForTarget,
893 cmExpandSourceListArguments,
894 cmExpandVariablesInString,
895 cmGetCacheMajorVersion,
896 cmGetCacheMinorVersion,
897 cmGetCurrentDirectory,
898 cmGetCurrentOutputDirectory,
901 cmGetHomeOutputDirectory,
906 cmGetStartOutputDirectory,
913 cmSourceFileAddDepend,
914 cmSourceFileGetProperty,
915 cmSourceFileGetPropertyAsBool,
916 cmSourceFileGetSourceName,
917 cmSourceFileGetFullPath,
919 cmSourceFileSetName2,
920 cmSourceFileSetProperty,
923 cmCopyFileIfDifferent,
924 cmGetFilenameWithoutExtension,
929 cmAddCustomCommandToOutput,
930 cmAddCustomCommandToTarget,
932 cmCreateNewSourceFile,
933 DefineSourceFileProperty,