CMake's XCTest Bundle Macro Sets "Framework Search Path" Attribute in Xcode Causing iOS Simulator Builds to Error at Link Time; It Should Stay Blank
I'm getting linker errors on CMake-generated XCTest bundles. The problem stems from the fact that whenever the "Framework Search Paths" is set, I will get link time errors. I have CMake version 3.15.2 installed.
The root cause is here on XCTest bundles:
This shows that the iPhoneOS folder is set to whatever iPhoneOS SDK frameworks folder, so I'm only getting issues with the iOS Simulator (and not iOS devices).
I've been able to find a workaround though by setting this in my XCTest bundle:
set_property(TARGET <Target> PROPERTIES XCODE_ATTRIBUTE_FRAMEWORK_SEARCH_PATHS " ") # note the space
Setting XCODE_ATTRIBUTE_FRAMEWORK_SEARCH_PATHS
to ""
just does the default action... I think there's something in the iOS cmake toolchain that is setting the "Framework Search Paths" and it's only happening in XCTest Bundles. App Bundles for some reason don't exhibit this behavior, so they are ok.