Ah, I see. It appears I was unclear on the difference between target and
test. What I actually want is the *test* property SKIP_RETURN_CODE,
which there does not seem to be any way to access via a generator
expression. Looks like I'm out of look, unless this is an upcoming feature?
Thanks for the clarification,
Chris.
On 10/26/15 3:20 PM, Nils Gladitz wrote:
On 26.10.2015 20:29, Chris Green wrote:
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?
You did not mention what the error actually is but ...
add_test() does support generator expressions in the command (as long
as you are using the NAME/COMMAND signature; which you are).
Tests are not targets; hence TARGET_PROPERTY does not work here unless
you also happen to have an actual target with the same name as the
test (which is possible but can't be inferred from your snippet) and
you set the property of that target rather than the test.
Nils
--
Chris Green <gre...@fnal.gov>, FNAL CS/SCD/ADSS/SSI/TAC;
'phone (630) 840-2167; Skype: chris.h.green;
IM: gre...@jabber.fnal.gov, chissgreen (AIM),
chris.h.green (Google Talk).
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake