[CMake] "Command line too long" under Windows

Martin Apel martin.apel at simpack.de
Wed Oct 15 06:16:34 EDT 2008


Hi all,

I am currently in the process of trying to convert the build system of
our software to CMake.
Unfortunately there is one static library consisting of lots of objects
(about 5700), which has lots of cyclic references, so I cannot easily
split it up.
I can generate this large library on Linux without problems. When trying
to do the same under Windows, the build fails, because the link line is too
long:
  "CMakeFiles/spck.dir/objects.rsp : fatal error LNK1170: line in
command file contains 131071 or more characters"

An inspection of the file shows a single line with about 300.000
characters. Is there any way to work around this problem besides
splitting up
the library? The CMake version I am using is 2.6.2 and I have tried with
both the Visual Studio 8 generator (nmake) and the Unix makefile generator,
but the problem shows up with both approaches.

Regards,

Martin

____________
Virus checked by G DATA AntiVirus
Version: AVB 19.64 from 15.10.2008




More information about the CMake mailing list