[CMake] CMake and non-default compile options

Ross, Thomas Thomas.Ross at rheinmetall.com
Thu Sep 30 11:09:32 EDT 2010


Hi,

until recently I was pretty sure that CMake uses default compiler /
linker options that you usually get when setting up a VisualStudio
project by hand.

I was proven wrong after our latest code changes killed the compiler
with 'compiler is out of heap space' error messages. The problem, as the
explanation for that error message suggest, is the '/Zm1000' compiler
option CMake forces. Removing that option from the compile flags fixed
the problem.

Another option in this category is the linker flag '/STACK:10000000'
that CMake forces.

We now use string replace to get rid of these options, that IMHO
shouldn't be there in the first place.

Even the biggest projects we currently build on VS2005+2008 don't need
any of these options.

So the question is, why does CMake force these flags? Is this some old
behaviour that was once necessary in older VisualStudio versions?

Regards,
Thomas


---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 

Rheinmetall Defence Electronics GmbH
Brüggeweg 54 - D-28309 Bremen - Tel +49 421 457-01 - Fax +49 421 457-2900 - Sitz der Gesellschaft: Bremen - Register: Amtsgericht Bremen, HRB 9659
Commerzbank AG, Bremen (BLZ 290 400 90) 102213600
Aufsichtsratsvorsitzender: Heinz Dresia - Geschäftsführung: Luitjen Ennenga, Dr. Michael Greth, Georg Morawitz, Ulrich Sasse - www.rheinmetall-defence.com






More information about the CMake mailing list