Skip to content

Commit

Permalink
Fix issue where PCH is set to YES, but the string is blank
Browse files Browse the repository at this point in the history
  • Loading branch information
gcasa committed Apr 20, 2024
1 parent 07e4bd0 commit 7e32c54
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions XCode/PBXFileReference.m
Original file line number Diff line number Diff line change
Expand Up @@ -621,8 +621,10 @@ - (BOOL) buildWithPath: (NSString *)bp
if ([usePCHFlag isEqualToString: @"YES"])
{
NSString *pchFile = [bs objectForKey: @"GCC_PREFIX_HEADER"];

buildTemplate = [buildTemplate stringByAppendingString: [NSString stringWithFormat: @" -include %@", pchFile]];
if (![pchFile isEqualToString: @""] && pchFile != nil)
{
buildTemplate = [buildTemplate stringByAppendingString: [NSString stringWithFormat: @" -include %@", pchFile]];
}
}

NSString *compilePath = bp;
Expand Down

0 comments on commit 7e32c54

Please sign in to comment.