[cmake-developers] Visual Studio Project Upgrade Prompt

Christensen, Erik christensen.erik at siemens.com
Thu Nov 3 18:05:15 EDT 2016


Hi,

When opening projects in the Visual Studio IDE that are using an older toolset version (ie. a VS 2012 project under VS 2015) for the first time, a prompt is displayed asking if you'd like to upgrade the projects to the newer version of Visual Studio.  This gets annoying pretty quickly when you're generating projects over and over.  Now, there's a VS project property that can be set, which will prevent this prompt from being shown.  It can be applied to any (known) CMake target like so:

set_property(TARGET target PROPERTY VS_GLOBAL_VCProjectUpgraderObjectName NoUpgrade)

Unfortunately, you still get upgrade prompts for all of the predefined and automoc targets (ie. ALL_BUILD, ZERO_CHECK, etc.).  Is there any way to assign that property to the built-in targets?

Really, it seems like this is a property that should be applied by default to any CMake generated Visual Studio projects.   I'm not sure why anyone would want to do a project upgrade within Visual Studio itself when you can just reconfigure the toolset in CMake.  I imagine anyone specifying an older toolset version is doing so on purpose so that they can use the latest IDE with projects that need to be kept on older compilers.  But maybe I'm wrong.

Erik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20161103/3f3ee3a6/attachment.html>


More information about the cmake-developers mailing list