Posts

Post not yet marked as solved
3 Replies
11k Views
I've got a decent size project with 10 or so dependencies. I've just switched to Xcode 11 and moved all the modules I can from using Carthage to the new SPM support in Xcode.One of my dependencies is https://github.com/iwasrobbed/Down.git a common markdown parser. It includes libcmark, a C library. After cleaning my build folder, the only module map is./SourcePackages/checkouts/Down/Source/cmark/include/module.modulemapThe first build works, but now find returns./SourcePackages/checkouts/Down/Source/cmark/include/module.modulemap ./Build/Intermediates.noindex/Down.build/Debug/libcmark.build/libcmark.modulemapAfter making a change to the source code and recompiling, the same two modulemaps are there, but I get the error/Users/mlilback/Library/Developer/Xcode/DerivedData/Rc2Client-bqmhvrpuhrtqjdfbdeqbqzhmotdc/Build/Intermediates.noindex/GeneratedModuleMaps/macosx/libcmark.modulemap:1:8: error: redefinition of module 'libcmark' module libcmark { ^ /Users/mlilback/Library/Developer/Xcode/DerivedData/Rc2Client-bqmhvrpuhrtqjdfbdeqbqzhmotdc/SourcePackages/checkouts/Down/Source/cmark/include/module.modulemap:1:8: note: previously defined here module libcmark [system][extern_c] { ^This makes no sense to me. Why does it compile the first time? What can I do to avoid constantly having to clean the build folder and wait for a fresh build?
Posted
by mlilback.
Last updated
.
Post not yet marked as solved
4 Replies
8.9k Views
I have a library added to my project added as a SPM dependeny. My project has multiple targets that the main app is dependent on. However, a target won't compile without linking to the static library. But if mulitple targets need to reference it, it is included in each target giving runtime warnings that it doesn't know which version to use.Is there a way for multiple targets included in a master target to reference a static package generated by SPM?The only I can think of is to create a framework target that includes the static package, and then link to that from all the modules. But that defeates the whole idea of SPM generating static libraries.
Posted
by mlilback.
Last updated
.
Post not yet marked as solved
1 Replies
986 Views
Using Xcode 11.3 on Mojhave. I have a project that includes a number of packages via SPM integration. I'd like to change one imported package to always compile in release mode, even for debug builds (that package is 3x faster in release mode).Is this possible?
Posted
by mlilback.
Last updated
.