This diff changes the way the native builds are handled during the cmake
build.
The current behavior re-runs the top level cmake list file in the
context of a native build. This causes the build to require all the node
software dependencies in order to build simple generation tools with
little to no dependency. It also causes the build to fail when trying to
build from the depends on platforms that don't satisfy the dependency
requirements.
The approach from this diff is to generate a new project list file for
each native executable, so the scope is restricted to the absolute
minimum. Most of the logic from the current version is maintained in
order to rebuild the native targets as needed thanks to the depfiles.
Some key advantages:
1/ During crosscompilation it is no longer necessary to satisfy the dependencies on the host platform;
2/ It is no longer necessary to forward cmake arguments from the main build to the native build;
3/ As a consequence to 2, there is no need to postpone the generation to the end of the cmake lists parsing;
4/ Faster first build (half the cmake configuration time)
5/ Less code to maintain.
Out of scope for this diff:
- The Gitian builds can be cleaned from the host dependencies.