cmake Ninja vs Makefile.
Hello, This is not really an issue, just to get interesting informations about cmake with Ninja.
DETAILS:
I have a large project: MAIN_EXE depends of ~20 EXES and depends of ~40 static LIBRARIES. Each library can have ~3000 fortran sources files.
BEHAVIOUR:
When I compile my MAIN_EXE (with cmake, ninja), because lot of dependencies :
- It runs all preprocess sources of LIBRARY_1 (-pp.f90), then compile these sources (.o), then link LIBRARY_1.
- After that, It runs all preprocess sources of LIBRARY_2 (-pp.f90), then compile these sources (.o), then link LIBRARY_2...
With the same parallel option (-j 24), for the first compilation, MAIN_EXE was compiled in ~30min with Makefile, ~1h with Ninja. But the advantage with Ninja is, when it is already compiled the re-run step is faster.
QUESTIONS:
Can I speed up my preprocess step with ninja ? How can I reduce this long time (~1h) ? Can I can get a tool with fast first compilation step (advantage Makefile) AND fast re-run compilation step (advantage Ninja) ?
Thank you for your help, Julien