[CMake] exit_failure

Alexander Neundorf a.neundorf-work at gmx.net
Sat Sep 5 12:09:11 EDT 2009


On Saturday 29 August 2009, Alex H wrote:
> My problem is that in my executable test cpp code, the code may return a
> cpp EXIT_FAILURE macro. Problem is how can I use the cpp macro inside the
> set_tests_properties regex arguments?


Please provide more information.

...just guessing:

test.cpp:

int main()
{
   ...
   return EXIT_FAILURE;
}


in CMakeLists.txt you could do either

set_target_properties(your_test PROPERTIES COMPILE_FLAGS -DEXIT_FAILURE=-7 )

or you could use configure_file() to create a header which #defines 
EXIT_FAILURE to something.

Alex



More information about the CMake mailing list