Browse Source

Update tde_add_check_executable macro

+ Add support for test arguments.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/27/head
Slávek Banko 2 months ago
parent
commit
8aa2f7199e
Signed by: Slávek Banko <slavek.banko@axis.cz> GPG Key ID: 608F5293A04BE668
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      modules/TDEMacros.cmake

+ 3
- 1
modules/TDEMacros.cmake View File

@@ -1139,6 +1139,7 @@ macro( tde_add_check_executable _arg_target )
1139 1139
   unset( _target )
1140 1140
   unset( _automoc )
1141 1141
   unset( _test )
1142
+  unset( _test_args )
1142 1143
   unset( _meta_includes )
1143 1144
   unset( _sources )
1144 1145
   unset( _destination )
@@ -1162,6 +1163,7 @@ macro( tde_add_check_executable _arg_target )
1162 1163
     if( "+${_arg}" STREQUAL "+TEST" )
1163 1164
       set( _skip_store 1 )
1164 1165
       set( _test 1 )
1166
+      set( _storage "_test_args" )
1165 1167
     endif( "+${_arg}" STREQUAL "+TEST" )
1166 1168
 
1167 1169
     # found directive "META_INCLUDES"
@@ -1245,7 +1247,7 @@ macro( tde_add_check_executable _arg_target )
1245 1247
     if( _test_prefix )
1246 1248
         set( _test_prefix "${_test_prefix}/" )
1247 1249
     endif( _test_prefix )
1248
-    add_test( NAME "${_test_prefix}${_target}" COMMAND "${_target}" )
1250
+    add_test( NAME "${_test_prefix}${_target}" COMMAND "${_target}" ${_test_args} )
1249 1251
   endif( _test )
1250 1252
 
1251 1253
 endmacro( tde_add_check_executable )

Loading…
Cancel
Save