Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CMake: Add risky workaround for archiving dSYMs with an Xcode project
CMake by default generates an Xcode project with an overridden CONFIGURATION_BUILD_DIR Xcode attribute pointing to an absolute path build dir. Due to a bug in Xcode, that causes dSYMs not to be included in an xcarchive after invoking the Xcode archiving task. This can be worked around by re-setting the CONFIGURATION_BUILD_DIR attribute to have the value "$(inherited)". That ensures that Xcode places the dSYMs into an expected location, that can then be included in an xcarchive. Unfortunately overriding CONFIGURATION_BUILD_DIR breaks certain CMake build path preconditions, which can result in broken behavior like $<TARGET_FILE:app> genex evaluation not working, as well as ignoring of the CMAKE_RUNTIME_OUTPUT_DIRECTORY property. So modifying the CONFIGURATION_BUILD_DIR can only be done as an opt-in, where the project developer knows the risks and can decide if it will affect the project. The project can opt into the risky fix by setting the QT_USE_RISKY_DSYM_ARCHIVING_WORKAROUND cmake variable to ON before creating any targets using qt_add_executable. If Xcode fixes this bug in the future, we can make the variable a no-op when we detect a new enough Xcode version. Pick-to: 6.7 6.8 Task-number: QTBUG-126866 Change-Id: I37e8dee569fc45654f149219b8933769ed237fda Reviewed-by: Alexey Edelev <[email protected]>
- Loading branch information