Cmake is one of the most horrible things I've ever seen. It's basically a program written around makefiles so you can write Cmakefiles instead of makefiles.berkus wrote:Grab cmake or waf and never worry again.
And then it creates makefiles, so you have to run make afterwards.
My current makefile is some 100 lines and figures out what to do all by itself, no cmaking or whatever needed. If you want to port it, GNU make is available for porting.
Well.... no, not really. Make systems are about:Solar wrote:As if any Make would work without checking the timestamps. That's what Make systems are about.
1. Finding out what's changed
2. Finding out the least set of commands to execute to get the up-to-date output given the knowledge from 1.
3. Running those commands with the available parallellism to get the shortest time before completion.
There's no requirement that 1. uses timestamps, it's just the way it's been done so far. Checking 50000 files for timestamps when my editor has just saved 3 and knows which ones they are - and the filesystem has just received those writes so it knows as well - seems a bit of a waste of time.
Given 1., 2. should be a pretty quick run over the makefile (as the makefile is short). 3. is something make does well already (imo).
The only thing whose duration is in terms of the amount of files you have is 1. If you manage to change that to O(1) your build is *always* quick, even if you put the entire OS (and I mean a full-blown OS) in a single makefile.