[CMake] Stopping the VS build when configure fails

David Cole david.cole at kitware.com
Tue Oct 5 12:09:20 EDT 2010


On Tue, Oct 5, 2010 at 11:12 AM, John Drescher <drescherjm at gmail.com> wrote:

> On Fri, Oct 1, 2010 at 2:57 PM, John Drescher <drescherjm at gmail.com>
> wrote:
> >> I just hit "Build Solution" which caused ZERO_CHECK project to run
> because
> >> my CMakeLists.txt file had changed.  ZERO_CHECK ran CMake which
> attempted to
> >> generate a new solution.  Typically this results in a good new project
> and
> >> the VS plugin detects this and asks me to load the new project files.
> >> However in this case, the new project files could not be generated due
> to
> >> the error.  For whatever reason VS keeps going even though the
> ZERO_CHECK
> >> target failed.
> >>
> >
> > I see. Now I am having some similar problems with 2.8.3-rc1 and
> > reloads. I did not notice that until today. After I change my
> > CMakeList.txt  in a subproject (not sure about the root project) and
> > click build in visual studio 2008 I am no longer getting prompted for
> > the reload but the build appears to never finish. I have to hit cancel
> > on the build then windows prompts me to reload the project. No dialog
> > appeared.
> >
>
> Okay. Here is a weird one. I killed Outlook 2007 in task manager
> because it was not showing up. After it terminated I got an instant
> CMake prompt to reload the solution file. The thing is I was not
> configuring my application and I was also not compiling my app. I have
> not started coding today yet..
>
>
CMake iterates over the Windows "running object table" (a COM thing) to find
Visual Studio instances to ping to call the reload macro. When something is
dead and stuck in the running object table (which happens occasionally, but
thankfully not frequently) then CMake hangs in that iteration loop waiting
forever for that dead thing to respond. The only way out of that situation
is a reboot or actually killing the process that's really hung. As soon as
that's killed, CMake continues its iteration happily, not realizing it's
been waiting for hours or days... :-)

So there's an explanation for such mad behavior... even though it's not
going to make anybody happy, at least it's not a mystery. The mystery is why
Outlook was hung in the first place.

Have you considered using Thunderbird? :-)


Cheers,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101005/75eed298/attachment.htm>


More information about the CMake mailing list