[cmake-developers] A dashboard that reveals a ctest issue on Windows when there are no tests

Brad King brad.king at kitware.com
Thu Dec 6 06:53:53 EST 2018


On 12/5/18 5:01 PM, Alan W. Irwin wrote:
> But I still don't understand exactly how ctest is run from cmake.  Assuming the
> "test" target (which I have never tried) runs the "all" target and then ctest,
> I guess
> 
> cmake --build . --config Debug --target test
> 
> would run ctest indirectly after the "all" target was built

cmake does not run ctest.  ctest is driving the dashboard client build.
First it configures the project.  Then it builds the project.  Then it
runs the tests.  The "build the project" step means it needs to run the
native build tool.  ctest uses "cmake --build . --config Debug" to do
that.  The native build tool somehow exits non-zero, and "cmake --build"
returns that error code.  As far as "ctest" knows, "cmake --build ..."
is the build tool, and it exited with non-zero.  That is why the message
appears.

-Brad


More information about the cmake-developers mailing list