cmGeneratorTarget.h 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2012 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 cmGeneratorTarget_h
  11. #define cmGeneratorTarget_h
  12. #include "cmLinkItem.h"
  13. class cmCustomCommand;
  14. class cmGlobalGenerator;
  15. class cmLocalGenerator;
  16. class cmMakefile;
  17. class cmSourceFile;
  18. class cmTarget;
  19. class cmComputeLinkInformation;
  20. class cmGeneratorTarget
  21. {
  22. public:
  23. cmGeneratorTarget(cmTarget*, cmLocalGenerator* lg);
  24. ~cmGeneratorTarget();
  25. cmLocalGenerator* GetLocalGenerator() const;
  26. bool IsImported() const;
  27. const char *GetLocation(const std::string& config) const;
  28. /** Get the location of the target in the build tree with a placeholder
  29. referencing the configuration in the native build system. This
  30. location is suitable for use as the LOCATION target property. */
  31. const char* GetLocationForBuild() const;
  32. cmComputeLinkInformation*
  33. GetLinkInformation(const std::string& config) const;
  34. cmState::TargetType GetType() const;
  35. std::string GetName() const;
  36. const char *GetProperty(const std::string& prop) const;
  37. bool GetPropertyAsBool(const std::string& prop) const;
  38. void GetSourceFiles(std::vector<cmSourceFile*>& files,
  39. const std::string& config) const;
  40. void GetObjectSources(std::vector<cmSourceFile const*> &,
  41. const std::string& config) const;
  42. const std::string& GetObjectName(cmSourceFile const* file);
  43. bool HasExplicitObjectName(cmSourceFile const* file) const;
  44. void AddExplicitObjectName(cmSourceFile const* sf);
  45. void GetResxSources(std::vector<cmSourceFile const*>&,
  46. const std::string& config) const;
  47. void GetIDLSources(std::vector<cmSourceFile const*>&,
  48. const std::string& config) const;
  49. void GetExternalObjects(std::vector<cmSourceFile const*>&,
  50. const std::string& config) const;
  51. void GetHeaderSources(std::vector<cmSourceFile const*>&,
  52. const std::string& config) const;
  53. void GetExtraSources(std::vector<cmSourceFile const*>&,
  54. const std::string& config) const;
  55. void GetCustomCommands(std::vector<cmSourceFile const*>&,
  56. const std::string& config) const;
  57. void GetExpectedResxHeaders(std::set<std::string>&,
  58. const std::string& config) const;
  59. void GetAppManifest(std::vector<cmSourceFile const*>&,
  60. const std::string& config) const;
  61. void GetManifests(std::vector<cmSourceFile const*>&,
  62. const std::string& config) const;
  63. void GetCertificates(std::vector<cmSourceFile const*>&,
  64. const std::string& config) const;
  65. void GetXamlSources(std::vector<cmSourceFile const*>&,
  66. const std::string& config) const;
  67. void GetExpectedXamlHeaders(std::set<std::string>&,
  68. const std::string& config) const;
  69. void GetExpectedXamlSources(std::set<std::string>&,
  70. const std::string& config) const;
  71. std::set<cmLinkItem>const& GetUtilityItems() const;
  72. void ComputeObjectMapping();
  73. const char* GetFeature(const std::string& feature,
  74. const std::string& config) const;
  75. bool GetFeatureAsBool(const std::string& feature,
  76. const std::string& config) const;
  77. bool IsLinkInterfaceDependentBoolProperty(const std::string &p,
  78. const std::string& config) const;
  79. bool IsLinkInterfaceDependentStringProperty(const std::string &p,
  80. const std::string& config) const;
  81. bool IsLinkInterfaceDependentNumberMinProperty(const std::string &p,
  82. const std::string& config) const;
  83. bool IsLinkInterfaceDependentNumberMaxProperty(const std::string &p,
  84. const std::string& config) const;
  85. bool GetLinkInterfaceDependentBoolProperty(const std::string &p,
  86. const std::string& config) const;
  87. const char *GetLinkInterfaceDependentStringProperty(const std::string &p,
  88. const std::string& config) const;
  89. const char *GetLinkInterfaceDependentNumberMinProperty(const std::string &p,
  90. const std::string& config) const;
  91. const char *GetLinkInterfaceDependentNumberMaxProperty(const std::string &p,
  92. const std::string& config) const;
  93. cmLinkInterface const* GetLinkInterface(const std::string& config,
  94. const cmGeneratorTarget* headTarget) const;
  95. void ComputeLinkInterface(const std::string& config,
  96. cmOptionalLinkInterface& iface,
  97. const cmGeneratorTarget* head) const;
  98. cmLinkInterfaceLibraries const*
  99. GetLinkInterfaceLibraries(const std::string& config,
  100. const cmGeneratorTarget* headTarget,
  101. bool usage_requirements_only) const;
  102. void ComputeLinkInterfaceLibraries(const std::string& config,
  103. cmOptionalLinkInterface &iface,
  104. const cmGeneratorTarget* head,
  105. bool usage_requirements_only) const;
  106. /** Get the full path to the target according to the settings in its
  107. makefile and the configuration type. */
  108. std::string GetFullPath(const std::string& config="", bool implib = false,
  109. bool realname = false) const;
  110. std::string NormalGetFullPath(const std::string& config, bool implib,
  111. bool realname) const;
  112. std::string NormalGetRealName(const std::string& config) const;
  113. /** @return the Mac App directory without the base */
  114. std::string GetAppBundleDirectory(const std::string& config,
  115. bool contentOnly) const;
  116. /** Return whether this target is an executable Bundle, a framework
  117. or CFBundle on Apple. */
  118. bool IsBundleOnApple() const;
  119. /** Get the full name of the target according to the settings in its
  120. makefile. */
  121. std::string GetFullName(const std::string& config="",
  122. bool implib = false) const;
  123. /** @return the Mac framework directory without the base. */
  124. std::string GetFrameworkDirectory(const std::string& config,
  125. bool rootDir) const;
  126. /** @return the Mac CFBundle directory without the base */
  127. std::string GetCFBundleDirectory(const std::string& config,
  128. bool contentOnly) const;
  129. /** Return the install name directory for the target in the
  130. * build tree. For example: "\@rpath/", "\@loader_path/",
  131. * or "/full/path/to/library". */
  132. std::string GetInstallNameDirForBuildTree(const std::string& config) const;
  133. /** Return the install name directory for the target in the
  134. * install tree. For example: "\@rpath/" or "\@loader_path/". */
  135. std::string GetInstallNameDirForInstallTree() const;
  136. /** Get the soname of the target. Allowed only for a shared library. */
  137. std::string GetSOName(const std::string& config) const;
  138. void GetFullNameComponents(std::string& prefix,
  139. std::string& base, std::string& suffix,
  140. const std::string& config="",
  141. bool implib = false) const;
  142. /** Append to @a base the mac content directory and return it. */
  143. std::string BuildMacContentDirectory(const std::string& base,
  144. const std::string& config = "",
  145. bool contentOnly = true) const;
  146. /** @return the mac content directory for this target. */
  147. std::string GetMacContentDirectory(const std::string& config = 0,
  148. bool implib = false) const;
  149. cmTarget* Target;
  150. cmMakefile* Makefile;
  151. cmLocalGenerator* LocalGenerator;
  152. cmGlobalGenerator const* GlobalGenerator;
  153. std::string GetModuleDefinitionFile(const std::string& config) const;
  154. /** Link information from the transitive closure of the link
  155. implementation and the interfaces of its dependencies. */
  156. struct LinkClosure
  157. {
  158. // The preferred linker language.
  159. std::string LinkerLanguage;
  160. // Languages whose runtime libraries must be linked.
  161. std::vector<std::string> Languages;
  162. };
  163. LinkClosure const* GetLinkClosure(const std::string& config) const;
  164. void ComputeLinkClosure(const std::string& config, LinkClosure& lc) const;
  165. cmLinkImplementation const*
  166. GetLinkImplementation(const std::string& config) const;
  167. void ComputeLinkImplementationLanguages(const std::string& config,
  168. cmOptionalLinkImplementation& impl
  169. ) const;
  170. cmLinkImplementationLibraries const*
  171. GetLinkImplementationLibraries(const std::string& config) const;
  172. void ComputeLinkImplementationLibraries(const std::string& config,
  173. cmOptionalLinkImplementation& impl,
  174. const cmGeneratorTarget* head) const;
  175. cmGeneratorTarget* FindTargetToLink(std::string const& name) const;
  176. // Compute the set of languages compiled by the target. This is
  177. // computed every time it is called because the languages can change
  178. // when source file properties are changed and we do not have enough
  179. // information to forward these property changes to the targets
  180. // until we have per-target object file properties.
  181. void GetLanguages(std::set<std::string>& languages,
  182. std::string const& config) const;
  183. void
  184. GetObjectLibrariesCMP0026(std::vector<cmGeneratorTarget*>& objlibs) const;
  185. std::string GetFullNameImported(const std::string& config,
  186. bool implib) const;
  187. bool GetConfigCommonSourceFiles(std::vector<cmSourceFile*>& files) const;
  188. bool HaveBuildTreeRPATH(const std::string& config) const;
  189. /** Full path with trailing slash to the top-level directory
  190. holding object files for this target. Includes the build
  191. time config name placeholder if needed for the generator. */
  192. std::string ObjectDirectory;
  193. void UseObjectLibraries(std::vector<std::string>& objs,
  194. const std::string& config) const;
  195. void GetAppleArchs(const std::string& config,
  196. std::vector<std::string>& archVec) const;
  197. /** Return the rule variable used to create this type of target. */
  198. std::string GetCreateRuleVariable(std::string const& lang,
  199. std::string const& config) const;
  200. /** Get the include directories for this target. */
  201. std::vector<std::string> GetIncludeDirectories(
  202. const std::string& config, const std::string& lang) const;
  203. void GetCompileOptions(std::vector<std::string> &result,
  204. const std::string& config,
  205. const std::string& language) const;
  206. void GetCompileFeatures(std::vector<std::string> &features,
  207. const std::string& config) const;
  208. void GetCompileDefinitions(std::vector<std::string> &result,
  209. const std::string& config,
  210. const std::string& language) const;
  211. bool IsSystemIncludeDirectory(const std::string& dir,
  212. const std::string& config) const;
  213. /** Add the target output files to the global generator manifest. */
  214. void ComputeTargetManifest(const std::string& config) const;
  215. /**
  216. * Trace through the source files in this target and add al source files
  217. * that they depend on, used by all generators
  218. */
  219. void TraceDependencies();
  220. /** Get the directory in which this target will be built. If the
  221. configuration name is given then the generator will add its
  222. subdirectory for that configuration. Otherwise just the canonical
  223. output directory is given. */
  224. std::string GetDirectory(const std::string& config = "",
  225. bool implib = false) const;
  226. /** Get the directory in which to place the target compiler .pdb file.
  227. If the configuration name is given then the generator will add its
  228. subdirectory for that configuration. Otherwise just the canonical
  229. compiler pdb output directory is given. */
  230. std::string GetCompilePDBDirectory(const std::string& config = "") const;
  231. /** Get sources that must be built before the given source. */
  232. std::vector<cmSourceFile*> const*
  233. GetSourceDepends(cmSourceFile const* sf) const;
  234. /** Return whether this target uses the default value for its output
  235. directory. */
  236. bool UsesDefaultOutputDir(const std::string& config, bool implib) const;
  237. // Cache target output paths for each configuration.
  238. struct OutputInfo
  239. {
  240. std::string OutDir;
  241. std::string ImpDir;
  242. std::string PdbDir;
  243. bool empty() const
  244. { return OutDir.empty() && ImpDir.empty() && PdbDir.empty(); }
  245. };
  246. OutputInfo const* GetOutputInfo(const std::string& config) const;
  247. /** Get the name of the pdb file for the target. */
  248. std::string GetPDBName(const std::string& config="") const;
  249. /** Whether this library has soname enabled and platform supports it. */
  250. bool HasSOName(const std::string& config) const;
  251. struct CompileInfo
  252. {
  253. std::string CompilePdbDir;
  254. };
  255. CompileInfo const* GetCompileInfo(const std::string& config) const;
  256. typedef std::map<std::string, CompileInfo> CompileInfoMapType;
  257. mutable CompileInfoMapType CompileInfoMap;
  258. bool IsNullImpliedByLinkLibraries(const std::string &p) const;
  259. /** Get the name of the compiler pdb file for the target. */
  260. std::string GetCompilePDBName(const std::string& config="") const;
  261. /** Get the path for the MSVC /Fd option for this target. */
  262. std::string GetCompilePDBPath(const std::string& config="") const;
  263. // Get the target base name.
  264. std::string GetOutputName(const std::string& config, bool implib) const;
  265. void AddSource(const std::string& src);
  266. void AddTracedSources(std::vector<std::string> const& srcs);
  267. /**
  268. * Flags for a given source file as used in this target. Typically assigned
  269. * via SET_TARGET_PROPERTIES when the property is a list of source files.
  270. */
  271. enum SourceFileType
  272. {
  273. SourceFileTypeNormal,
  274. SourceFileTypePrivateHeader, // is in "PRIVATE_HEADER" target property
  275. SourceFileTypePublicHeader, // is in "PUBLIC_HEADER" target property
  276. SourceFileTypeResource, // is in "RESOURCE" target property *or*
  277. // has MACOSX_PACKAGE_LOCATION=="Resources"
  278. SourceFileTypeMacContent // has MACOSX_PACKAGE_LOCATION!="Resources"
  279. };
  280. struct SourceFileFlags
  281. {
  282. SourceFileFlags(): Type(SourceFileTypeNormal), MacFolder(0) {}
  283. SourceFileFlags(SourceFileFlags const& r):
  284. Type(r.Type), MacFolder(r.MacFolder) {}
  285. SourceFileType Type;
  286. const char* MacFolder; // location inside Mac content folders
  287. };
  288. void GetAutoUicOptions(std::vector<std::string> &result,
  289. const std::string& config) const;
  290. /** Get the names of the executable needed to generate a build rule
  291. that takes into account executable version numbers. This should
  292. be called only on an executable target. */
  293. void GetExecutableNames(std::string& name, std::string& realName,
  294. std::string& impName, std::string& pdbName,
  295. const std::string& config) const;
  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 std::string& config) const;
  302. /**
  303. * Compute whether this target must be relinked before installing.
  304. */
  305. bool NeedRelinkBeforeInstall(const std::string& config) const;
  306. /** Return true if builtin chrpath will work for this target */
  307. bool IsChrpathUsed(const std::string& config) const;
  308. /** Get the directory in which this targets .pdb files will be placed.
  309. If the configuration name is given then the generator will add its
  310. subdirectory for that configuration. Otherwise just the canonical
  311. pdb output directory is given. */
  312. std::string GetPDBDirectory(const std::string& config) const;
  313. ///! Return the preferred linker language for this target
  314. std::string GetLinkerLanguage(const std::string& config = "") const;
  315. /** Does this target have a GNU implib to convert to MS format? */
  316. bool HasImplibGNUtoMS() const;
  317. /** Convert the given GNU import library name (.dll.a) to a name with a new
  318. extension (.lib or ${CMAKE_IMPORT_LIBRARY_SUFFIX}). */
  319. bool GetImplibGNUtoMS(std::string const& gnuName, std::string& out,
  320. const char* newExt = 0) const;
  321. /** Return whether or not the target has a DLL import library. */
  322. bool HasImportLibrary() const;
  323. /** Get a build-tree directory in which to place target support files. */
  324. std::string GetSupportDirectory() const;
  325. struct SourceFileFlags
  326. GetTargetSourceFileFlags(const cmSourceFile* sf) const;
  327. struct ResxData {
  328. mutable std::set<std::string> ExpectedResxHeaders;
  329. mutable std::vector<cmSourceFile const*> ResxSources;
  330. };
  331. struct XamlData {
  332. std::set<std::string> ExpectedXamlHeaders;
  333. std::set<std::string> ExpectedXamlSources;
  334. std::vector<cmSourceFile const*> XamlSources;
  335. };
  336. void ReportPropertyOrigin(const std::string &p,
  337. const std::string &result,
  338. const std::string &report,
  339. const std::string &compatibilityType) const;
  340. class TargetPropertyEntry;
  341. bool HaveInstallTreeRPATH() const;
  342. /** Whether this library has \@rpath and platform supports it. */
  343. bool HasMacOSXRpathInstallNameDir(const std::string& config) const;
  344. /** Whether this library defaults to \@rpath. */
  345. bool MacOSXRpathInstallNameDirDefault() const;
  346. /** Test for special case of a third-party shared library that has
  347. no soname at all. */
  348. bool IsImportedSharedLibWithoutSOName(const std::string& config) const;
  349. const char* ImportedGetLocation(const std::string& config) const;
  350. /** Get the target major and minor version numbers interpreted from
  351. the VERSION property. Version 0 is returned if the property is
  352. not set or cannot be parsed. */
  353. void GetTargetVersion(int& major, int& minor) const;
  354. /** Get the target major, minor, and patch version numbers
  355. interpreted from the VERSION or SOVERSION property. Version 0
  356. is returned if the property is not set or cannot be parsed. */
  357. void
  358. GetTargetVersion(bool soversion, int& major, int& minor, int& patch) const;
  359. private:
  360. friend class cmTargetTraceDependencies;
  361. struct SourceEntry { std::vector<cmSourceFile*> Depends; };
  362. typedef std::map<cmSourceFile const*, SourceEntry> SourceEntriesType;
  363. SourceEntriesType SourceDepends;
  364. mutable std::map<cmSourceFile const*, std::string> Objects;
  365. std::set<cmSourceFile const*> ExplicitObjectName;
  366. mutable std::map<std::string, std::vector<std::string> > SystemIncludesCache;
  367. void ConstructSourceFileFlags() const;
  368. mutable bool SourceFileFlagsConstructed;
  369. mutable std::map<cmSourceFile const*, SourceFileFlags> SourceFlagsMap;
  370. mutable std::map<std::string, bool> DebugCompatiblePropertiesDone;
  371. std::string GetFullNameInternal(const std::string& config,
  372. bool implib) const;
  373. void GetFullNameInternal(const std::string& config, bool implib,
  374. std::string& outPrefix, std::string& outBase,
  375. std::string& outSuffix) const;
  376. typedef std::map<std::string, LinkClosure> LinkClosureMapType;
  377. mutable LinkClosureMapType LinkClosureMap;
  378. // Returns ARCHIVE, LIBRARY, or RUNTIME based on platform and type.
  379. const char* GetOutputTargetType(bool implib) const;
  380. struct CompatibleInterfacesBase
  381. {
  382. std::set<std::string> PropsBool;
  383. std::set<std::string> PropsString;
  384. std::set<std::string> PropsNumberMax;
  385. std::set<std::string> PropsNumberMin;
  386. };
  387. CompatibleInterfacesBase const&
  388. GetCompatibleInterfaces(std::string const& config) const;
  389. struct CompatibleInterfaces: public CompatibleInterfacesBase
  390. {
  391. CompatibleInterfaces(): Done(false) {}
  392. bool Done;
  393. };
  394. mutable std::map<std::string, CompatibleInterfaces> CompatibleInterfacesMap;
  395. typedef std::map<std::string, cmComputeLinkInformation*>
  396. cmTargetLinkInformationMap;
  397. mutable cmTargetLinkInformationMap LinkInformation;
  398. void CheckPropertyCompatibility(cmComputeLinkInformation *info,
  399. const std::string& config) const;
  400. cmGeneratorTarget(cmGeneratorTarget const&);
  401. void operator=(cmGeneratorTarget const&);
  402. struct LinkImplClosure: public std::vector<cmGeneratorTarget const*>
  403. {
  404. LinkImplClosure(): Done(false) {}
  405. bool Done;
  406. };
  407. mutable std::map<std::string, LinkImplClosure> LinkImplClosureMap;
  408. typedef std::map<std::string, cmHeadToLinkInterfaceMap>
  409. LinkInterfaceMapType;
  410. mutable LinkInterfaceMapType LinkInterfaceMap;
  411. mutable LinkInterfaceMapType LinkInterfaceUsageRequirementsOnlyMap;
  412. cmHeadToLinkInterfaceMap&
  413. GetHeadToLinkInterfaceMap(std::string const& config) const;
  414. cmHeadToLinkInterfaceMap& GetHeadToLinkInterfaceUsageRequirementsMap(
  415. std::string const& config) const;
  416. // Cache import information from properties for each configuration.
  417. struct ImportInfo
  418. {
  419. ImportInfo(): NoSOName(false), Multiplicity(0) {}
  420. bool NoSOName;
  421. int Multiplicity;
  422. std::string Location;
  423. std::string SOName;
  424. std::string ImportLibrary;
  425. std::string Languages;
  426. std::string Libraries;
  427. std::string LibrariesProp;
  428. std::string SharedDeps;
  429. };
  430. typedef std::map<std::string, ImportInfo> ImportInfoMapType;
  431. mutable ImportInfoMapType ImportInfoMap;
  432. void ComputeImportInfo(std::string const& desired_config,
  433. ImportInfo& info) const;
  434. ImportInfo const* GetImportInfo(const std::string& config) const;
  435. /** Strip off leading and trailing whitespace from an item named in
  436. the link dependencies of this target. */
  437. std::string CheckCMP0004(std::string const& item) const;
  438. cmLinkInterface const*
  439. GetImportLinkInterface(const std::string& config,
  440. const cmGeneratorTarget* head,
  441. bool usage_requirements_only) const;
  442. typedef std::map<std::string, std::vector<cmSourceFile*> >
  443. SourceFilesMapType;
  444. mutable SourceFilesMapType SourceFilesMap;
  445. std::vector<TargetPropertyEntry*> IncludeDirectoriesEntries;
  446. std::vector<TargetPropertyEntry*> CompileOptionsEntries;
  447. std::vector<TargetPropertyEntry*> CompileFeaturesEntries;
  448. std::vector<TargetPropertyEntry*> CompileDefinitionsEntries;
  449. std::vector<TargetPropertyEntry*> SourceEntries;
  450. mutable std::set<std::string> LinkImplicitNullProperties;
  451. void ExpandLinkItems(std::string const& prop, std::string const& value,
  452. std::string const& config,
  453. const cmGeneratorTarget* headTarget,
  454. bool usage_requirements_only,
  455. std::vector<cmLinkItem>& items,
  456. bool& hadHeadSensitiveCondition) const;
  457. void LookupLinkItems(std::vector<std::string> const& names,
  458. std::vector<cmLinkItem>& items) const;
  459. void GetSourceFiles(std::vector<std::string>& files,
  460. const std::string& config) const;
  461. struct HeadToLinkImplementationMap:
  462. public std::map<cmTarget const*, cmOptionalLinkImplementation> {};
  463. typedef std::map<std::string,
  464. HeadToLinkImplementationMap> LinkImplMapType;
  465. mutable LinkImplMapType LinkImplMap;
  466. cmLinkImplementationLibraries const*
  467. GetLinkImplementationLibrariesInternal(const std::string& config,
  468. const cmGeneratorTarget* head) const;
  469. bool
  470. ComputeOutputDir(const std::string& config,
  471. bool implib, std::string& out) const;
  472. typedef std::map<std::string, OutputInfo> OutputInfoMapType;
  473. mutable OutputInfoMapType OutputInfoMap;
  474. typedef std::pair<std::string, bool> OutputNameKey;
  475. typedef std::map<OutputNameKey, std::string> OutputNameMapType;
  476. mutable OutputNameMapType OutputNameMap;
  477. mutable std::set<cmLinkItem> UtilityItems;
  478. mutable bool PolicyWarnedCMP0022;
  479. mutable bool DebugIncludesDone;
  480. mutable bool DebugCompileOptionsDone;
  481. mutable bool DebugCompileFeaturesDone;
  482. mutable bool DebugCompileDefinitionsDone;
  483. mutable bool DebugSourcesDone;
  484. mutable bool LinkImplementationLanguageIsContextDependent;
  485. mutable bool UtilityItemsDone;
  486. bool ComputePDBOutputDir(const std::string& kind, const std::string& config,
  487. std::string& out) const;
  488. public:
  489. const std::vector<const cmGeneratorTarget*>&
  490. GetLinkImplementationClosure(const std::string& config) const;
  491. mutable std::map<std::string, std::string> MaxLanguageStandards;
  492. std::map<std::string, std::string> const&
  493. GetMaxLanguageStandards() const
  494. {
  495. return this->MaxLanguageStandards;
  496. }
  497. };
  498. struct cmStrictTargetComparison {
  499. bool operator()(cmTarget const* t1, cmTarget const* t2) const;
  500. };
  501. typedef std::map<cmTarget const*,
  502. cmGeneratorTarget*,
  503. cmStrictTargetComparison> cmGeneratorTargetsType;
  504. #endif