cmTarget.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmTarget_h
  11. #define cmTarget_h
  12. #include "cmCustomCommand.h"
  13. #include "cmPropertyMap.h"
  14. #include "cmPolicies.h"
  15. #include <cmsys/auto_ptr.hxx>
  16. class cmake;
  17. class cmMakefile;
  18. class cmSourceFile;
  19. class cmGlobalGenerator;
  20. class cmComputeLinkInformation;
  21. class cmListFileBacktrace;
  22. struct cmTargetLinkInformationMap:
  23. public std::map<cmStdString, cmComputeLinkInformation*>
  24. {
  25. typedef std::map<cmStdString, cmComputeLinkInformation*> derived;
  26. cmTargetLinkInformationMap() {}
  27. cmTargetLinkInformationMap(cmTargetLinkInformationMap const& r);
  28. ~cmTargetLinkInformationMap();
  29. };
  30. class cmTargetInternals;
  31. class cmTargetInternalPointer
  32. {
  33. public:
  34. cmTargetInternalPointer();
  35. cmTargetInternalPointer(cmTargetInternalPointer const& r);
  36. ~cmTargetInternalPointer();
  37. cmTargetInternalPointer& operator=(cmTargetInternalPointer const& r);
  38. cmTargetInternals* operator->() const { return this->Pointer; }
  39. cmTargetInternals* Get() const { return this->Pointer; }
  40. private:
  41. cmTargetInternals* Pointer;
  42. };
  43. /** \class cmTarget
  44. * \brief Represent a library or executable target loaded from a makefile.
  45. *
  46. * cmTarget represents a target loaded from
  47. * a makefile.
  48. */
  49. class cmTarget
  50. {
  51. public:
  52. cmTarget();
  53. enum TargetType { EXECUTABLE, STATIC_LIBRARY,
  54. SHARED_LIBRARY, MODULE_LIBRARY,
  55. OBJECT_LIBRARY, UTILITY, GLOBAL_TARGET,
  56. UNKNOWN_LIBRARY};
  57. static const char* GetTargetTypeName(TargetType targetType);
  58. enum CustomCommandType { PRE_BUILD, PRE_LINK, POST_BUILD };
  59. /**
  60. * Return the type of target.
  61. */
  62. TargetType GetType() const
  63. {
  64. return this->TargetTypeValue;
  65. }
  66. /**
  67. * Set the target type
  68. */
  69. void SetType(TargetType f, const char* name);
  70. void MarkAsImported();
  71. ///! Set/Get the name of the target
  72. const char* GetName() const {return this->Name.c_str();}
  73. ///! Set the cmMakefile that owns this target
  74. void SetMakefile(cmMakefile *mf);
  75. cmMakefile *GetMakefile() const { return this->Makefile;};
  76. /** Get the status of policy CMP0003 when the target was created. */
  77. cmPolicies::PolicyStatus GetPolicyStatusCMP0003() const
  78. { return this->PolicyStatusCMP0003; }
  79. /** Get the status of policy CMP0004 when the target was created. */
  80. cmPolicies::PolicyStatus GetPolicyStatusCMP0004() const
  81. { return this->PolicyStatusCMP0004; }
  82. /** Get the status of policy CMP0008 when the target was created. */
  83. cmPolicies::PolicyStatus GetPolicyStatusCMP0008() const
  84. { return this->PolicyStatusCMP0008; }
  85. /**
  86. * Get the list of the custom commands for this target
  87. */
  88. std::vector<cmCustomCommand> &GetPreBuildCommands()
  89. {return this->PreBuildCommands;}
  90. std::vector<cmCustomCommand> &GetPreLinkCommands()
  91. {return this->PreLinkCommands;}
  92. std::vector<cmCustomCommand> &GetPostBuildCommands()
  93. {return this->PostBuildCommands;}
  94. ///! Return the list of frameworks being linked to this target
  95. std::vector<std::string> &GetFrameworks() {return this->Frameworks;}
  96. /**
  97. * Get the list of the source files used by this target
  98. */
  99. std::vector<cmSourceFile*> const& GetSourceFiles();
  100. void AddSourceFile(cmSourceFile* sf);
  101. std::vector<std::string> const& GetObjectLibraries() const
  102. {
  103. return this->ObjectLibraries;
  104. }
  105. /** Get sources that must be built before the given source. */
  106. std::vector<cmSourceFile*> const* GetSourceDepends(cmSourceFile* sf);
  107. /**
  108. * Flags for a given source file as used in this target. Typically assigned
  109. * via SET_TARGET_PROPERTIES when the property is a list of source files.
  110. */
  111. enum SourceFileType
  112. {
  113. SourceFileTypeNormal,
  114. SourceFileTypePrivateHeader, // is in "PRIVATE_HEADER" target property
  115. SourceFileTypePublicHeader, // is in "PUBLIC_HEADER" target property
  116. SourceFileTypeResource, // is in "RESOURCE" target property *or*
  117. // has MACOSX_PACKAGE_LOCATION=="Resources"
  118. SourceFileTypeMacContent // has MACOSX_PACKAGE_LOCATION!="Resources"
  119. };
  120. struct SourceFileFlags
  121. {
  122. SourceFileFlags(): Type(SourceFileTypeNormal), MacFolder(0) {}
  123. SourceFileFlags(SourceFileFlags const& r):
  124. Type(r.Type), MacFolder(r.MacFolder) {}
  125. SourceFileType Type;
  126. const char* MacFolder; // location inside Mac content folders
  127. };
  128. /**
  129. * Get the flags for a given source file as used in this target
  130. */
  131. struct SourceFileFlags GetTargetSourceFileFlags(const cmSourceFile* sf);
  132. /**
  133. * Add sources to the target.
  134. */
  135. void AddSources(std::vector<std::string> const& srcs);
  136. cmSourceFile* AddSource(const char* src);
  137. enum LinkLibraryType {GENERAL, DEBUG, OPTIMIZED};
  138. //* how we identify a library, by name and type
  139. typedef std::pair<cmStdString, LinkLibraryType> LibraryID;
  140. typedef std::vector<LibraryID > LinkLibraryVectorType;
  141. const LinkLibraryVectorType &GetLinkLibraries() const {
  142. return this->LinkLibraries;}
  143. const LinkLibraryVectorType &GetOriginalLinkLibraries() const
  144. {return this->OriginalLinkLibraries;}
  145. /** Compute the link type to use for the given configuration. */
  146. LinkLibraryType ComputeLinkType(const char* config);
  147. /**
  148. * Clear the dependency information recorded for this target, if any.
  149. */
  150. void ClearDependencyInformation(cmMakefile& mf, const char* target);
  151. // Check to see if a library is a framework and treat it different on Mac
  152. bool NameResolvesToFramework(const std::string& libname);
  153. bool AddFramework(const std::string& lib, LinkLibraryType llt);
  154. void AddLinkLibrary(cmMakefile& mf,
  155. const char *target, const char* lib,
  156. LinkLibraryType llt);
  157. void MergeLinkLibraries( cmMakefile& mf, const char* selfname,
  158. const LinkLibraryVectorType& libs );
  159. const std::vector<std::string>& GetLinkDirectories();
  160. void AddLinkDirectory(const char* d);
  161. /**
  162. * Set the path where this target should be installed. This is relative to
  163. * INSTALL_PREFIX
  164. */
  165. std::string GetInstallPath() {return this->InstallPath;}
  166. void SetInstallPath(const char *name) {this->InstallPath = name;}
  167. /**
  168. * Set the path where this target (if it has a runtime part) should be
  169. * installed. This is relative to INSTALL_PREFIX
  170. */
  171. std::string GetRuntimeInstallPath() {return this->RuntimeInstallPath;}
  172. void SetRuntimeInstallPath(const char *name) {
  173. this->RuntimeInstallPath = name; }
  174. /**
  175. * Get/Set whether there is an install rule for this target.
  176. */
  177. bool GetHaveInstallRule() { return this->HaveInstallRule; }
  178. void SetHaveInstallRule(bool h) { this->HaveInstallRule = h; }
  179. /** Add a utility on which this project depends. A utility is an executable
  180. * name as would be specified to the ADD_EXECUTABLE or UTILITY_SOURCE
  181. * commands. It is not a full path nor does it have an extension.
  182. */
  183. void AddUtility(const char* u) { this->Utilities.insert(u);}
  184. ///! Get the utilities used by this target
  185. std::set<cmStdString>const& GetUtilities() const { return this->Utilities; }
  186. /** Finalize the target at the end of the Configure step. */
  187. void FinishConfigure();
  188. ///! Set/Get a property of this target file
  189. void SetProperty(const char *prop, const char *value);
  190. void AppendProperty(const char* prop, const char* value,bool asString=false);
  191. const char *GetProperty(const char *prop);
  192. const char *GetProperty(const char *prop, cmProperty::ScopeType scope);
  193. bool GetPropertyAsBool(const char *prop);
  194. void CheckProperty(const char* prop, cmMakefile* context);
  195. const char* GetFeature(const char* feature, const char* config);
  196. bool IsImported() const {return this->IsImportedTarget;}
  197. /** The link interface specifies transitive library dependencies and
  198. other information needed by targets that link to this target. */
  199. struct LinkInterface
  200. {
  201. // Languages whose runtime libraries must be linked.
  202. std::vector<std::string> Languages;
  203. // Libraries listed in the interface.
  204. std::vector<std::string> Libraries;
  205. // Shared library dependencies needed for linking on some platforms.
  206. std::vector<std::string> SharedDeps;
  207. // Number of repetitions of a strongly connected component of two
  208. // or more static libraries.
  209. int Multiplicity;
  210. // Libraries listed for other configurations.
  211. // Needed only for OLD behavior of CMP0003.
  212. std::vector<std::string> WrongConfigLibraries;
  213. LinkInterface(): Multiplicity(0) {}
  214. };
  215. /** Get the link interface for the given configuration. Returns 0
  216. if the target cannot be linked. */
  217. LinkInterface const* GetLinkInterface(const char* config);
  218. /** The link implementation specifies the direct library
  219. dependencies needed by the object files of the target. */
  220. struct LinkImplementation
  221. {
  222. // Languages whose runtime libraries must be linked.
  223. std::vector<std::string> Languages;
  224. // Libraries linked directly in this configuration.
  225. std::vector<std::string> Libraries;
  226. // Libraries linked directly in other configurations.
  227. // Needed only for OLD behavior of CMP0003.
  228. std::vector<std::string> WrongConfigLibraries;
  229. };
  230. LinkImplementation const* GetLinkImplementation(const char* config);
  231. /** Link information from the transitive closure of the link
  232. implementation and the interfaces of its dependencies. */
  233. struct LinkClosure
  234. {
  235. // The preferred linker language.
  236. std::string LinkerLanguage;
  237. // Languages whose runtime libraries must be linked.
  238. std::vector<std::string> Languages;
  239. };
  240. LinkClosure const* GetLinkClosure(const char* config);
  241. /** Strip off leading and trailing whitespace from an item named in
  242. the link dependencies of this target. */
  243. std::string CheckCMP0004(std::string const& item);
  244. /** Get the directory in which this target will be built. If the
  245. configuration name is given then the generator will add its
  246. subdirectory for that configuration. Otherwise just the canonical
  247. output directory is given. */
  248. std::string GetDirectory(const char* config = 0, bool implib = false);
  249. /** Get the directory in which this targets .pdb files will be placed.
  250. If the configuration name is given then the generator will add its
  251. subdirectory for that configuration. Otherwise just the canonical
  252. pdb output directory is given. */
  253. std::string GetPDBDirectory(const char* config = 0);
  254. /** Get the location of the target in the build tree for the given
  255. configuration. This location is suitable for use as the LOCATION
  256. target property. */
  257. const char* GetLocation(const char* config);
  258. /** Get the target major and minor version numbers interpreted from
  259. the VERSION property. Version 0 is returned if the property is
  260. not set or cannot be parsed. */
  261. void GetTargetVersion(int& major, int& minor);
  262. /** Get the target major, minor, and patch version numbers
  263. interpreted from the VERSION or SOVERSION property. Version 0
  264. is returned if the property is not set or cannot be parsed. */
  265. void GetTargetVersion(bool soversion, int& major, int& minor, int& patch);
  266. /**
  267. * Trace through the source files in this target and add al source files
  268. * that they depend on, used by all generators
  269. */
  270. void TraceDependencies(const char* vsProjectFile);
  271. /**
  272. * Make sure the full path to all source files is known.
  273. */
  274. bool FindSourceFiles();
  275. ///! Return the preferred linker language for this target
  276. const char* GetLinkerLanguage(const char* config = 0);
  277. /** Get the full name of the target according to the settings in its
  278. makefile. */
  279. std::string GetFullName(const char* config=0, bool implib = false);
  280. void GetFullNameComponents(std::string& prefix,
  281. std::string& base, std::string& suffix,
  282. const char* config=0, bool implib = false);
  283. /** Get the name of the pdb file for the target. */
  284. std::string GetPDBName(const char* config=0);
  285. /** Whether this library has soname enabled and platform supports it. */
  286. bool HasSOName(const char* config);
  287. /** Get the soname of the target. Allowed only for a shared library. */
  288. std::string GetSOName(const char* config);
  289. /** Test for special case of a third-party shared library that has
  290. no soname at all. */
  291. bool IsImportedSharedLibWithoutSOName(const char* config);
  292. /** Get the full path to the target according to the settings in its
  293. makefile and the configuration type. */
  294. std::string GetFullPath(const char* config=0, bool implib = false,
  295. bool realname = false);
  296. /** Get the names of the library needed to generate a build rule
  297. that takes into account shared library version numbers. This
  298. should be called only on a library target. */
  299. void GetLibraryNames(std::string& name, std::string& soName,
  300. std::string& realName, std::string& impName,
  301. std::string& pdbName, const char* config);
  302. /** Get the names of the executable needed to generate a build rule
  303. that takes into account executable version numbers. This should
  304. be called only on an executable target. */
  305. void GetExecutableNames(std::string& name, std::string& realName,
  306. std::string& impName,
  307. std::string& pdbName, const char* config);
  308. /** Does this target have a GNU implib to convert to MS format? */
  309. bool HasImplibGNUtoMS();
  310. /** Convert the given GNU import library name (.dll.a) to a name with a new
  311. extension (.lib or ${CMAKE_IMPORT_LIBRARY_SUFFIX}). */
  312. bool GetImplibGNUtoMS(std::string const& gnuName, std::string& out,
  313. const char* newExt = 0);
  314. /** Add the target output files to the global generator manifest. */
  315. void GenerateTargetManifest(const char* config);
  316. /**
  317. * Compute whether this target must be relinked before installing.
  318. */
  319. bool NeedRelinkBeforeInstall(const char* config);
  320. bool HaveBuildTreeRPATH();
  321. bool HaveInstallTreeRPATH();
  322. /** Return true if builtin chrpath will work for this target */
  323. bool IsChrpathUsed(const char* config);
  324. std::string GetInstallNameDirForBuildTree(const char* config,
  325. bool for_xcode = false);
  326. std::string GetInstallNameDirForInstallTree(const char* config,
  327. bool for_xcode = false);
  328. cmComputeLinkInformation* GetLinkInformation(const char* config);
  329. // Get the properties
  330. cmPropertyMap &GetProperties() { return this->Properties; };
  331. // Define the properties
  332. static void DefineProperties(cmake *cm);
  333. /** Get the macro to define when building sources in this target.
  334. If no macro should be defined null is returned. */
  335. const char* GetExportMacro();
  336. // Compute the set of languages compiled by the target. This is
  337. // computed every time it is called because the languages can change
  338. // when source file properties are changed and we do not have enough
  339. // information to forward these property changes to the targets
  340. // until we have per-target object file properties.
  341. void GetLanguages(std::set<cmStdString>& languages) const;
  342. /** Return whether this target is an executable with symbol exports
  343. enabled. */
  344. bool IsExecutableWithExports();
  345. /** Return whether this target may be used to link another target. */
  346. bool IsLinkable();
  347. /** Return whether or not the target is for a DLL platform. */
  348. bool IsDLLPlatform() { return this->DLLPlatform; }
  349. /** Return whether or not the target has a DLL import library. */
  350. bool HasImportLibrary();
  351. /** Return whether this target is a shared library Framework on
  352. Apple. */
  353. bool IsFrameworkOnApple();
  354. /** Return whether this target is a CFBundle (plugin) on Apple. */
  355. bool IsCFBundleOnApple();
  356. /** Return whether this target is an executable Bundle on Apple. */
  357. bool IsAppBundleOnApple();
  358. /** Return the framework version string. Undefined if
  359. IsFrameworkOnApple returns false. */
  360. std::string GetFrameworkVersion();
  361. /** Get a backtrace from the creation of the target. */
  362. cmListFileBacktrace const& GetBacktrace() const;
  363. /** Get a build-tree directory in which to place target support files. */
  364. std::string GetSupportDirectory() const;
  365. /** Return whether this target uses the default value for its output
  366. directory. */
  367. bool UsesDefaultOutputDir(const char* config, bool implib);
  368. /** Append to @a base the mac content directory and return it. */
  369. std::string BuildMacContentDirectory(const std::string& base,
  370. const char* config = 0,
  371. bool includeMacOS = true);
  372. /** @return the mac content directory for this target. */
  373. std::string GetMacContentDirectory(const char* config = 0,
  374. bool implib = false,
  375. bool includeMacOS = true);
  376. /** @return whether this target have a well defined output file name. */
  377. bool HaveWellDefinedOutputFiles();
  378. /** @return the Mac framework directory without the base. */
  379. std::string GetFrameworkDirectory(const char* config = 0);
  380. private:
  381. /**
  382. * A list of direct dependencies. Use in conjunction with DependencyMap.
  383. */
  384. typedef std::vector< LibraryID > DependencyList;
  385. /**
  386. * This map holds the dependency graph. map[x] returns a set of
  387. * direct dependencies of x. Note that the direct depenencies are
  388. * ordered. This is necessary to handle direct dependencies that
  389. * themselves have no dependency information.
  390. */
  391. typedef std::map< LibraryID, DependencyList > DependencyMap;
  392. /**
  393. * Inserts \a dep at the end of the dependency list of \a lib.
  394. */
  395. void InsertDependency( DependencyMap& depMap,
  396. const LibraryID& lib,
  397. const LibraryID& dep);
  398. /*
  399. * Deletes \a dep from the dependency list of \a lib.
  400. */
  401. void DeleteDependency( DependencyMap& depMap,
  402. const LibraryID& lib,
  403. const LibraryID& dep);
  404. /**
  405. * Emits the library \a lib and all its dependencies into link_line.
  406. * \a emitted keeps track of the libraries that have been emitted to
  407. * avoid duplicates--it is more efficient than searching
  408. * link_line. \a visited is used detect cycles. Note that \a
  409. * link_line is in reverse order, in that the dependencies of a
  410. * library are listed before the library itself.
  411. */
  412. void Emit( const LibraryID lib,
  413. const DependencyMap& dep_map,
  414. std::set<LibraryID>& emitted,
  415. std::set<LibraryID>& visited,
  416. DependencyList& link_line);
  417. /**
  418. * Finds the dependencies for \a lib and inserts them into \a
  419. * dep_map.
  420. */
  421. void GatherDependencies( const cmMakefile& mf,
  422. const LibraryID& lib,
  423. DependencyMap& dep_map);
  424. void AnalyzeLibDependencies( const cmMakefile& mf );
  425. const char* GetSuffixVariableInternal(bool implib);
  426. const char* GetPrefixVariableInternal(bool implib);
  427. std::string GetFullNameInternal(const char* config, bool implib);
  428. void GetFullNameInternal(const char* config, bool implib,
  429. std::string& outPrefix, std::string& outBase,
  430. std::string& outSuffix);
  431. // Use a makefile variable to set a default for the given property.
  432. // If the variable is not defined use the given default instead.
  433. void SetPropertyDefault(const char* property, const char* default_value);
  434. // Returns ARCHIVE, LIBRARY, or RUNTIME based on platform and type.
  435. const char* GetOutputTargetType(bool implib);
  436. // Get the target base name.
  437. std::string GetOutputName(const char* config, bool implib);
  438. const char* ImportedGetLocation(const char* config);
  439. const char* NormalGetLocation(const char* config);
  440. std::string GetFullNameImported(const char* config, bool implib);
  441. std::string ImportedGetFullPath(const char* config, bool implib);
  442. std::string NormalGetFullPath(const char* config, bool implib,
  443. bool realname);
  444. /** Get the real name of the target. Allowed only for non-imported
  445. targets. When a library or executable file is versioned this is
  446. the full versioned name. If the target is not versioned this is
  447. the same as GetFullName. */
  448. std::string NormalGetRealName(const char* config);
  449. private:
  450. std::string Name;
  451. std::vector<cmCustomCommand> PreBuildCommands;
  452. std::vector<cmCustomCommand> PreLinkCommands;
  453. std::vector<cmCustomCommand> PostBuildCommands;
  454. TargetType TargetTypeValue;
  455. std::vector<cmSourceFile*> SourceFiles;
  456. std::vector<std::string> ObjectLibraries;
  457. LinkLibraryVectorType LinkLibraries;
  458. LinkLibraryVectorType PrevLinkedLibraries;
  459. bool LinkLibrariesAnalyzed;
  460. std::vector<std::string> Frameworks;
  461. std::vector<std::string> LinkDirectories;
  462. std::set<cmStdString> LinkDirectoriesEmmitted;
  463. bool HaveInstallRule;
  464. std::string InstallPath;
  465. std::string RuntimeInstallPath;
  466. std::string Location;
  467. std::string ExportMacro;
  468. std::set<cmStdString> Utilities;
  469. bool RecordDependencies;
  470. cmPropertyMap Properties;
  471. LinkLibraryVectorType OriginalLinkLibraries;
  472. bool DLLPlatform;
  473. bool IsApple;
  474. bool IsImportedTarget;
  475. // Cache target output paths for each configuration.
  476. struct OutputInfo;
  477. OutputInfo const* GetOutputInfo(const char* config);
  478. bool ComputeOutputDir(const char* config, bool implib, std::string& out);
  479. bool ComputePDBOutputDir(const char* config, std::string& out);
  480. // Cache import information from properties for each configuration.
  481. struct ImportInfo;
  482. ImportInfo const* GetImportInfo(const char* config);
  483. void ComputeImportInfo(std::string const& desired_config, ImportInfo& info);
  484. cmTargetLinkInformationMap LinkInformation;
  485. bool ComputeLinkInterface(const char* config, LinkInterface& iface);
  486. void ComputeLinkImplementation(const char* config,
  487. LinkImplementation& impl);
  488. void ComputeLinkClosure(const char* config, LinkClosure& lc);
  489. void ClearLinkMaps();
  490. void MaybeInvalidatePropertyCache(const char* prop);
  491. void ProcessSourceExpression(std::string const& expr);
  492. // The cmMakefile instance that owns this target. This should
  493. // always be set.
  494. cmMakefile* Makefile;
  495. // Policy status recorded when target was created.
  496. cmPolicies::PolicyStatus PolicyStatusCMP0003;
  497. cmPolicies::PolicyStatus PolicyStatusCMP0004;
  498. cmPolicies::PolicyStatus PolicyStatusCMP0008;
  499. // Internal representation details.
  500. friend class cmTargetInternals;
  501. cmTargetInternalPointer Internal;
  502. void ConstructSourceFileFlags();
  503. void ComputeVersionedName(std::string& vName,
  504. std::string const& prefix,
  505. std::string const& base,
  506. std::string const& suffix,
  507. std::string const& name,
  508. const char* version);
  509. };
  510. typedef std::map<cmStdString,cmTarget> cmTargets;
  511. class cmTargetSet: public std::set<cmStdString> {};
  512. class cmTargetManifest: public std::map<cmStdString, cmTargetSet> {};
  513. #endif