[cmake-developers] Run program/command before test

Brad King brad.king at kitware.com
Tue Feb 16 10:49:04 EST 2016


On 02/16/2016 07:17 AM, Roman Wüger wrote:
> Is it possible with CMake >= 3.4.0 to run a program/command before the
> test and another program after the test was run?
> 
> The meaning of that would be, that I want to start a small server
> program and run the "client" test. After the test was finished,
> kill the process of the server program or do a graceful shutdown of it.

There is currently no builtin feature for that.  Other than a few
test output matching properties, ctest always expects the process
to be independent and report results via its exit code.

-Brad



More information about the cmake-developers mailing list