[CMake] How to compile as "release" with /MT /GS in cmake?

John Drescher drescherjm at gmail.com
Tue Oct 12 08:44:57 EDT 2010


On Tue, Oct 12, 2010 at 8:06 AM, Mr Shore <shore.cloud at gmail.com> wrote:
> I'm using cl.exe if that matters,thanks in advance!
>

CMAKE_CXX_FLAGS_RELEASE is the variable you want.

I believe this will do what you want:

SET(CMAKE_CXX_FLAGS_RELEASE "/MT /GS" )

John


More information about the CMake mailing list