[CMake] Regenerating Visual Studio projects

Bill Hoffman bill.hoffman at kitware.com
Thu Sep 18 15:21:01 EDT 2008


Jesper Eskilson wrote:
> Hi all,
> 
> When CMake (2.6) discovers that a CMakeLists.txt file has changed, and 
> that one or more Visual Studio projects/solutions need to be reloaded, 
> it attempts to interrupt the build, force Visual Studio to reload the 
> projects, and then restart the build. This is really good compared to 
> CMake 2.4, where the projects weren't reloaded until the build had 
> completed and you possibly had to build again from scratch.
> 
> I have a problem, though: CMake does not properly detect if it is being 
> run from inside Visual Studio, and it doesn't check that it interrupting 
> the correct Visual Studio instance.
> 
> Say that you have a studio instance opened on a solution. If I run CMake 
> to regenerate a completely different solution, CMake will try to 
> interrupt the (unrelated) studio instance. This wouldn't be too bad 
> unless Visual Studio kept throwing up interactive dialogs asking "do you 
> really want to interrupt the build" and "do you want to reload 78 
> project files". I have users who needs to run my build scripts (which 
> invoke cmake) without the script interfering with any other studio 
> instances they may have running.
> 
> Either CMake should detect that it is being run under Visual Studio and 
> attempt to stop/interrupt the studio instance which it was started by, 
> or there should be a flag to disable any form of communication with 
> Visual Studio as in CMake 2.4).
> 
> Which brings me to my second issue: when CMake is rerun from inside 
> Visual Studio, I have to click on at least 3 interactive dialogs in 
> order for the project to be reloaded. Is there anything CMake can do 
> about that? I don't want to click on any dialogs at all, just have the 
> project files recreated and reloaded.
> 
Please create a bug report about this issue.

-Bill


More information about the CMake mailing list