mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-01 03:29:18 -05:00
Xcode: Fix post build script for 'top level project only' opt
When CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY is set on Xcode generator created post build scripts which tried to call XCODE_DEPEND_HELPER.make script in subproject. But XCODE_DEPEND_HELPER.make don't exist in subprojects when mentioned option is set on. Fixes: #20262
This commit is contained in:
committed by
Brad King
parent
33e7bd66c0
commit
64304fe72b
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user