[CMake] Fwd: Disabling exceptions and rtti on VS

John Drescher drescherjm at gmail.com
Fri Dec 31 09:42:44 EST 2010


---------- Forwarded message ----------
From: John Drescher <drescherjm at gmail.com>
Date: Fri, Dec 31, 2010 at 9:42 AM
Subject: Re: [CMake] Disabling exceptions and rtti on VS
To: Óscar Fuentes <ofv at wanadoo.es>


On Fri, Dec 31, 2010 at 9:27 AM, Óscar Fuentes <ofv at wanadoo.es> wrote:
> If /EHs- /EHs-c- are added with add_definitions, the output of the build
> contains warnings:
>
> cl : Command line warning D9025 : overriding '/EHs' with '/EHs-'
> cl : Command line warning D9025 : overriding '/EHc' with '/EHc-'
>
> This is because cmake automatically adds /EHsc to the command line
> options.
>
> How can I remove /EHsc from the command line options before adding
> /EHs-c- ?
>

I make changes to these by setting CMAKE_CXX_FLAGS
Here is an example I have in one of my projects:

SET(CMAKE_CXX_FLAGS "/WL /MP /GR /EHa" )

John



-- 
John M. Drescher


More information about the CMake mailing list