summaryrefslogtreecommitdiff
path: root/Source/cmGlobalXCodeGenerator.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-09-14 11:52:31 -0400
committerBrad King <brad.king@kitware.com>2020-09-18 12:49:17 -0400
commit2db623f554d5522350214a7c5bacd5ec2dec1b34 (patch)
tree27da28d96274f726e195d216199fd949005a0930 /Source/cmGlobalXCodeGenerator.h
parent3ab18c870dc00499f33a40a193e95cc4e1df54ba (diff)
downloadcmake-2db623f554d5522350214a7c5bacd5ec2dec1b34.tar.gz
Xcode: Add option to specify build system variant
Extend the `-T <toolset>` option to support a `buildsystem=` field with the Xcode generator. Add a `CMAKE_XCODE_BUILD_SYSTEM` variable to inform project code about the selected build system variant.
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.h')
-rw-r--r--Source/cmGlobalXCodeGenerator.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index 4e686822ba..bbf3ee915c 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -113,11 +113,20 @@ public:
cmMakefile* mf) override;
void AppendFlag(std::string& flags, std::string const& flag) const;
+ enum class BuildSystem
+ {
+ One = 1,
+ };
+
protected:
void AddExtraIDETargets() override;
void Generate() override;
private:
+ bool ParseGeneratorToolset(std::string const& ts, cmMakefile* mf);
+ bool ProcessGeneratorToolsetField(std::string const& key,
+ std::string const& value, cmMakefile* mf);
+
cmXCodeObject* CreateOrGetPBXGroup(cmGeneratorTarget* gtgt,
cmSourceGroup* sg);
cmXCodeObject* CreatePBXGroup(cmXCodeObject* parent,
@@ -254,6 +263,8 @@ protected:
std::vector<std::unique_ptr<cmXCodeObject>> XCodeObjects;
cmXCodeObject* RootObject;
+ BuildSystem XcodeBuildSystem = BuildSystem::One;
+
private:
std::string const& GetXcodeBuildCommand();
std::string FindXcodeBuildCommand();