[CMake] Disabling exception handling and RTTI in vs8

Andreas Pokorny andreas.pokorny at gmail.com
Thu Apr 17 10:54:58 EDT 2008


Hello,
I have problems removing /EHsc and /GR, and adding /GR- from the
compiler flags.
I first thought that this is done using CMAKE_CXX_FLAGS and CMAKE_CXXFLAGS_INIT.
It seems to be configured somewhere else. Looking through the
generated vcproj files I
found this setting: ExceptionHandling="FALSE" within all Tool xml-tag.
Changing that setting to ExceptionHandling="0" seems to disable
exception handling. The attribute ExceptionHandling seems to be an
integer value
and not a boolean, three states are possible "C++ exceptions", "odd MS
exceptions"
and "no exceptions".

After disabling RTTI in the IDE RuntimeTypeInfo="false" showed up. I believe
RuntimeTypeInfo="true" is the default.

How is all this supposed to work with cmake?

I am using cmake-2.4-8.

kind regards
Andreas Pokorny


More information about the CMake mailing list