[CMake] Can't generate Release build in Visual Studio 9

Mauricio Klein mauricio.klein.msk at gmail.com
Fri Feb 24 12:39:57 EST 2012


Hello fellows!

I'm using CMake to compile and CPack to pack my codes.

The Linux version is working very well. But now i'm porting the
CMakeLists.txt to Windows and i'm having some problems:

My main problem is: how can i set the build type in Visual Studio to
"Release" instead "Debug"?

I've already tried set CMAKE_BUILD_TYPE:
set(CMAKE_BUILD_TYPE "Release")

... and CMAKE_CONFIGURATION_TYPES:
set(CMAKE_CONFIGURATION_TYPES "Release")

But every time i open the SLN file generated by Cmake and run "Build" from
inside the Visual Studio, the binary is always generated in Debug mode.

Is there a way to set VS configuration to generate Release build using
CMake variables?

PS: I'm running cmake from dos (command line) and, after, i open the sln
file with Visual Studio. Hope this is the right way to do that.

Thanks in advance for your attention?

-- 
Best regards,

Maurício Souza Klein.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120224/c2ea45d7/attachment.htm>


More information about the CMake mailing list