diff options
author | Brad King <brad.king@kitware.com> | 2020-01-28 16:04:45 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-01-28 16:05:17 (GMT) |
commit | 7706b6a71406b535ffe2f707647126eac4a8c767 (patch) | |
tree | 46e09b93fa4a482a9df9f60c71a55c98e5d728ad /Source | |
parent | ee5edfbda22262a67f630bd83d5494c2ba0d7f44 (diff) | |
parent | 64304fe72b2956937b3e0916284aec1efa4dca78 (diff) | |
download | CMake-7706b6a71406b535ffe2f707647126eac4a8c767.zip CMake-7706b6a71406b535ffe2f707647126eac4a8c767.tar.gz CMake-7706b6a71406b535ffe2f707647126eac4a8c767.tar.bz2 |
Merge topic 'xcode-top-level-only-with-object-library'
64304fe72b Xcode: Fix post build script for 'top level project only' opt
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4284
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index da56f3f..3d5c9c4 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -528,7 +528,8 @@ void cmGlobalXCodeGenerator::AddExtraTargets( root->GetMakefile()->IsOn("CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY"); bool isTopLevel = !root->GetStateSnapshot().GetBuildsystemDirectoryParent().IsValid(); - if (regenerate && (isTopLevel || !generateTopLevelProjectOnly)) { + bool isGenerateProject = isTopLevel || !generateTopLevelProjectOnly; + if (regenerate && isGenerateProject) { this->CreateReRunCMakeFile(root, gens); std::string file = this->ConvertToRelativeForMake(this->CurrentReRunCMakeMakefile); @@ -558,7 +559,8 @@ void cmGlobalXCodeGenerator::AddExtraTargets( // run the depend check makefile as a post build rule // this will make sure that when the next target is built // things are up-to-date - if (target->GetType() == cmStateEnums::OBJECT_LIBRARY) { + if (isGenerateProject && + target->GetType() == cmStateEnums::OBJECT_LIBRARY) { commandLines.front().back() = // fill placeholder this->PostBuildMakeTarget(target->GetName(), "$(CONFIGURATION)"); gen->AddCustomCommandToTarget( |