[CMake] /Zm1000 option in MSVC gives problems

Paul Richards paul.richards at gmail.com
Fri Jul 6 11:27:13 EDT 2007


Hi,
An email of this subject was posted to this mailing list back in 2004:
http://public.kitware.com/pipermail/cmake/2004-June/005188.html

Quote:
"I think it is rather strange to have a /Zm1000 option in the compiler
settings for MSVC by default. According to the MSVC docs this will set
the compilers per heap size to 1050 Mbyte. If the compiler uses two
heaps (like e.g. with precompiled headers) this is already more than the
possible virtual memory (limit is 2GB) and will always result in a C1060
fatal compiler error. I also have the feeling that this option has only
an effect if actually more then 1 GB of memory is available, because
otherwise the compiler seems to discard this option. I e.g. get on  a
machine with 1.5 GB memory + 2GB swap a C1060 fatal error and on a
machine with 1GB memory and 0.5 GB swap no such error for the same
project. Without the /Zm1000 options my project builds fine on both
machines.

I think the /Zm1000 option should go away from the defaults or at least
be reduced to something reasonable ( e.g. /Zm200 ). Maybe the default
heap size (105MByte for MSVC6) did also change in the past and the
/Zm1000 is some historic relict, so that it might be a good idea to
think about it."


I notice this problem hitting me today with MSVC6.  Is there a workaround?



-- 
Paul Richards


More information about the CMake mailing list