I have an Xcproject
that I am using to define a .framework
target that includes Objective-C++ bridges for a whole slew of C++ libraries.
To bridge Objective-C++ to Swift code in a separate target, I am using a .modulemap
file that I generate in a script.
So we've essentially got
App.xcproject
App target { Dependency on Bridges.framework }
Bridges.xcproject
Bridges.framework { Dependency on generate-modulemap + a whole slough of c++ libraries }
generate-modulemap
It is VERY expensive for the Bridges framework to need to compile each build. The generation of the bridge static library takes 21 seconds, and the signing of it takes 32 seconds.
I would like to get generate-module
to have its RunScript phase run based on dependency analysis. This way a new modulemap is only made when there is a new header and I can avoid compiling the whole framework each build. Normally, I would just list all of the headers in the input list to the script, but in this case, the goal is more to have it be any file within that folder. However, it is very unclear how to do so. Is there a way to get the "based on dependency analysis" to go based on any file within a folder?
A filelist does not work here because the filelist does not get updated automatically when you add a new header into that folder.