[CMake] Xcode generator problems

Axel Roebel Axel.Roebel at ircam.fr
Tue May 2 10:55:26 EDT 2006


On Tuesday 02 May 2006 08:47, you wrote:
> Hi,
>
> > Von: Axel Roebel <Axel.Roebel at ircam.fr>
>
> ...
>
> > real    0m15.032s
> > user    0m10.154s
> > sys     0m4.593s
> >
> > with 2.4.1 compiled with type release ( which did not improve compared
>
> to
>
> > none)
> > time /Users/roebel/src/cmake-2.4.1/bin/cmake -E cmake_depends  "Unix
> > Makefiles" /Users/roebel/src/svp/build241
> > /Users/roebel/src/svp/build241/compile/KernelBuild
>
> /Users/roebel/src/svp/build241/compile/KernelBuild/CMakeFiles/svp_kernel.di
>r/DependInfo.cmake
>
> > real    2m5.792s
> > user    0m7.613s
> > sys     1m56.915s
> >
> > This is nearly 10 times longer
>
> Very strange. I use it extensively and for me there is no such slowdown.
> There must be something else going on. Maybe have a look with strace or
> callgrind ?
>
> > Interestingly the user processing time is faster, however,
> > system time has excessively increased. Note, that this has been
>
> measured
>
> > on
> > the same system which was doing nothing else but the dependency check!
> >
> > By the way, another problem with 2.4.1 is that the OUTPUT_NAME
> > of SET_TARGET_PROPERTIES is no longer working
> > (at least for unix makefiles)
>
> Works for me:
>
> add_executable(hello main.cpp)
> set_target_properties(hello PROPERTIES OUTPUT_NAME blub)
>

Here I attach an extract of the strace output for the two calls mentioned 
above, however, this time on a linux system because I don't know how to get a 
trace on mac os x. Both extracts are related to the same source file 
show_version.cxx:

Here the results for cmake 2.4.1

access("/home/roebel/src/mastersvp/svp2.8/src/svp/show_version.cxx", R_OK) = 0
open("/home/roebel/src/mastersvp/svp2.8/src/svp/show_version.cxx", O_RDONLY|
O_LARGEFILE) = 5
read(5, "/**\n *                      Copy"..., 8191) = 4540
read(5, "", 8191)                       = 0
close(5)                                = 0
getcwd("/home/roebel/src/mastersvp/build241", 2048) = 36
stat64("/home/roebel/src/mastersvp/build241", {st_mode=S_IFDIR|0755, 
st_size=4096, ...}) = 0
access("/home/roebel/src/mastersvp/svp2.8/src/svp/preincluded.h", R_OK) = -1 
ENOENT (No such file o
r directory)
access("compile/include/preincluded.h", R_OK) = -1 ENOENT (No such file or 
directory)
getcwd("/home/roebel/src/mastersvp/build241", 2048) = 36
stat64("/home/roebel/src/mastersvp/build241", {st_mode=S_IFDIR|0755, 
st_size=4096, ...}) = 0
access("/home/roebel/src/mastersvp/svp2.8/compile/../include/preincluded.h", 
R_OK) = -1 ENOENT (No
such file or directory)
getcwd("/home/roebel/src/mastersvp/build241", 2048) = 36
stat64("/home/roebel/src/mastersvp/build241", {st_mode=S_IFDIR|0755, 
st_size=4096, ...}) = 0
access("/home/roebel/src/mastersvp/svp2.8/src/modules/ampli/preincluded.h", 
R_OK) = -1 ENOENT (No s
uch file or directory)
getcwd("/home/roebel/src/mastersvp/build241", 2048) = 36
stat64("/home/roebel/src/mastersvp/build241", {st_mode=S_IFDIR|0755, 
st_size=4096, ...}) = 0
access("/home/roebel/src/mastersvp/svp2.8/src/modules/analyse/preincluded.h", 
R_OK) = -1 ENOENT (No
 such file or directory)

and for cmake 2.2.3

access("/home/roebel/src/mastersvp/svp2.8/src/svp/show_version.cxx", R_OK) = 0
open("/home/roebel/src/mastersvp/svp2.8/src/svp/show_version.cxx", O_RDONLY|
O_LARGEFILE) = 4
read(4, "/**\n *                      Copy"..., 8191) = 4540
read(4, "", 8191)                       = 0
close(4)                                = 0
access("/home/roebel/src/mastersvp/svp2.8/src/svp/preincluded.h", R_OK) = -1 
ENOENT (No such file
or directory)
access("compile/include/preincluded.h", R_OK) = -1 ENOENT (No such file or 
directory)
access("../svp2.8/compile/../include/preincluded.h", R_OK) = -1 ENOENT (No 
such file or directory)
access("../svp2.8/src/modules/ampli/preincluded.h", R_OK) = -1 ENOENT (No such 
file or directory)
access("../svp2.8/src/modules/analyse/preincluded.h", R_OK) = -1 ENOENT (No 
such file or directory
)
access("../svp2.8/src/modules/control/preincluded.h", R_OK) = -1 ENOENT (No 
such file or directory
)
access("../svp2.8/src/modules/filtre/preincluded.h", R_OK) = -1 ENOENT (No 
such file or directory)
access("../svp2.8/src/modules/icanal/preincluded.h", R_OK) = -1 ENOENT (No 
such file or directory)
access("../svp2.8/src/modules/idata/preincluded.h", R_OK) = -1 ENOENT (No such 
file or directory)
access("../svp2.8/src/modules/mixer/preincluded.h", R_OK) = -1 ENOENT (No such 
file or directory)
access("../svp2.8/src/modules/module/preincluded.h", R_OK) = -1 ENOENT (No 
such file or directory)
access("../svp2.8/src/modules/ocanal/preincluded.h", R_OK) = -1 ENOENT (No 
such file or directory)
access("../svp2.8/src/modules/resampler/preincluded.h", R_OK) = -1 ENOENT (No 
such file or directo
ry)
access("../svp2.8/src/modules/synthese/preincluded.h", R_OK) = -1 ENOENT (No 
such file or director

Obviously cmake 2.4.1 is much less efficient needing three times as many 
system calls for testing a single file than cmake 2.2.3. The repeated
stat and getcwd calls for the same directory seem highly redundant.

Cheers, 

 
-- 
Axel Roebel
IRCAM Analysis/Synthesis Team


More information about the CMake mailing list