ConfettiFX / The-Forge

The Forge Cross-Platform Rendering Framework PC Windows, Steamdeck (native), Ray Tracing, macOS / iOS, Android, XBOX, PS4, PS5, Switch, Quest 2
Apache License 2.0
4.75k stars 497 forks source link

Fix Xcode 13.1 macOS compile error #237

Closed Michael-Lfx closed 2 years ago

Michael-Lfx commented 2 years ago

macOS compile error: cannot synthesize weak property in file using manual reference counting

The The-Forge.xcodeproj has set Weak References in Manual Retain Release (CLANG_ENABLE_OBJC_WEAK) to YES.

Following the step I try to add set(CMAKE_XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_WEAK "YES") to CMakeLists.txt which does not fix the above error.

Back to origin assign equals to weak here.

Moreover new project created by Xcode 13 shows the default value of Weak References in Manual Retain Release (CLANG_ENABLE_OBJC_WEAK) is NO.

wolfgangfengel commented 2 years ago

We only support one XCode version. We can not fix compiler bugs for a large number of different versions. Our time is better spent on developing the framework.

unphased commented 2 years ago

FWIW, I was surprised to find that on Xcode 13.2.1 on macOS 12.2.1 (M1 Max) I'm able to run at least the Transformations unit test without any code modification!