Skip to content

Commit

Permalink
Merge branch 'fix-xcode-fastbuild-firsttargetnotused' into 'main'
Browse files Browse the repository at this point in the history
Fix xcode project generation for fastbuild targets when a project is only used...

See merge request Sharpmake/sharpmake!588
  • Loading branch information
jspelletier committed Dec 13, 2024
2 parents 7778937 + 457d133 commit 5356e9b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Sharpmake.Generators/Apple/XCodeProj.cs
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,12 @@ private void PrepareSections(XCodeGenerationContext context, List<Project.Config
}

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

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

0 comments on commit 5356e9b

Please sign in to comment.