[CMake] makefile to CMakeLists.txt, possible?

Chiheng Xu chiheng.xu at gmail.com
Thu Sep 2 03:49:06 EDT 2010


On Thu, Sep 2, 2010 at 3:32 PM, Mike McQuaid <mike at mikemcquaid.com> wrote:
>
> On 2 Sep 2010, at 08:15, Chiheng Xu wrote:
>
>> CMake is a very great tool.    But its drawback is also obvious.    It
>> will consume large amount of time to generate Makefiles every time you
>> want to build,  especially for ultra large projects.   Building can be
>> parallelized, but the CMaking, like runing configure scripts, can't be
>> parallelized.   So, the "caching" of Makefiles seems benefitial  for
>> current and future mutil-cores systems.
>>
>> Normal developers seldomly touch CMakeLists.txt.  So,  in very rare
>> condition, you need to regenerate the Makefiles.
>
> That's why the files are cached on your local machine. I've seen some pretty huge CMake projects and I've never seen it take more than a few minutes to generate the Makefiles. I don't see why you have to keep them in version control.
>
> Most projects I've worked on don't keep any generated files in version control, be it from the makefile generator, code generator or binary files.
>

Suppose you have a ultra large project,  it will consume 5 minutes to
CMake,  2 hours to build serially.  If you have an 64 Cores ccNUMA
systems, like Xeon 7500 (8 Cores * 8),  theretically, you will have a
60+ accelaration in parallel build.  Theretically,  it will consume
less than 2 minutes to parallelly build, but it will also consume 5
minutes to serially CMake.  So, If you "cache" the Makefiles, it will
only consume less than 2 minutes to build.





-- 
Chiheng Xu
Wuhan,China


More information about the CMake mailing list