Re: sukender: curl/src CMakeLists.txt,NONE,1.1
Date: Tue, 07 Apr 2009 11:18:48 +0400
* Daniel Stenberg <daniel_at_haxx.se> [Mon, 6 Apr 2009 23:40:59 +0200
> 1. building 'curl' fails on Linux with two different problems:
I suppose this problem is solved by now (succeeded to compile curl on
Linux this morning).
> 2. Why are all object files named .c.o and not just .o as traditional?
This is CMake specific. They have a rationale behind it: CMake must be
able to build mixed C/C++ projects. Thus, if there are two files named,
say, 'file.c' and 'file.cc', they would both produce the same output
file 'file.o', which is troublesome. So they decided to produce
'file.c.o' and 'file.cc.o', respectively.
For me, the reason is somewhat far-fetched, but I really don't care
about the names of object files.
> 3. How come the build goes further (and builds lib5* tools) when I run
> 'make -j' ? Isn't the output files safe for parallell builds?
This is normal.
'make -j' means "start one job for every possible target". CMake
generates simple Makefiles, where all targets are in a tree; thus, 'make
-j' launches as many jobs as possible. When build fails, 'make' waits
for this horde of jobs to finish - this looks like the build goes on.
Automake generates 'complex' Makefiles: those Makefiles that reside in
subdirectories are not included into root Makefile directly; rather, the
root Makefile uses a shell 'for' loop. As a result, subdirectories are
built sequentially. If the build fails, there are far fewer jobs for
'make' to wait for. :)
-- tetetest tetetest.Received on 2009-04-07