Hello fellows!<div><br></div><div>I'm using CMake to compile and CPack to pack my codes.</div><div><br></div><div>The Linux version is working very well. But now i'm porting the CMakeLists.txt to Windows and i'm having some problems:</div>
<div><br></div><div>My main problem is: how can i set the build type in Visual Studio to "Release" instead "Debug"?</div><div><br></div><div>I've already tried set CMAKE_BUILD_TYPE:</div><div>set(CMAKE_BUILD_TYPE "Release")</div>
<div><br></div><div>... and CMAKE_CONFIGURATION_TYPES:</div><div>set(CMAKE_CONFIGURATION_TYPES "Release")</div><div><br></div><div>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.</div>
<div><br></div><div>Is there a way to set VS configuration to generate Release build using CMake variables?</div><div><br></div><div>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.</div>
<div><br></div><div>Thanks in advance for your attention?<br clear="all"><div><br></div>-- <br>Best regards,<br><br>Maurício Souza Klein.<br>
</div>