Yuri, Your suggestion is close to what I’m looking for.
What I need is a easy way to not this as the “Startup Project” , I need to change the property of the INSTALL target itself. By default, the INSTALL target is not in the “all” or if you open the properties on the Solution , you will find the “Build” selection for INSTALL is not selected. I’m trying to avoid changing Cmake’s C++ for this issue, even for an optional setting. It’s not a great practice to try to run INSTALL no matter what but, I’m getting a strong opinion from users that traditionally work under Visual Studio only stating it’s Ok to run INSTALL and just watch over build errors. ++David->Bjornbak; From: Yuri Timenkov [mailto:y...@timenkov.ru] Sent: Wednesday, February 08, 2012 7:27 PM To: BJORNBAK,DAVID (A-Sonoma,ex1) Cc: cmake@cmake.org Subject: Re: [CMake] Under Visual Studio , allow developers to hit "F7" to run the INSTALL target I use a special macro for such purposes, something like this: Sub Install() Dim prj As Project Dim sb As SolutionBuild = DTE.Solution.SolutionBuild Dim prjs As Projects = DTE.Solution.Projects For Each prj In prjs If prj.Name = "INSTALL" Then sb.BuildProject(sb.ActiveConfiguration.Name<http://sb.ActiveConfiguration.Name>, prj.UniqueName) Exit For End If Next End Sub Good thing is that you can put it on toolbar or bind to hot key and run it separately (while keeping active project you're debugging). On Tue, Feb 7, 2012 at 11:47 PM, <david_bjorn...@agilent.com<mailto:david_bjorn...@agilent.com>> wrote: Developers on our team have found issues with the difference between “INSTALL” and the default build or “F7” build all under Visual Studio. My question is, there’s a reasonable way to configure cmake or Visual Studio to run the INSTALL target when you hit “F7” or use the default “Build Solution” functionality to run INSTALL. We’re working a fairly large project and the default setting of having INSTALL dependent on ALL or separating out the two targets makes sense when you’re building the entire project. However, we allow developers to build sub projects and it makes sense if these sub project just install quickly into a larger pre-built installation directory. The confusion currently is, they run ALL_BUILD or “F7” and the build finishes and they forget to run “INSTALL”. Particularly we, had developers that worked formally on smaller non-Cmake Visual Studio projects and not Linux so, they’re not used to the make all and then make install defacto standard. This request is similar as the following on “Selecting INSTALL target in Visual Studio Configuration by default” but, I wanted to see if anyone had any other suggestions on this topic. http://www.cmake.org/pipermail/cmake/2011-April/044025.html ++David->Bjornbak; -- Powered by www.kitware.com<http://www.kitware.com> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
-- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake