[CMake] CMAKE changing Visual Studio Settings

Joseph Rosensweig jrosensw at gmail.com
Mon Jul 21 16:51:53 EDT 2014


On Sun, Jul 20, 2014 at 11:49 PM, Nils Gladitz <nilsgladitz at gmail.com>
wrote:

> On 07/21/2014 08:05 AM, Joseph Rosensweig wrote:
>
>>     Visual Studio Settings
>>
>> Every time CMAKE generates a project it will be a fresh solution and
>> will not maintain any of the settings you applied to the Visual Studio
>> project. I know that many things such as CMAKE_CXX_FLAGS, etc can change
>> the properties. But what if I want to change settings such as "Suppress
>> Startup Banner", "Environment", Enabling Microsoft Symbol Server,
>> Enabling Native Code Debugging. How do I force CMAKE to set the options
>> I want for fields like these?
>>
>>
> Some options are stored in the project files and can be derived from
> compiler options (e.g. Suppress Startup Banner is derived from /NOLOGO).
> These would get overwritten on generation.
>

So CMAKE can't control the options int he *.user files I guess :-\?  Would
a potential workaround be to find a command line tool that can edit these
and run it as a post-build script?


>
> Other options (like e.g. the Debugging Environment) are stored in .user
> files which are neither generated nor overwritten by CMake.
>
>
>
>>     Combining Debug/Release/Etc into one solution
>>
>> It seems that with CMAKE you have to do separate generations for
>> Debug/Release/etc.
>>
>
> CMake has multi-configuration and single-configuration generators.
>
> The Visual Studio generators are multi-configuration which means they
> generate a single solution which contains all configurations (per default
> Debug, Release, RelWithDebInfo and MinSizeRel).


I see that it makes these profiles in my Visual Studio project.  But in my
CMAKE I have places where I do things like if(CMAKE_BUILD_TYPE STREQUAL Debug)
then do this else do that.  i.e. my CXX Flags will change based on the
CMAKE_BUILD_TYPE.  However I don't see these getting reflected in my Visual
Studio configurations.  What am I missing?


>
>
> Nils
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140721/6b9c7a8d/attachment.html>


More information about the CMake mailing list