tags:

views:

24

answers:

1
set_target_properties (target PROPERTIES
                                      COMPILE_FLAGS "/MT /GS")

I think I've managed to compile the target with /MT /GS flags. But how to make it compile in release mode?

A: 

Your question does not state, which CMake generator you use; judging from the compiler flags I assume you are on Windows. If you use a command-line based generator like nmake, gmake or jom, you tell cmake to generate a build directory by passing -DCMAKE_BUILD_TYPE=Release on the command line, when you create the build directory. If you use Visual Studio, you can switch between debug and release builds inside Visual Studio.

Hope this helps

Martin

Martin