~hp/osc2ftdidmx

de4b6e5093eefd637172f336cabf32d744911547 — Hanspeter Portner 1 year, 7 months ago de4fcf0
Add build-test configure option
2 files changed, 24 insertions(+), 18 deletions(-)

M meson.build
M meson_options.txt
M meson.build => meson.build +20 -18
@@ 13,7 13,7 @@ varchunk = subproject('varchunk')
reuse = find_program('reuse', required : false)

version = get_option('version')

build_tests = get_option('build-tests')

add_project_arguments('-DOSC2FTDIDMX_VERSION="'+version+'"', language : 'c')
add_project_arguments('-D_GNU_SOURCE', language : 'c')


@@ 51,21 51,23 @@ configure_file(

install_man(join_paths(meson.current_build_dir(), 'osc2ftdidmx.1'))

test_srcs = [
  join_paths('src', 'osc2ftdidmx.c'),
  join_paths('test', 'test.c')
]

test_osc2ftdidmx = executable('test_osc2ftdidmx', test_srcs,
	include_directories : incs,
	dependencies : deps,
	install : false)

test('Test', test_osc2ftdidmx)

if reuse.found()
  test('REUSE', reuse, args : [
    '--root', meson.current_source_dir(),
    'lint'
  ])
if build_tests
  test_srcs = [
    join_paths('src', 'osc2ftdidmx.c'),
    join_paths('test', 'test.c')
  ]

  test_osc2ftdidmx = executable('test_osc2ftdidmx', test_srcs,
    include_directories : incs,
    dependencies : deps,
    install : false)

  test('Test', test_osc2ftdidmx)

  if reuse.found()
    test('REUSE', reuse, args : [
      '--root', meson.current_source_dir(),
      'lint'
    ])
  endif
endif

M meson_options.txt => meson_options.txt +4 -0
@@ 1,4 1,8 @@
# SPDX-FileCopyrightText: Hanspeter Portner <dev@open-music-kontrollers.ch>
# SPDX-License-Identifier: CC0-1.0

option('build-tests',
	type : 'boolean',
	value : true)

option('version', type : 'string', value : '0.5.32')