[CMake] Visual Studio and Reloading Projects

Bill Hoffman bill.hoffman at kitware.com
Wed Feb 21 08:53:50 EST 2007


Bill Napier wrote:
> We're currently using CMake to build a very modular project.  We have 
> lots of little projects that generate little libraries that end up 
> getting linked together into one application.  It's really nice on 
> UNIX when you change a CMakeLists.txt, CMake rebuilds everything and 
> it just works.
>  
> We also build the same application under Widnows using Visual Studio 
> 2005. The Visual Studio Generator does the same thing that UNIX one 
> does when a CMakeLists.txt changes: it re-generates all the VS project 
> files.  The problem is if you do this while Visual Studio is open, 
> you'll get a dialog box prompting you to reload every project in your 
> solution.  We have close to 50 projects and this is a lot of reloading.
>  
> Currently, our process is to close the solution in Visual Studio and 
> force CMake to run.  But of course you don't always remember to do 
> that... 
>  
> So my (kind of off-topic) question is: How can I make this process 
> less painful?  Does anyone know of any MSVC plugins that will 
> auto-reload changed projects?  Or is there a configuration option I'm 
> missing somewhere?
>
This has been a problem with VS from the start.   VS 2003 does the right 
thing once, it will only ask for one reload and then reload all.  But 
after one reload it stops working....  VS 2005 went back to prior 
behavior of asking to load every single project.  Basically, if you do a 
CVS update, you should shut down VS and rerun cmake from the 
outside....  It would be great if someone knew how to fix this...

-Bill



More information about the CMake mailing list