[CMake] CMAKE changing Visual Studio Settings

Nils Gladitz nilsgladitz at gmail.com
Mon Jul 21 02:49:15 EDT 2014


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.

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).

Nils


More information about the CMake mailing list