[CMake] makefile to CMakeLists.txt, possible?

Chiheng Xu chiheng.xu at gmail.com
Thu Sep 2 03:15:38 EDT 2010


On Thu, Sep 2, 2010 at 2:02 PM, Chris Hillery <chillery-cmake at lambda.nu> wrote:
> On Wed, Sep 1, 2010 at 10:17 PM, Chiheng Xu <chiheng.xu at gmail.com> wrote:
>>
>> On Fri, Aug 20, 2010 at 1:11 AM,  <"\"Roman Wüger\"
>> <norulez at me.com>"@mac.com> wrote:
>> > CMake is a Makefile-Generator an nothing else
>> >
>> > Why would you write the Makefiles by yourself?
>> >
>>
>> Perhaps some people don't like the time consuming invocation of CMake.
>>
>> Maybe CMake can generate relocatable Makefiles only containing
>> relative paths for several major platforms,  and developers "cache"
>> the generated relocatable Makefiles in version control systems.  Then
>> builders don't need to invoke CMake.
>
> That's technically possible, but I feel sure it would introduce far more
> problems than it would solve.
>
> It would also rather spectacularly miss the point of CMake. You could
> equally well say "Maybe gcc could generate assembly code for several major
> platforms, and then you could store the generated assembly files in version
> control..."
>

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.





-- 
Chiheng Xu
Wuhan,China


More information about the CMake mailing list