[CMake] add_test to support generator expressions?
Chris Green
greenc at fnal.gov
Mon Oct 26 15:29:31 EDT 2015
Hi,
I have a function cet_test(), which allows a user to specify the details
of a test which will be executed via a wrapper, cet_exec_test. It calls
the CMake add_test() macro to set this up. The user may subsequently set
the SKIP_RETURN_CODE property on this test, which must be communicated
to cet_exec_test() so that it can notify CMake if the test requirements
are violated. I attempted to do this with:
add_test(NAME ${target}
...
COMMAND cet_exec_test ... --skip-return-code $<TARGET_PROPERTY:${target},SKIP_RETURN_CODE>
...)
but this resulted in an error. Am I using generator expressions wrongly
in this case, or does add_test() not support them? Is there something
else I can do?
Thanks for any help,
Chris.
--
Chris Green <greenc at fnal.gov>, FNAL CS/SCD/ADSS/SSI/TAC;
More information about the CMake
mailing list