Skip to content

Commit 5356e9b

Browse files
committed
Merge branch 'fix-xcode-fastbuild-firsttargetnotused' into 'main'
Fix xcode project generation for fastbuild targets when a project is only used... See merge request Sharpmake/sharpmake!588
2 parents 7778937 + 457d133 commit 5356e9b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Sharpmake.Generators/Apple/XCodeProj.cs

+6
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,12 @@ private void PrepareSections(XCodeGenerationContext context, List<Project.Config
546546
}
547547

548548
var firstConf = targetConfigurations.First();
549+
// Adjust fastbuild target
550+
if (firstConf.IsFastBuild)
551+
{
552+
// Handle cases where a configuration is using fastbuild but not all configurations are using it(and the first one is not using it)
553+
firstConf = targetConfigurations.FirstOrDefault(conf => conf.FastBuildMasterBffList.Any(), targetConfigurations[0]);
554+
}
549555

550556
bool canIncludeSourceFiles = !firstConf.IsFastBuild || firstConf.Output != Project.Configuration.OutputType.AppleApp || !firstConf.XcodeUseNativeProjectForFastBuildApp;
551557
if (canIncludeSourceFiles)

0 commit comments

Comments
 (0)