[CMake] Make Visual Studio stop on error

Rob Boehne robb at datalogics.com
Fri Apr 12 17:06:08 EDT 2019


Thank you!
But wow, I’m shocked that it can’t do this.  It’s surprising that it’s not the default, let alone needs an add-on.

From: CMake <cmake-bounces at cmake.org> on behalf of frodak17 <frodak17 at gmail.com>
Date: Friday, April 12, 2019 at 9:33 AM
Cc: "cmake at cmake.org" <cmake at cmake.org>
Subject: Re: [CMake] Make Visual Studio stop on error



On Fri, Apr 12, 2019 at 10:16 AM Rob Boehne <robb at datalogics.com<mailto:robb at datalogics.com>> wrote:
All,

We’re really loving CMake here! And we’ve been slowly figuring out how to make things work for our legacy C/C++ project.
One improvement we want to make is to tell cmake to generate Visual Studio projects that stop building when a dependency target fails.
Can something be set in the Visual Studio generator, or on the cmake –build command line to do that?

The reason is that when a target fails, it keeps compiling 8000 source files, and we have to search Jenkins (web-based) logs of stdout/stderr to find what actually failed.  It also chews up resources with no benefit.

Thanks,

Rob


It seems that Visual Studio requires an addon to support this kind of behaviour.

https://marketplace.visualstudio.com/items?itemName=EinarEgilsson.StopOnFirstBuildError<https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3DEinarEgilsson.StopOnFirstBuildError&data=02%7C01%7Crobb%40datalogics.com%7Cc59cc36244de44307fc808d6bf53cc3b%7Cfc3d8cdfd6994f23ae232659c3da4749%7C0%7C0%7C636906763963142905&sdata=xoBeM7YQrU6SdSctjX%2BxK4Ebxd4cmkd1bIJTuRI%2BNAQ%3D&reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20190412/94189f74/attachment-0001.html>


More information about the CMake mailing list