1

Is there a way I can setup CMakeLists.txt to print a message if ctest tests fail? For example:

cmake ..
make
ctest // fails
message output: Please contact xyz@mail.com to resolve testing problems.
Blizzard
  • 1,117
  • 2
  • 11
  • 28

1 Answers1

0

You can use message, which can help you output information to the configuration log process.

Joel
  • 1,805
  • 1
  • 22
  • 22
  • That does not output message in ctest or make test right? – Blizzard Apr 15 '16 at 02:13
  • oh, you mean as target? If so...then you'll need to go deaper with [CTest](https://cmake.org/cmake/help/v2.8.8/ctest.html). The link points you about the current features. As a sidenote, you can create a custom target and grab its exits status without ctest. – Joel Apr 15 '16 at 04:27
  • Yes, I looked at it but couldn't figure out myself, I was hoping someone can give me an example. – Blizzard Apr 15 '16 at 18:47