[CMake] Building CMake in parallel problem

Michael Wild themiwi at gmail.com
Fri Apr 9 01:50:24 EDT 2010


Hi all

While creating a formula for Homebrew on Mac OS X 10.6.2 I happened across a problem when I tried to build CMake 2.8.1 in parallel (-j2) and directly invoked the "install" target where libcmsys.a and libCMakeLib.a get built twice. I.e. I did the following:

$ <path/to/source>/bootstrap --prefix=<prefix> --system-libs --datadir=/share/cmake \
  --docdir=/share/doc/cmake --mandir=/share/man

$ make -j2 install


Looking through the log, I found that both libcmsys.a and libCMakeLib.a get built twice, where sometimes the second thread interferes with the first, especially during the linking stage. If I split the build and install steps, i.e

$ make -j2
$ make install

I don't observe this weirdness. Is this a bug in the generated Makefiles or in Make?

Michael


More information about the CMake mailing list