Recursive build dependencies with new build system

Hi all,


I have an Xcode 10.2 workspace with 3 projects: DeepLib, DirectLib, and App. libDeepLib.a is linked with DirectLib, and libDirectLib.a is linked with App. Using the new build system, I can't make Xcode to rebuild both DirectLib and App when I modify a source file in DeepLib (this was OK with the legacy build system).


I have tried this:


- enabling "Find Implicit Dependencies" in the scheme


- adding DeepLib and DirectLib before App, in the Build pane of the scheme, checking all checkboxes


- adding explicit dependencies by adding DeepLib.xcodeproj to DirectLib, then add DeepLib in DirectLib's target dependencies build phase; and the same with DirectLib and App


What should I do? I'd rather avoid linking DeepLib to App directly, as DirectLib is designed to hide DeepLib to the client application. And of course, I'd like to avoid cleaning the build folder for each build.


Thanks!

>this was OK with the legacy build system


I'll bite...is there some reason you don't simply disable 'new build system'? I believe your dependency issue was a bug w/Xcode 10.x, so that may be your only current solution.


>I'd like to avoid cleaning the build folder for each build.


When Xcode builds the first time, it creates indexed data that is used for that build. When you build again, it refers to that data in an attempt to speed things up.


You can't stop it from indexing build data, but manually deleting derived data/option-cleaning the build folder forces it to re-index and not use otherwise stale data.


>Xcode 10.2 workspace with...


Suggest you move to Xcode 10.2.1 just so you're level w/support etc. At least to it to see if the bug (?) has been remedied.

Recursive build dependencies with new build system
 
 
Q