[CMake] Some issues with visual studio

Renato Utsch renatoutsch at gmail.com
Sun Jan 8 10:50:27 EST 2012


So I can do this by adding a command line parameter to do that. But
can't I simply set an option that behaves exactly as --config Debug ?

Renato

2012/1/8 John Drescher <drescherjm at gmail.com>:
> On Sun, Jan 8, 2012 at 10:30 AM, Mateusz Loskot <mateusz at loskot.net> wrote:
>> 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.
>>
>
> An alternate way is
>
> cmake --build myprojectsbuildfolder --config myconfiguration
>
> for example:
>
> cmake --build X:/64bit/VC.100/Qt/StudyManager --config Debug
>
> John


More information about the CMake mailing list