cmLocalGenerator.h 25 KB

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