I have a feeling the reason CMake is slow is because it generates recursive makefiles.
Recursive makefiles are a sin. The dependence graph is incomplete because each instance of make only knows about a part of the dependence graph stored in the current makefile being processed. This can lead to lots of problems:
1. race conditions (for manually written makefiles - hopefuly CMake doesn't make such mistakes) 2. *inefficient* (if a bunch of sub projects depends on another common project, the dependence checking will be repeated lots of times)
http://aegis.sourceforge.net/auug97.pdf
I'm guessing Ninja is fast because it uses a whole project makefile? I wish the UNIX makefile backend for CMake can be rewritten to do the same. BTW, a whole project makefile doesn't mean putting everything in 1 file. It would be a bunch of makefiles and helper makefiles joined together using include statements.
I've had the experience of rewriting a set of recursive makefiles to a whole project makefile and 1 big pain was homographic variables overwriting each other. Often in each makefile, we want to access files several directories up, so there would be a variable like TOP_LEVEL = ../../../../
But TOP_LEVEL can be different for each project, so you have to be careful that they don't clash.
For me, a 1 line change takes 30s to build.
On Wed, Mar 1, 2017 at 1:36 PM, Olof Bjarnason <olof.bjarnason@...400...> wrote:
On 1 March 2017 at 22:31, Eduard Braun <eduard.braun2@...173...> wrote:
Am 01.03.2017 um 22:21 schrieb Olof Bjarnason:
What does ninja do more technically? Magic? :D
Cool, sounds like a neat philosophy.
And there's even instructions ready on the wiki!
http://wiki.inkscape.org/wiki/index.php/CMake#Using_CMake_with_Ninja_to_buil...
Here:
mkdir build cd build cmake -G Ninja /path/to/inkscape ninja ninja install
Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel