Added support for compilerFlags in source list. If any source file
metadata (like compilerFlags) is attached to a directory the metadata
propagates downwards to all children recursively until the files are
reached.
Files are now processed in the same way as directories in `getSources`
this depends on #108 to not over-eagerly cache groups. The `source` is
propagated as metadata down all the way (thanks @yonaskolb)
Fixtures and unit tests are updated as well.
This commit adds a new option `createIntermediateGroups` that defaults
to false. When it is false, the behavior of XcodeGen is the same as
before. When it is true, we make intermediate groups recursively until
we reach the basePath. In practice that means if you've chosen
`Platform/PINFoundation/Sources` as one of your sourcePaths, you get a
top-level group of `Platform` and under that `PINFoundation` and under
that `Sources`. This is instead of the default behavior of just making
`Sources` a top-level group (which is confusing when your directory is
called `Sources` for example).
The `sources` key of the project spec only supported directories and not
files. Now it supports both!
This commit introduces a `getSourceFiles` overload that doesn't explicitly
invoke `path.children()`, but instead accepts `children` as a parameter.
This allows us to invoke the `children` overload of getSourceFiles with just
the files we want to include (determined by specifying the sources).
Now for sourcePaths that are files, we group by parents before invoking
getSourceFiles in order to reuse the same groups.
This adds a new attribute to Dependency that allows consumers to choose
to not link a dependency. This is useful for if you have this dependency
tree with static libraries:
App -> A -> Shared
App -> B -> Shared
Where A and B both share a static library dependency, that is finally
linked into App. If Shared is added to the link phase of A and B, you
end up with duplicate symbols during the link phase. With this change
consumers could set link: False on A and B's dependency on Shared, this
way Shared will get build before A and B, but not linked.