endforeach
want_tests = get_option('tests')
+install_tests = get_option('install-tests')
tests = []
#####################################################################
name = sources[0].split('/')[-1].split('.')[0]
if condition == '' or conf.get(condition, 0) == 1
+ install = install_tests and type == ''
+
exe = executable(
name,
sources,
include_directories : incs,
link_with : link_with,
dependencies : dependencies,
- c_args : defs)
+ c_args : defs,
+ install : install,
+ install_dir : testsdir)
+
if type == 'manual'
message('@0@ is a manual test'.format(name))
elif type == 'unsafe' and want_tests != 'unsafe'
option('tests', type : 'combo', choices : ['yes', 'unsafe'],
description : 'enable extra tests with =unsafe')
+option('install-tests', type : 'boolean', value : 'false',
+ description : 'install test executables')