Post

Replies

Boosts

Views

Activity

Xcode new build system doesn't recognize relative paths for error/warning clickthrough
When we switched from the old to new build system, that broke all of our error/warning clickthrough to headers. These are reported as ../../folder/file.h but clicking on the messages doesn't bring up the offending line. The .cpp files clickthrough fine, since they are full paths. My understanding is that the old build system resolve these to full paths, and the new build system does not. What is the solution here? Our Visual Studio projects work and VC++ has a compile option /Fc to force full paths in all diagnostic message.
0
0
455
Mar ’21
xcodebuild clean fails with CMake and custom build directories on new build system
CMake calls through to xcodebuild clean, but this fails since custom build directories are set. The current workaround is to have to trash the entire CMake build folder. With many subprojects this then takes a long time to rebuild. Can Apple please fix this? Here I have a project with multiple targets (a fake workspace). CMake can only generate xcprojects and not xcworkspace files. Visual Studio and Android Studio both integrate CMake into the IDE. But building iOS and macOS universal apps is still not simple with CMake. Can Xcode team support CMake better in general? cmake --build . --target clean  xcodebuild -project foo.xcodeproj clean -target ALL_BUILD -parallelizeTargets -configuration Debug -hideShellScriptEnvironment Command line invocation:   xcodebuild -project foo.xcodeproj clean -target ALL_BUILD -parallelizeTargets -configuration Debug -hideShellScriptEnvironment User defaults from command line:   HideShellScriptEnvironment = YES note: Using new build system note: Building targets in parallel error: Could not delete `build/lib` because it was not created by the build system. error: Could not delete `build/app1` because it was not created by the build system. error: Could not delete `build/app2` because it was not created by the build system. warning: Refusing to delete `build` because it contains one of the projects in this workspace: `build/foo.xcodeproj`. CLEAN FAILED
1
0
2.3k
Mar ’21
How to enable Rez in Xcode 12.2
The Adobe C++ plugin SDK are still using Rez to compile resources on macOS and winOS. But Rez build settings are missing from my newly created project. They exist in a legacy project. How does one re-enable this functionality. I don't know that Apple has offered an alternative to file-based resource generation, so removing this functionality seems premature. The help and man pages on Rez are missing a lot. What to supply for arch (x86_64)? Why do I have to supply the framework path to Xcode to find Carbon.r and CoreServices.r? Rez itself provides only the barest of command line usage details. For example, I couldn't get .r includes to work with -i or -s, but it works with -I. But the resulting .rsrc file that is generated by my command line efforts is 0 sized. The one built from Xcode is 1.5KB (correct). Also SIP was blocking all attempts to debug these plugins, but a workaround was found for that.
1
1
1.1k
Mar ’21
Xcode defaults ARC to off. CMake-based builds leak large amounts of memory.
I was working on a macOS ObjC++ tool that allocated and then replaced a single MTLTexture, and noted that all of the textures were leaked. This project was built with CMake, and I found out the Xcode defaults ARC to off. ARC has been around long enough that I can't think of many ObjC or Swift projects that would work without it. This default should probably be changed. The workaround for now, is in all CMakeLists.txt files, to set the following:   XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES   
3
0
1.9k
Feb ’21