dead code in CMakeLists.txt
Author: jasonbobierCreated Sep 17, 2026Updated Sep 17, 2026
While working with Claude to understand the cmake file in order to create the Package.swift, it flagged this dead code:
CMakeLists.txt:2676: dead set_property on an unassigned variable
set_property(SOURCE ${MFI_JOYSTICK_SOURCES} APPEND_STRING PROPERTY COMPILE_FLAGS " -fobjc-weak") — MFI_JOYSTICK_SOURCES is never assigned anywhere in CMakeLists.txt or cmake/, so it expands empty and the flag reaches nothing. Either the variable should be set to src/joystick/apple/*.m, or the line should go. Minor, but it means MFI joystick code silently isn't getting -fobjc-weak on any platform.My understanding is that this is all built under arc anyway (it is all built under arc by swiftpm in my branch and works well), so that flag isn't even needed. I didn't dig hard on this, but worth a look by whoever maintains the CMakeLists.txt file.
Source: libsdl-org/SDL