cmGlobalFastbuildGenerator.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file LICENSE.rst or https://cmake.org/licensing for details. */
  3. #pragma once
  4. #include <algorithm>
  5. #include <iterator>
  6. #include <map>
  7. #include <set>
  8. #include <string>
  9. #include <type_traits>
  10. #include <unordered_map>
  11. #include <unordered_set>
  12. #include <utility>
  13. #include <vector>
  14. #include <cm/memory>
  15. #include <cm/optional>
  16. #include <assert.h>
  17. #include "cmBuildOptions.h"
  18. #include "cmGeneratedFileStream.h"
  19. #include "cmGlobalCommonGenerator.h"
  20. class cmFastbuildTargetGenerator;
  21. class cmGeneratorTarget;
  22. class cmGlobalGeneratorFactory;
  23. class cmLinkLineComputer;
  24. class cmLocalGenerator;
  25. class cmMakefile;
  26. class cmOutputConverter;
  27. class cmStateDirectory;
  28. class cmake;
  29. enum class cmDepfileFormat;
  30. struct cmDocumentationEntry;
  31. #define FASTBUILD_DOLLAR_TAG "FASTBUILD_DOLLAR_TAG"
  32. #define FASTBUILD_1_INPUT_PLACEHOLDER \
  33. FASTBUILD_DOLLAR_TAG "FB_INPUT_1_PLACEHOLDER" FASTBUILD_DOLLAR_TAG
  34. #define FASTBUILD_1_0_INPUT_PLACEHOLDER \
  35. FASTBUILD_DOLLAR_TAG "FB_INPUT_1_0_PLACEHOLDER" FASTBUILD_DOLLAR_TAG
  36. #define FASTBUILD_1_1_INPUT_PLACEHOLDER \
  37. FASTBUILD_DOLLAR_TAG "FB_INPUT_1_1_PLACEHOLDER" FASTBUILD_DOLLAR_TAG
  38. #define FASTBUILD_2_INPUT_PLACEHOLDER \
  39. FASTBUILD_DOLLAR_TAG "FB_INPUT_2_PLACEHOLDER" FASTBUILD_DOLLAR_TAG
  40. #define FASTBUILD_3_INPUT_PLACEHOLDER \
  41. FASTBUILD_DOLLAR_TAG "FB_INPUT_3_PLACEHOLDER" FASTBUILD_DOLLAR_TAG
  42. // Alias to artifacts that can be consumed by the linker (DLL or Library).
  43. #define FASTBUILD_LINK_ARTIFACTS_ALIAS_POSTFIX "-link-artifacts"
  44. // Alias to all the ObjectList nodes.
  45. #define FASTBUILD_OBJECTS_ALIAS_POSTFIX "-objects"
  46. // Alias to all the dependencies of the target.
  47. #define FASTBUILD_DEPS_ARTIFACTS_ALIAS_POSTFIX "-deps"
  48. #define FASTBUILD_PRE_BUILD_ALIAS_POSTFIX "-pre-build"
  49. #define FASTBUILD_PRE_LINK_ALIAS_POSTFIX "-pre-link"
  50. #define FASTBUILD_POST_BUILD_ALIAS_POSTFIX "-post-build"
  51. // Alias to all other custom commands in the target.
  52. #define FASTBUILD_CUSTOM_COMMAND_ALIAS_POSTFIX "-custom-commands"
  53. // Alias to outputs produced by a custom command (since FASTBuild exec node
  54. // does not support more than 1 output).
  55. #define FASTBUILD_OUTPUTS_ALIAS_POSTFIX "-outputs"
  56. // Alias to byproducts produced by a custom command (since FASTBuild exec node
  57. // does not support more than 1 output).
  58. #define FASTBUILD_BYPRODUCTS_ALIAS_POSTFIX "-byproducts"
  59. #define FASTBUILD_COMPILER_PREFIX "Compiler_"
  60. #define FASTBUILD_LAUNCHER_PREFIX "Launcher_"
  61. #define FASTBUILD_LINKER_LAUNCHER_PREFIX "LinkerLauncher_"
  62. #define FASTBUILD_RESTAT_FILE "FASTBUILD_RESTAT"
  63. #define FASTBUILD_UTIL_CONCURRENCY_GROUP_NAME "Utils"
  64. #define FASTBUILD_ALL_TARGET_NAME "all"
  65. #define FASTBUILD_CLEAN_TARGET_NAME "clean"
  66. #define FASTBUILD_NOOP_FILE_NAME "fbuild_noop"
  67. #define FASTBUILD_CLEAN_FILE_NAME "fbuild_clean-out"
  68. #define FASTBUILD_BUILD_FILE "fbuild.bff"
  69. #define FASTBUILD_DUMMY_OUTPUT_EXTENSION ".fbuild-cc-out"
  70. #if defined(_WIN32)
  71. # define FASTBUILD_SCRIPT_FILE_EXTENSION ".bat"
  72. # define FASTBUILD_SCRIPT_FILE_ARG "/C "
  73. # define FASTBUILD_SCRIPT_CD "cd /D "
  74. # define FASTBUILD_CLEAN_SCRIPT_NAME "clean" FASTBUILD_SCRIPT_FILE_EXTENSION
  75. #else
  76. # define FASTBUILD_SCRIPT_FILE_EXTENSION ".sh"
  77. # define FASTBUILD_SCRIPT_FILE_ARG ""
  78. # define FASTBUILD_SCRIPT_CD "cd "
  79. # define FASTBUILD_CLEAN_SCRIPT_NAME "clean" FASTBUILD_SCRIPT_FILE_EXTENSION
  80. #endif
  81. enum class FastbuildTargetDepType
  82. {
  83. // Order-only dependency that is not going to appear in the generated file.
  84. ORDER_ONLY,
  85. // Regular target dep.
  86. REGULAR,
  87. };
  88. struct FastbuildTargetDep
  89. {
  90. std::string Name;
  91. FastbuildTargetDepType Type = FastbuildTargetDepType::REGULAR;
  92. FastbuildTargetDep(std::string n)
  93. : Name(std::move(n))
  94. {
  95. }
  96. bool operator==(FastbuildTargetDep const& rhs) const
  97. {
  98. return this->Name == rhs.Name;
  99. }
  100. bool operator<(FastbuildTargetDep const& rhs) const
  101. {
  102. return this->Name < rhs.Name;
  103. }
  104. };
  105. enum class FastbuildTargetType
  106. {
  107. ALIAS, // Alias node
  108. EXEC, // Exec node
  109. LINK, // Library, DLL or Executable
  110. OBJECTLIST,
  111. };
  112. struct FastbuildTargetBase
  113. {
  114. // Target name with config postfix.
  115. std::string Name;
  116. // Target name without config postfix, we use it to locate IDE project for
  117. // the given target and add +1 config to it.
  118. std::string BaseName;
  119. std::string BasePath;
  120. std::set<FastbuildTargetDep> PreBuildDependencies;
  121. bool Hidden = true;
  122. FastbuildTargetType Type;
  123. explicit FastbuildTargetBase(FastbuildTargetType TargetType)
  124. : Type(TargetType)
  125. {
  126. }
  127. };
  128. using FastbuildTargetPtrT = std::unique_ptr<FastbuildTargetBase>;
  129. struct FastbuildAliasNode : public FastbuildTargetBase
  130. {
  131. bool ExcludeFromAll = false;
  132. FastbuildAliasNode()
  133. : FastbuildTargetBase(FastbuildTargetType::ALIAS)
  134. {
  135. }
  136. };
  137. struct FastbuildExecNode : public FastbuildTargetBase
  138. {
  139. std::string ExecExecutable;
  140. std::string ExecArguments;
  141. std::string ScriptFile;
  142. std::string ExecWorkingDir;
  143. bool ExecUseStdOutAsOutput = false;
  144. std::string ExecOutput;
  145. std::vector<std::string> ExecInput;
  146. std::vector<std::string> ExecInputPath;
  147. std::vector<std::string> ExecInputPattern;
  148. bool ExecInputPathRecurse = false;
  149. bool ExecAlways = false;
  150. FastbuildAliasNode OutputsAlias;
  151. FastbuildAliasNode ByproductsAlias;
  152. std::string ConcurrencyGroupName;
  153. bool ExcludeFromAll = false;
  154. FastbuildExecNode()
  155. : FastbuildTargetBase(FastbuildTargetType::EXEC)
  156. {
  157. }
  158. bool NeedsDepsCheckExec = false;
  159. };
  160. struct FastbuildCompiler
  161. {
  162. std::map<std::string, std::string> ExtraVariables;
  163. std::string Name;
  164. std::string Executable;
  165. std::string CmakeCompilerID;
  166. std::string CmakeCompilerVersion;
  167. std::string Language;
  168. std::vector<std::string> ExtraFiles;
  169. bool UseLightCache = false;
  170. // Only used for launchers.
  171. std::string Args;
  172. bool DontUseEnv = false;
  173. };
  174. struct FastbuildObjectListNode : public FastbuildTargetBase
  175. {
  176. std::string Compiler;
  177. std::string CompilerOptions;
  178. std::string CompilerOutputPath;
  179. std::string CompilerOutputExtension;
  180. std::string PCHInputFile;
  181. std::string PCHOutputFile;
  182. std::string PCHOptions;
  183. std::vector<std::string> CompilerInputFiles;
  184. bool AllowCaching = true;
  185. bool AllowDistribution = true;
  186. std::set<std::string> ObjectOutputs;
  187. std::set<std::string> ObjectDepends;
  188. // Apple only.
  189. std::string arch;
  190. FastbuildObjectListNode()
  191. : FastbuildTargetBase(FastbuildTargetType::OBJECTLIST)
  192. {
  193. }
  194. };
  195. struct IDEProjectConfig
  196. {
  197. std::string Config;
  198. std::string Target;
  199. // VS only.
  200. std::string Platform;
  201. std::string XCodeBaseSDK;
  202. std::string XCodeDebugWorkingDir;
  203. std::string XCodeIphoneOSDeploymentTarget;
  204. };
  205. struct IDEProjectCommon
  206. {
  207. std::string Alias;
  208. std::string ProjectOutput;
  209. std::string ProjectBasePath;
  210. std::vector<IDEProjectConfig> ProjectConfigs;
  211. };
  212. struct XCodeProject : public IDEProjectCommon
  213. {
  214. };
  215. struct VCXProject : public IDEProjectCommon
  216. {
  217. std::string folder;
  218. };
  219. struct FastbuildLinkerNode
  220. {
  221. enum
  222. {
  223. EXECUTABLE,
  224. SHARED_LIBRARY,
  225. STATIC_LIBRARY,
  226. NONE
  227. } Type = NONE;
  228. std::string Name;
  229. std::string Compiler;
  230. std::string CompilerOptions;
  231. std::string Linker;
  232. std::string LinkerType;
  233. std::string LinkerOutput;
  234. std::string LinkerOptions;
  235. std::vector<std::string> LibrarianAdditionalInputs;
  236. // We only use Libraries2 for tracking dependencies.
  237. std::vector<std::string> Libraries2;
  238. std::set<std::string> PreBuildDependencies;
  239. bool LinkerLinkObjects = false;
  240. std::string LinkerStampExe;
  241. std::string LinkerStampExeArgs;
  242. // Apple only.
  243. std::string Arch;
  244. };
  245. struct FastbuildCopyNode
  246. {
  247. std::string Name;
  248. std::string Source;
  249. std::string Dest;
  250. std::string PreBuildDependencies;
  251. bool CopyDir = false;
  252. };
  253. struct FastbuildExecNodes
  254. {
  255. std::vector<FastbuildExecNode> Nodes;
  256. FastbuildAliasNode Alias;
  257. };
  258. struct FastbuildTarget : public FastbuildTargetBase
  259. {
  260. std::map<std::string, std::string> Variables;
  261. std::vector<FastbuildObjectListNode> ObjectListNodes;
  262. // Potentially multiple libs for different archs (apple only);
  263. std::vector<FastbuildLinkerNode> LinkerNode;
  264. std::string RealOutput;
  265. FastbuildAliasNode PreBuildExecNodes, ExecNodes;
  266. std::vector<FastbuildAliasNode> AliasNodes;
  267. // This alias must be written before all other nodes, since they might need
  268. // to refer to it.
  269. FastbuildAliasNode DependenciesAlias;
  270. std::vector<FastbuildCopyNode> CopyNodes;
  271. FastbuildExecNodes PreLinkExecNodes;
  272. FastbuildExecNodes PostBuildExecNodes;
  273. bool IsGlobal = false;
  274. bool ExcludeFromAll = false;
  275. bool AllowDistribution = true;
  276. FastbuildTarget()
  277. : FastbuildTargetBase(FastbuildTargetType::LINK)
  278. {
  279. }
  280. void GenerateAliases();
  281. };
  282. class cmGlobalFastbuildGenerator : public cmGlobalCommonGenerator
  283. {
  284. public:
  285. cmGlobalFastbuildGenerator(cmake* cm);
  286. void ProcessEnvironment();
  287. static std::unique_ptr<cmGlobalGeneratorFactory> NewFactory();
  288. void Generate() override;
  289. bool FindMakeProgram(cmMakefile* mf) override;
  290. void EnableLanguage(std::vector<std::string> const& lang, cmMakefile* mf,
  291. bool optional) override;
  292. bool IsFastbuild() const override { return true; }
  293. std::vector<GeneratedMakeCommand> GenerateBuildCommand(
  294. std::string const& makeProgram, std::string const& projectName,
  295. std::string const& projectDir, std::vector<std::string> const& targetNames,
  296. std::string const& config, int jobs, bool verbose,
  297. cmBuildOptions buildOptions = cmBuildOptions(),
  298. std::vector<std::string> const& makeOptions =
  299. std::vector<std::string>()) override;
  300. std::unique_ptr<cmLocalGenerator> CreateLocalGenerator(
  301. cmMakefile* makefile) override;
  302. std::string GetName() const override
  303. {
  304. return cmGlobalFastbuildGenerator::GetActualName();
  305. }
  306. bool IsMultiConfig() const override { return false; }
  307. bool SupportsCustomObjectNames() const override { return false; }
  308. void ComputeTargetObjectDirectory(cmGeneratorTarget*) const override;
  309. void AppendDirectoryForConfig(std::string const& prefix,
  310. std::string const& config,
  311. std::string const& suffix,
  312. std::string& dir) override;
  313. static std::string GetActualName() { return "FASTBuild"; }
  314. static std::string RequiredFastbuildVersion() { return "1.14"; }
  315. // Setup target names
  316. char const* GetAllTargetName() const override
  317. {
  318. return FASTBUILD_ALL_TARGET_NAME;
  319. }
  320. char const* GetInstallTargetName() const override { return "install"; }
  321. char const* GetCleanTargetName() const override
  322. {
  323. return FASTBUILD_CLEAN_TARGET_NAME;
  324. }
  325. char const* GetInstallLocalTargetName() const override
  326. {
  327. return "install/local";
  328. }
  329. char const* GetInstallStripTargetName() const override
  330. {
  331. return "install/strip";
  332. }
  333. char const* GetInstallParallelTargetName() const
  334. {
  335. return "install/parallel";
  336. }
  337. char const* GetTestTargetName() const override { return "test"; }
  338. char const* GetPackageTargetName() const override { return "package"; }
  339. char const* GetPackageSourceTargetName() const override
  340. {
  341. return "package_source";
  342. }
  343. char const* GetRebuildCacheTargetName() const override
  344. {
  345. return "rebuild_cache";
  346. }
  347. char const* GetCMakeCFGIntDir() const override { return "."; }
  348. /// Overloaded methods. @see cmGlobalGenerator::GetDocumentation()
  349. static cmDocumentationEntry GetDocumentation();
  350. static bool SupportsToolset() { return false; }
  351. static bool SupportsPlatform() { return false; }
  352. bool IsIPOSupported() const override { return true; }
  353. void OpenBuildFileStream();
  354. void CloseBuildFileStream();
  355. std::vector<std::string> const& GetConfigNames() const;
  356. bool Open(std::string const& bindir, std::string const& projectName,
  357. bool dryRun) override;
  358. std::string ConvertToFastbuildPath(std::string const& path) const;
  359. std::unique_ptr<cmLinkLineComputer> CreateLinkLineComputer(
  360. cmOutputConverter* outputConverter,
  361. cmStateDirectory const& /* stateDir */) const override;
  362. bool SupportsCustomCommandDepfile() const override { return true; }
  363. cm::optional<cmDepfileFormat> DepfileFormat() const override
  364. {
  365. return cm::nullopt;
  366. }
  367. static std::string Quote(std::string const& str,
  368. std::string const& quotation = "'");
  369. static std::string QuoteIfHasSpaces(std::string str);
  370. template <class T>
  371. static std::vector<std::string> Wrap(T const& in,
  372. std::string const& prefix = "'",
  373. std::string const& suffix = "'",
  374. bool escape_dollar = true);
  375. void WriteDivider();
  376. void WriteComment(std::string const& comment, int indent = 0);
  377. /// Write @a count times INDENT level to output stream @a os.
  378. void Indent(int count);
  379. void WriteVariable(std::string const& key, std::string const& value,
  380. std::string const& op, int indent = 0);
  381. void WriteVariable(std::string const& key, std::string const& value,
  382. int indent = 0);
  383. void WriteCommand(std::string const& command,
  384. std::string const& value = std::string(), int indent = 0);
  385. void WriteArray(std::string const& key,
  386. std::vector<std::string> const& values, int indent = 0);
  387. void WriteStruct(
  388. std::string const& name,
  389. std::vector<std::pair<std::string, std::string>> const& variables,
  390. int indent = 0);
  391. void WriteArray(std::string const& key,
  392. std::vector<std::string> const& values,
  393. std::string const& op, int indent = 0);
  394. template <typename T>
  395. std::vector<std::string> ConvertToFastbuildPath(T const& container) const
  396. {
  397. std::vector<std::string> ret;
  398. ret.reserve(container.size());
  399. for (auto const& path : container) {
  400. ret.push_back(ConvertToFastbuildPath(path));
  401. }
  402. return ret;
  403. }
  404. // Wrapper to sort array of conforming structs (which have .Name
  405. // and .PreBuildDependencies fields).
  406. template <class T>
  407. static void TopologicalSort(std::vector<T>& nodes)
  408. {
  409. static_assert(std::is_base_of<FastbuildTargetBase, T>::value,
  410. "T must be derived from FastbuildTargetBase");
  411. std::vector<FastbuildTargetPtrT> tmp;
  412. tmp.reserve(nodes.size());
  413. for (auto& node : nodes) {
  414. tmp.emplace_back(cm::make_unique<T>(std::move(node)));
  415. }
  416. nodes.clear();
  417. TopologicalSort(tmp);
  418. for (auto& node : tmp) {
  419. nodes.emplace_back(std::move(static_cast<T&>(*node)));
  420. }
  421. }
  422. // Stable topological sort.
  423. static void TopologicalSort(std::vector<FastbuildTargetPtrT>& nodes);
  424. void WriteDisclaimer();
  425. void WriteEnvironment();
  426. void WriteSettings();
  427. void WriteCompilers();
  428. void WriteTargets();
  429. void WriteTarget(FastbuildTarget const& target);
  430. void WriteExec(FastbuildExecNode const& Exec, int indent = 1);
  431. void WriteObjectList(FastbuildObjectListNode const& ObjectList,
  432. bool allowDistribution);
  433. void WriteLinker(FastbuildLinkerNode const&, bool);
  434. void WriteAlias(FastbuildAliasNode const& Alias, int indent = 1);
  435. void WriteCopy(FastbuildCopyNode const& Copy);
  436. void WriteIDEProjects();
  437. void WriteVSBuildCommands();
  438. void WriteXCodeBuildCommands();
  439. void WriteIDEProjectCommon(IDEProjectCommon const& project);
  440. void WriteIDEProjectConfig(std::vector<IDEProjectConfig> const& configs,
  441. std::string const& keyName = "ProjectConfigs");
  442. void WriteSolution();
  443. void WriteXCodeTopLevelProject();
  444. void WriteTargetRebuildBFF();
  445. void WriteCleanScript();
  446. void WriteTargetClean();
  447. void AddTargetAll();
  448. void AddGlobCheckExec();
  449. void AddCompiler(std::string const& lang, cmMakefile* mf);
  450. void AddLauncher(std::string const& prefix, std::string const& launcher,
  451. std::string const& lang, std::string const& args);
  452. void AddIDEProject(FastbuildTarget const& target, std::string const& config);
  453. template <class T>
  454. void AddTarget(T target)
  455. {
  456. // Sometimes equivalent CCs are added to different targets. We try to
  457. // de-dup it by assigning all execs a name which is a hash computed based
  458. // on various properties (like input, output, deps.). Apparently, there are
  459. // still some CCs intersection between different targets.
  460. auto val = AllGeneratedCommands.emplace(target.Name);
  461. if (val.second) {
  462. FastbuildTargets.emplace_back(cm::make_unique<T>(std::move(target)));
  463. }
  464. // Get the intersection of CC's deps. Just mimicking what
  465. // cmLocalNinjaGenerator::WriteCustomCommandBuildStatement does. (I don't
  466. // think it's right in general case, each CC should be added only to 1
  467. // target, not to multiple )
  468. else {
  469. auto it =
  470. std::find_if(FastbuildTargets.begin(), FastbuildTargets.end(),
  471. [&target](FastbuildTargetPtrT const& existingTarget) {
  472. return existingTarget->Name == target.Name;
  473. });
  474. assert(it != FastbuildTargets.end());
  475. std::set<FastbuildTargetDep> intersection;
  476. std::set_intersection(
  477. target.PreBuildDependencies.begin(), target.PreBuildDependencies.end(),
  478. (*it)->PreBuildDependencies.begin(), (*it)->PreBuildDependencies.end(),
  479. std::inserter(intersection, intersection.end()));
  480. (*it)->PreBuildDependencies = std::move(intersection);
  481. }
  482. }
  483. static std::string GetExternalShellExecutable();
  484. std::string GetTargetName(cmGeneratorTarget const* GeneratorTarget) const;
  485. cm::optional<FastbuildTarget> GetTargetByOutputName(
  486. std::string const& output) const;
  487. void AskCMakeToMakeRebuildBFFUpToDate(std::string const& workingDir) const;
  488. void ExecuteFastbuildTarget(
  489. std::string const& dir, std::string const& target, std::string& output,
  490. std::vector<std::string> const& fbuildOptions = {}) const;
  491. bool IsExcluded(cmGeneratorTarget* target);
  492. void LogMessage(std::string const& m) const;
  493. void AddFileToClean(std::string const& file);
  494. /// The set of compilers added to the generated build system.
  495. std::map<std::string, FastbuildCompiler> Compilers;
  496. std::vector<FastbuildTargetPtrT> FastbuildTargets;
  497. /// The file containing the build statement.
  498. std::unique_ptr<cmGeneratedFileStream> BuildFileStream;
  499. std::string FastbuildCommand;
  500. std::string FastbuildVersion;
  501. std::map<std::string, std::unique_ptr<cmFastbuildTargetGenerator>> Targets;
  502. std::unordered_set<std::string> AllFoldersToClean;
  503. // Sometime we need to keep some files that are generated only during
  504. // configuration (like .objs files used to create module definition from
  505. // objects).
  506. std::unordered_set<std::string> AllFilesToKeep;
  507. private:
  508. std::unordered_set<std::string> AllFilesToClean;
  509. // https://cmake.org/cmake/help/latest/module/ExternalProject.html#command:externalproject_add_steptargets
  510. std::unordered_set<std::string /*exec name*/> AllGeneratedCommands;
  511. std::unordered_map<std::string /*base target name (without -config)*/,
  512. std::pair<VCXProject, XCodeProject>>
  513. IDEProjects;
  514. // Env that we're going to embed to the generated file.
  515. std::vector<std::string> LocalEnvironment;
  516. };