summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2019-03-24 19:57:58 +0100
committerSlávek Banko <slavek.banko@axis.cz>2019-04-02 19:30:02 +0200
commit8aa2f7199eb24b3b491096de805e5b3dd9349807 (patch)
treee4fbc30bd2736498da0cd33a76ea011078c30335
parentab096402b31c35463742a00de207769a1d5a1676 (diff)
downloadcmake-8aa2f719.tar.gz
cmake-8aa2f719.zip
Update tde_add_check_executable macro
+ Add support for test arguments. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--modules/TDEMacros.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake
index 728d663..9263d24 100644
--- a/modules/TDEMacros.cmake
+++ b/modules/TDEMacros.cmake
@@ -1139,6 +1139,7 @@ macro( tde_add_check_executable _arg_target )
unset( _target )
unset( _automoc )
unset( _test )
+ unset( _test_args )
unset( _meta_includes )
unset( _sources )
unset( _destination )
@@ -1162,6 +1163,7 @@ macro( tde_add_check_executable _arg_target )
if( "+${_arg}" STREQUAL "+TEST" )
set( _skip_store 1 )
set( _test 1 )
+ set( _storage "_test_args" )
endif( "+${_arg}" STREQUAL "+TEST" )
# found directive "META_INCLUDES"
@@ -1245,7 +1247,7 @@ macro( tde_add_check_executable _arg_target )
if( _test_prefix )
set( _test_prefix "${_test_prefix}/" )
endif( _test_prefix )
- add_test( NAME "${_test_prefix}${_target}" COMMAND "${_target}" )
+ add_test( NAME "${_test_prefix}${_target}" COMMAND "${_target}" ${_test_args} )
endif( _test )
endmacro( tde_add_check_executable )