[CMake] Why does dependency scanning in version 2.6 seem so slow?
Bill Hoffman
bill.hoffman at kitware.com
Wed Dec 3 22:01:07 EST 2008
Senanu Pearson wrote:
> Hi folks,
>
> Is there a way to speed up the dependency scan in version 2.6?
>
> I recently installed a new Linux OS (Mandriva 2009) which included an
> upgrade to cmake 2.6 (I _think_ I had version 2.4 before). However, when
> I run make (after running "cmake .") it takes a long time (>1min) to do
> the dependency scan. (i.e. the time when the message "Scanning
> dependencies of target foo" is printed) whereas the rest of the build
> takes about 10 seconds. This happens every time I run make but it does
> successfully build (and the "cmake ." step is fast).
>
> The odd thing is that it was almost instantaneous (with essentially the
> same code) under version 2.4 and is almost instantaneous on a (faster)
> mac (again, with the same code).
>
> Is there any way to speed this up without using the "make foo/fast"
> option every time?
>
It should not be any slower. If you do a make VERBOSE=1 you should see
something like this:
make[3]: Entering directory `/cygdrive/c/hoffman/My Builds/CMake-build26'
"C:/Program Files/CMake 2.6/bin/cmake.exe" -E cmake_depends "Unix
Makefiles" "C:/hoffman/My Builds/CMake" "C:/hoffman/My
Builds/CMake/Utilities/cmzlib" "C:/hoffman/My Builds/CMake-build26"
"C:/hoffman/My Builds/CMake-build26/Utilities/cmzlib" "C:/hoffman/My
Builds/CMake-build26/Utilities/cmzlib/CMakeFiles/cmzlib.dir/DependInfo.cmake"
--color=
Dependee "C:/hoffman/My Builds/CMake/Utilities/cmzlib/deflate.c" is
newer than depender "Utilities/cmzlib/CMakeFiles/cmzlib.dir/deflate.obj".
Clearing dependencies in "C:/hoffman/My
Builds/CMake-build26/Utilities/cmzlib/CMakeFiles/cmzlib.dir/depend.make".
Scanning dependencies of target cmzlib
Can you send me (off the list) the depend.make, DependInfo.cmake files
from the slow depend library?
Also, as was suggested please try the binary from the www.cmake.org site
for linux. We do use stl, and it can run very slow if it is not
optimized.
-Bill
More information about the CMake
mailing list