[CMake] Some issues with visual studio

Mateusz Loskot mateusz at loskot.net
Sun Jan 8 10:30:02 EST 2012


On 8 January 2012 15:21, Renato Utsch <renatoutsch at gmail.com> wrote:
> Yes, but I want to be able to change with CMake, but if I can't do
> that, at least I want to be able to set the default to the Release
> version :X

You have to understand there is difference between generators like
makefiles and generators for projects for IDEs which allow to switch
between build configurations from within IDE, like Visual Studio does.

IMHO, CMAKE_BUILD_TYPE is irrelevant for IDEs like Visual Studio
and valid workflow is equivalent to this:

cmake -G "Visual Studio 2010"
msbuild myproj.sln /p:Configuration=Debug

or

load myproj.sln in VS IDE and change configuration there.

Obviously, for makefiles, CMAKE_BUILD_TYPE is the way to go.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net


More information about the CMake mailing list