cmLocalGenerator.h 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #ifndef cmLocalGenerator_h
  4. #define cmLocalGenerator_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include <iosfwd>
  7. #include <map>
  8. #include <memory>
  9. #include <set>
  10. #include <string>
  11. #include <unordered_map>
  12. #include <vector>
  13. #include <cm3p/kwiml/int.h>
  14. #include "cmCustomCommandTypes.h"
  15. #include "cmListFileCache.h"
  16. #include "cmMessageType.h"
  17. #include "cmOutputConverter.h"
  18. #include "cmPolicies.h"
  19. #include "cmProperty.h"
  20. #include "cmStateSnapshot.h"
  21. class cmComputeLinkInformation;
  22. class cmCustomCommandGenerator;
  23. class cmCustomCommandLines;
  24. class cmGeneratorTarget;
  25. class cmGlobalGenerator;
  26. class cmImplicitDependsList;
  27. class cmLinkLineComputer;
  28. class cmMakefile;
  29. class cmRulePlaceholderExpander;
  30. class cmSourceFile;
  31. class cmState;
  32. class cmTarget;
  33. class cmake;
  34. /** \class cmLocalGenerator
  35. * \brief Create required build files for a directory.
  36. *
  37. * Subclasses of this abstract class generate makefiles, DSP, etc for various
  38. * platforms. This class should never be constructed directly. A
  39. * GlobalGenerator will create it and invoke the appropriate commands on it.
  40. */
  41. class cmLocalGenerator : public cmOutputConverter
  42. {
  43. public:
  44. cmLocalGenerator(cmGlobalGenerator* gg, cmMakefile* makefile);
  45. virtual ~cmLocalGenerator();
  46. /**
  47. * Generate the makefile for this directory.
  48. */
  49. virtual void Generate() {}
  50. virtual void ComputeHomeRelativeOutputPath() {}
  51. /**
  52. * Calls TraceVSDependencies() on all targets of this generator.
  53. */
  54. void TraceDependencies();
  55. virtual void AddHelperCommands() {}
  56. /**
  57. * Generate the install rules files in this directory.
  58. */
  59. void GenerateInstallRules();
  60. /**
  61. * Generate the test files for tests.
  62. */
  63. void GenerateTestFiles();
  64. /**
  65. * Generate a manifest of target files that will be built.
  66. */
  67. void ComputeTargetManifest();
  68. bool ComputeTargetCompileFeatures();
  69. bool IsRootMakefile() const;
  70. //! Get the makefile for this generator
  71. cmMakefile* GetMakefile() { return this->Makefile; }
  72. //! Get the makefile for this generator, const version
  73. const cmMakefile* GetMakefile() const { return this->Makefile; }
  74. //! Get the GlobalGenerator this is associated with
  75. cmGlobalGenerator* GetGlobalGenerator() { return this->GlobalGenerator; }
  76. const cmGlobalGenerator* GetGlobalGenerator() const
  77. {
  78. return this->GlobalGenerator;
  79. }
  80. virtual cmRulePlaceholderExpander* CreateRulePlaceholderExpander() const;
  81. std::string GetLinkLibsCMP0065(std::string const& linkLanguage,
  82. cmGeneratorTarget& tgt) const;
  83. cmState* GetState() const;
  84. cmStateSnapshot GetStateSnapshot() const;
  85. void AddArchitectureFlags(std::string& flags,
  86. cmGeneratorTarget const* target,
  87. const std::string& lang, const std::string& config,
  88. const std::string& filterArch = std::string());
  89. void AddLanguageFlags(std::string& flags, cmGeneratorTarget const* target,
  90. const std::string& lang, const std::string& config);
  91. void AddLanguageFlagsForLinking(std::string& flags,
  92. cmGeneratorTarget const* target,
  93. const std::string& lang,
  94. const std::string& config);
  95. void AddCMP0018Flags(std::string& flags, cmGeneratorTarget const* target,
  96. std::string const& lang, const std::string& config);
  97. void AddVisibilityPresetFlags(std::string& flags,
  98. cmGeneratorTarget const* target,
  99. const std::string& lang);
  100. void AddConfigVariableFlags(std::string& flags, const std::string& var,
  101. const std::string& config);
  102. void AddCompilerRequirementFlag(std::string& flags,
  103. cmGeneratorTarget const* target,
  104. const std::string& lang,
  105. const std::string& config);
  106. //! Append flags to a string.
  107. virtual void AppendFlags(std::string& flags,
  108. const std::string& newFlags) const;
  109. virtual void AppendFlags(std::string& flags,
  110. const std::vector<BT<std::string>>& newFlags) const;
  111. virtual void AppendFlagEscape(std::string& flags,
  112. const std::string& rawFlag) const;
  113. void AddISPCDependencies(cmGeneratorTarget* target);
  114. void AddPchDependencies(cmGeneratorTarget* target);
  115. void AddUnityBuild(cmGeneratorTarget* target);
  116. void AppendIPOLinkerFlags(std::string& flags, cmGeneratorTarget* target,
  117. const std::string& config,
  118. const std::string& lang);
  119. void AppendPositionIndependentLinkerFlags(std::string& flags,
  120. cmGeneratorTarget* target,
  121. const std::string& config,
  122. const std::string& lang);
  123. //! Get the include flags for the current makefile and language
  124. std::string GetIncludeFlags(const std::vector<std::string>& includes,
  125. cmGeneratorTarget* target,
  126. const std::string& lang,
  127. bool forceFullPaths = false,
  128. bool forResponseFile = false,
  129. const std::string& config = "");
  130. using GeneratorTargetVector =
  131. std::vector<std::unique_ptr<cmGeneratorTarget>>;
  132. const GeneratorTargetVector& GetGeneratorTargets() const
  133. {
  134. return this->GeneratorTargets;
  135. }
  136. void AddGeneratorTarget(std::unique_ptr<cmGeneratorTarget> gt);
  137. void AddImportedGeneratorTarget(cmGeneratorTarget* gt);
  138. void AddOwnedImportedGeneratorTarget(std::unique_ptr<cmGeneratorTarget> gt);
  139. cmGeneratorTarget* FindLocalNonAliasGeneratorTarget(
  140. const std::string& name) const;
  141. cmGeneratorTarget* FindGeneratorTargetToUse(const std::string& name) const;
  142. /**
  143. * Process a list of include directories
  144. */
  145. void AppendIncludeDirectories(std::vector<std::string>& includes,
  146. std::string const& includes_list,
  147. const cmSourceFile& sourceFile) const;
  148. void AppendIncludeDirectories(std::vector<std::string>& includes,
  149. const std::vector<std::string>& includes_vec,
  150. const cmSourceFile& sourceFile) const;
  151. /**
  152. * Encode a list of preprocessor definitions for the compiler
  153. * command line.
  154. */
  155. void AppendDefines(std::set<std::string>& defines,
  156. std::string const& defines_list) const;
  157. void AppendDefines(std::set<BT<std::string>>& defines,
  158. std::string const& defines_list) const;
  159. void AppendDefines(std::set<BT<std::string>>& defines,
  160. const std::vector<BT<std::string>>& defines_vec) const;
  161. /**
  162. * Encode a list of compile options for the compiler
  163. * command line.
  164. */
  165. void AppendCompileOptions(std::string& options,
  166. std::string const& options_list,
  167. const char* regex = nullptr) const;
  168. void AppendCompileOptions(std::string& options,
  169. const std::vector<std::string>& options_vec,
  170. const char* regex = nullptr) const;
  171. void AppendCompileOptions(std::vector<BT<std::string>>& options,
  172. const std::vector<BT<std::string>>& options_vec,
  173. const char* regex = nullptr) const;
  174. /**
  175. * Join a set of defines into a definesString with a space separator.
  176. */
  177. void JoinDefines(const std::set<std::string>& defines,
  178. std::string& definesString, const std::string& lang);
  179. /** Lookup and append options associated with a particular feature. */
  180. void AppendFeatureOptions(std::string& flags, const std::string& lang,
  181. const char* feature);
  182. cmProp GetFeature(const std::string& feature, const std::string& config);
  183. /** \brief Get absolute path to dependency \a name
  184. *
  185. * Translate a dependency as given in CMake code to the name to
  186. * appear in a generated build file.
  187. * - If \a name is a utility target, returns false.
  188. * - If \a name is a CMake target, it will be transformed to the real output
  189. * location of that target for the given configuration.
  190. * - If \a name is the full path to a file, it will be returned.
  191. * - Otherwise \a name is treated as a relative path with respect to
  192. * the source directory of this generator. This should only be
  193. * used for dependencies of custom commands.
  194. */
  195. bool GetRealDependency(const std::string& name, const std::string& config,
  196. std::string& dep);
  197. virtual std::string ConvertToIncludeReference(
  198. std::string const& path,
  199. cmOutputConverter::OutputFormat format = cmOutputConverter::SHELL,
  200. bool forceFullPaths = false);
  201. /** Called from command-line hook to clear dependencies. */
  202. virtual void ClearDependencies(cmMakefile* /* mf */, bool /* verbose */) {}
  203. /** Called from command-line hook to update dependencies. */
  204. virtual bool UpdateDependencies(const std::string& /* tgtInfo */,
  205. bool /*verbose*/, bool /*color*/)
  206. {
  207. return true;
  208. }
  209. /** @brief Get the include directories for the current makefile and language
  210. * and optional the compiler implicit include directories.
  211. *
  212. * @arg stripImplicitDirs Strip all directories found in
  213. * CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES from the result.
  214. * @arg appendAllImplicitDirs Append all directories found in
  215. * CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES to the result.
  216. */
  217. std::vector<BT<std::string>> GetIncludeDirectoriesImplicit(
  218. cmGeneratorTarget const* target, std::string const& lang = "C",
  219. std::string const& config = "", bool stripImplicitDirs = true,
  220. bool appendAllImplicitDirs = false) const;
  221. /** @brief Get the include directories for the current makefile and language
  222. * and optional the compiler implicit include directories.
  223. *
  224. * @arg dirs Directories are appended to this list
  225. */
  226. void GetIncludeDirectoriesImplicit(std::vector<std::string>& dirs,
  227. cmGeneratorTarget const* target,
  228. const std::string& lang = "C",
  229. const std::string& config = "",
  230. bool stripImplicitDirs = true,
  231. bool appendAllImplicitDirs = false) const;
  232. /** @brief Get the include directories for the current makefile and language.
  233. * @arg dirs Include directories are appended to this list
  234. */
  235. void GetIncludeDirectories(std::vector<std::string>& dirs,
  236. cmGeneratorTarget const* target,
  237. const std::string& lang = "C",
  238. const std::string& config = "") const;
  239. /** @brief Get the include directories for the current makefile and language.
  240. * @return The include directory list
  241. */
  242. std::vector<BT<std::string>> GetIncludeDirectories(
  243. cmGeneratorTarget const* target, std::string const& lang = "C",
  244. std::string const& config = "") const;
  245. void AddCompileOptions(std::string& flags, cmGeneratorTarget* target,
  246. const std::string& lang, const std::string& config);
  247. void AddCompileOptions(std::vector<BT<std::string>>& flags,
  248. cmGeneratorTarget* target, const std::string& lang,
  249. const std::string& config);
  250. /**
  251. * Add a custom PRE_BUILD, PRE_LINK, or POST_BUILD command to a target.
  252. */
  253. cmTarget* AddCustomCommandToTarget(
  254. const std::string& target, const std::vector<std::string>& byproducts,
  255. const std::vector<std::string>& depends,
  256. const cmCustomCommandLines& commandLines, cmCustomCommandType type,
  257. const char* comment, const char* workingDir, bool escapeOldStyle = true,
  258. bool uses_terminal = false, const std::string& depfile = "",
  259. const std::string& job_pool = "", bool command_expand_lists = false,
  260. cmObjectLibraryCommands objLibCommands = cmObjectLibraryCommands::Reject,
  261. bool stdPipesUTF8 = false);
  262. /**
  263. * Add a custom command to a source file.
  264. */
  265. cmSourceFile* AddCustomCommandToOutput(
  266. const std::string& output, const std::vector<std::string>& depends,
  267. const std::string& main_dependency,
  268. const cmCustomCommandLines& commandLines, const char* comment,
  269. const char* workingDir, bool replace = false, bool escapeOldStyle = true,
  270. bool uses_terminal = false, bool command_expand_lists = false,
  271. const std::string& depfile = "", const std::string& job_pool = "",
  272. bool stdPipesUTF8 = false);
  273. cmSourceFile* AddCustomCommandToOutput(
  274. const std::vector<std::string>& outputs,
  275. const std::vector<std::string>& byproducts,
  276. const std::vector<std::string>& depends,
  277. const std::string& main_dependency,
  278. const cmImplicitDependsList& implicit_depends,
  279. const cmCustomCommandLines& commandLines, const char* comment,
  280. const char* workingDir, bool replace = false, bool escapeOldStyle = true,
  281. bool uses_terminal = false, bool command_expand_lists = false,
  282. const std::string& depfile = "", const std::string& job_pool = "",
  283. bool stdPipesUTF8 = false);
  284. /**
  285. * Add a utility to the build. A utility target is a command that is run
  286. * every time the target is built.
  287. */
  288. cmTarget* AddUtilityCommand(
  289. const std::string& utilityName, bool excludeFromAll,
  290. const char* workingDir, const std::vector<std::string>& byproducts,
  291. const std::vector<std::string>& depends,
  292. const cmCustomCommandLines& commandLines, bool escapeOldStyle = true,
  293. const char* comment = nullptr, bool uses_terminal = false,
  294. bool command_expand_lists = false, const std::string& job_pool = "",
  295. bool stdPipesUTF8 = false);
  296. std::string GetProjectName() const;
  297. /** Compute the language used to compile the given source file. */
  298. std::string GetSourceFileLanguage(const cmSourceFile& source);
  299. // Fill the vector with the target names for the object files,
  300. // preprocessed files and assembly files.
  301. void GetIndividualFileTargets(std::vector<std::string>&) {}
  302. /**
  303. * Get the relative path from the generator output directory to a
  304. * per-target support directory.
  305. */
  306. virtual std::string GetTargetDirectory(
  307. cmGeneratorTarget const* target) const;
  308. /**
  309. * Get the level of backwards compatibility requested by the project
  310. * in this directory. This is the value of the CMake variable
  311. * CMAKE_BACKWARDS_COMPATIBILITY whose format is
  312. * "major.minor[.patch]". The returned integer is encoded as
  313. *
  314. * CMake_VERSION_ENCODE(major, minor, patch)
  315. *
  316. * and is monotonically increasing with the CMake version.
  317. */
  318. KWIML_INT_uint64_t GetBackwardsCompatibility();
  319. /**
  320. * Test whether compatibility is set to a given version or lower.
  321. */
  322. bool NeedBackwardsCompatibility_2_4();
  323. cmPolicies::PolicyStatus GetPolicyStatus(cmPolicies::PolicyID id) const;
  324. cmake* GetCMakeInstance() const;
  325. std::string const& GetSourceDirectory() const;
  326. std::string const& GetBinaryDirectory() const;
  327. std::string const& GetCurrentBinaryDirectory() const;
  328. std::string const& GetCurrentSourceDirectory() const;
  329. /**
  330. * Convert the given remote path to a relative path with respect to
  331. * the given local path. Both paths must use forward slashes and not
  332. * already be escaped or quoted.
  333. * The conversion is skipped if the paths are not both in the source
  334. * or both in the binary tree.
  335. */
  336. std::string MaybeConvertToRelativePath(std::string const& local_path,
  337. std::string const& remote_path) const;
  338. /**
  339. * Generate a macOS application bundle Info.plist file.
  340. */
  341. void GenerateAppleInfoPList(cmGeneratorTarget* target,
  342. const std::string& targetName,
  343. const std::string& fname);
  344. /**
  345. * Generate a macOS framework Info.plist file.
  346. */
  347. void GenerateFrameworkInfoPList(cmGeneratorTarget* target,
  348. const std::string& targetName,
  349. const std::string& fname);
  350. /** Construct a comment for a custom command. */
  351. std::string ConstructComment(cmCustomCommandGenerator const& ccg,
  352. const char* default_comment = "");
  353. // Compute object file names.
  354. std::string GetObjectFileNameWithoutTarget(
  355. const cmSourceFile& source, std::string const& dir_max,
  356. bool* hasSourceExtension = nullptr,
  357. char const* customOutputExtension = nullptr);
  358. /** Fill out the static linker flags for the given target. */
  359. void GetStaticLibraryFlags(std::string& flags, std::string const& config,
  360. std::string const& linkLanguage,
  361. cmGeneratorTarget* target);
  362. std::vector<BT<std::string>> GetStaticLibraryFlags(
  363. std::string const& config, std::string const& linkLanguage,
  364. cmGeneratorTarget* target);
  365. /** Fill out these strings for the given target. Libraries to link,
  366. * flags, and linkflags. */
  367. void GetDeviceLinkFlags(cmLinkLineComputer* linkLineComputer,
  368. const std::string& config, std::string& linkLibs,
  369. std::string& linkFlags, std::string& frameworkPath,
  370. std::string& linkPath, cmGeneratorTarget* target);
  371. void GetTargetFlags(cmLinkLineComputer* linkLineComputer,
  372. const std::string& config, std::string& linkLibs,
  373. std::string& flags, std::string& linkFlags,
  374. std::string& frameworkPath, std::string& linkPath,
  375. cmGeneratorTarget* target);
  376. void GetTargetFlags(
  377. cmLinkLineComputer* linkLineComputer, const std::string& config,
  378. std::vector<BT<std::string>>& linkLibs, std::string& flags,
  379. std::vector<BT<std::string>>& linkFlags, std::string& frameworkPath,
  380. std::vector<BT<std::string>>& linkPath, cmGeneratorTarget* target);
  381. void GetTargetDefines(cmGeneratorTarget const* target,
  382. std::string const& config, std::string const& lang,
  383. std::set<std::string>& defines) const;
  384. std::set<BT<std::string>> GetTargetDefines(cmGeneratorTarget const* target,
  385. std::string const& config,
  386. std::string const& lang) const;
  387. void GetTargetCompileFlags(cmGeneratorTarget* target,
  388. std::string const& config,
  389. std::string const& lang, std::string& flags,
  390. std::string const& arch = std::string());
  391. std::vector<BT<std::string>> GetTargetCompileFlags(
  392. cmGeneratorTarget* target, std::string const& config,
  393. std::string const& lang, std::string const& arch = std::string());
  394. std::string GetFrameworkFlags(std::string const& l,
  395. std::string const& config,
  396. cmGeneratorTarget* target);
  397. virtual std::string GetTargetFortranFlags(cmGeneratorTarget const* target,
  398. std::string const& config);
  399. virtual void ComputeObjectFilenames(
  400. std::map<cmSourceFile const*, std::string>& mapping,
  401. cmGeneratorTarget const* gt = nullptr);
  402. bool IsWindowsShell() const;
  403. bool IsWatcomWMake() const;
  404. bool IsMinGWMake() const;
  405. bool IsNMake() const;
  406. bool IsNinjaMulti() const;
  407. void IssueMessage(MessageType t, std::string const& text) const;
  408. void CreateEvaluationFileOutputs();
  409. void CreateEvaluationFileOutputs(const std::string& config);
  410. void ProcessEvaluationFiles(std::vector<std::string>& generatedFiles);
  411. const char* GetRuleLauncher(cmGeneratorTarget* target,
  412. const std::string& prop);
  413. protected:
  414. //! put all the libraries for a target on into the given stream
  415. void OutputLinkLibraries(cmComputeLinkInformation* pcli,
  416. cmLinkLineComputer* linkLineComputer,
  417. std::string& linkLibraries,
  418. std::string& frameworkPath, std::string& linkPath);
  419. void OutputLinkLibraries(cmComputeLinkInformation* pcli,
  420. cmLinkLineComputer* linkLineComputer,
  421. std::vector<BT<std::string>>& linkLibraries,
  422. std::string& frameworkPath,
  423. std::vector<BT<std::string>>& linkPath);
  424. // Handle old-style install rules stored in the targets.
  425. void GenerateTargetInstallRules(
  426. std::ostream& os, const std::string& config,
  427. std::vector<std::string> const& configurationTypes);
  428. std::string& CreateSafeUniqueObjectFileName(const std::string& sin,
  429. std::string const& dir_max);
  430. /** Check whether the native build system supports the given
  431. definition. Issues a warning. */
  432. virtual bool CheckDefinition(std::string const& define) const;
  433. cmMakefile* Makefile;
  434. cmStateSnapshot StateSnapshot;
  435. cmListFileBacktrace DirectoryBacktrace;
  436. cmGlobalGenerator* GlobalGenerator;
  437. std::map<std::string, std::string> UniqueObjectNamesMap;
  438. std::string::size_type ObjectPathMax;
  439. std::set<std::string> ObjectMaxPathViolations;
  440. std::set<std::string> EnvCPATH;
  441. using GeneratorTargetMap =
  442. std::unordered_map<std::string, cmGeneratorTarget*>;
  443. GeneratorTargetMap GeneratorTargetSearchIndex;
  444. GeneratorTargetVector GeneratorTargets;
  445. std::set<cmGeneratorTarget const*> WarnCMP0063;
  446. GeneratorTargetMap ImportedGeneratorTargets;
  447. GeneratorTargetVector OwnedImportedGeneratorTargets;
  448. std::map<std::string, std::string> AliasTargets;
  449. std::map<std::string, std::string> Compilers;
  450. std::map<std::string, std::string> VariableMappings;
  451. std::string CompilerSysroot;
  452. std::string LinkerSysroot;
  453. std::unordered_map<std::string, std::string> AppleArchSysroots;
  454. bool EmitUniversalBinaryFlags;
  455. KWIML_INT_uint64_t BackwardsCompatibility;
  456. bool BackwardsCompatibilityFinal;
  457. private:
  458. void AddSharedFlags(std::string& flags, const std::string& lang,
  459. bool shared);
  460. bool GetShouldUseOldFlags(bool shared, const std::string& lang) const;
  461. void AddPositionIndependentFlags(std::string& flags, std::string const& l,
  462. int targetType);
  463. void ComputeObjectMaxPath();
  464. bool AllAppleArchSysrootsAreTheSame(const std::vector<std::string>& archs,
  465. const char* sysroot);
  466. void CopyPchCompilePdb(const std::string& config, cmGeneratorTarget* target,
  467. const std::string& ReuseFrom,
  468. cmGeneratorTarget* reuseTarget,
  469. std::vector<std::string> const& extensions);
  470. };
  471. #if !defined(CMAKE_BOOTSTRAP)
  472. bool cmLocalGeneratorCheckObjectName(std::string& objName,
  473. std::string::size_type dir_len,
  474. std::string::size_type max_total_len);
  475. #endif
  476. namespace detail {
  477. void AddCustomCommandToTarget(cmLocalGenerator& lg,
  478. const cmListFileBacktrace& lfbt,
  479. cmCommandOrigin origin, cmTarget* target,
  480. const std::vector<std::string>& byproducts,
  481. const std::vector<std::string>& depends,
  482. const cmCustomCommandLines& commandLines,
  483. cmCustomCommandType type, const char* comment,
  484. const char* workingDir, bool escapeOldStyle,
  485. bool uses_terminal, const std::string& depfile,
  486. const std::string& job_pool,
  487. bool command_expand_lists, bool stdPipesUTF8);
  488. cmSourceFile* AddCustomCommandToOutput(
  489. cmLocalGenerator& lg, const cmListFileBacktrace& lfbt,
  490. cmCommandOrigin origin, const std::vector<std::string>& outputs,
  491. const std::vector<std::string>& byproducts,
  492. const std::vector<std::string>& depends, const std::string& main_dependency,
  493. const cmImplicitDependsList& implicit_depends,
  494. const cmCustomCommandLines& commandLines, const char* comment,
  495. const char* workingDir, bool replace, bool escapeOldStyle,
  496. bool uses_terminal, bool command_expand_lists, const std::string& depfile,
  497. const std::string& job_pool, bool stdPipesUTF8);
  498. void AppendCustomCommandToOutput(cmLocalGenerator& lg,
  499. const cmListFileBacktrace& lfbt,
  500. const std::string& output,
  501. const std::vector<std::string>& depends,
  502. const cmImplicitDependsList& implicit_depends,
  503. const cmCustomCommandLines& commandLines);
  504. void AddUtilityCommand(cmLocalGenerator& lg, const cmListFileBacktrace& lfbt,
  505. cmCommandOrigin origin, cmTarget* target,
  506. const cmUtilityOutput& force, const char* workingDir,
  507. const std::vector<std::string>& byproducts,
  508. const std::vector<std::string>& depends,
  509. const cmCustomCommandLines& commandLines,
  510. bool escapeOldStyle, const char* comment,
  511. bool uses_terminal, bool command_expand_lists,
  512. const std::string& job_pool, bool stdPipesUTF8);
  513. }
  514. #endif