diff options
author | Brad King <brad.king@kitware.com> | 2017-11-01 12:02:11 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-11-01 12:02:15 (GMT) |
commit | cdc9c110a5bbe82d761f1a6d58b202a41b245de6 (patch) | |
tree | c09f0531a7cb7c19d8f44c5a6a54b426e76da727 /Source/cmGlobalXCodeGenerator.cxx | |
parent | 4857aec5d5bdee608d0e4fcf1a921de2a1c1b89c (diff) | |
parent | e4e9ce7cbe9b41dd535d5246153900cb9657c6ba (diff) | |
download | CMake-cdc9c110a5bbe82d761f1a6d58b202a41b245de6.zip CMake-cdc9c110a5bbe82d761f1a6d58b202a41b245de6.tar.gz CMake-cdc9c110a5bbe82d761f1a6d58b202a41b245de6.tar.bz2 |
Merge topic '16780-write-single-xcodeproj'
e4e9ce7c Xcode: Add option to generate only topmost project file
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1395
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 97e461d..a85a700 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -388,6 +388,17 @@ void cmGlobalXCodeGenerator::Generate() std::map<std::string, std::vector<cmLocalGenerator*>>::iterator it; for (it = this->ProjectMap.begin(); it != this->ProjectMap.end(); ++it) { cmLocalGenerator* root = it->second[0]; + + bool generateTopLevelProjectOnly = + root->GetMakefile()->IsOn("CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY"); + + if (generateTopLevelProjectOnly) { + cmStateSnapshot snp = root->GetStateSnapshot(); + if (snp.GetBuildsystemDirectoryParent().IsValid()) { + continue; + } + } + this->SetGenerationRoot(root); // now create the project this->OutputXCodeProject(root, it->second); |