X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fpbd%2Fwscript;h=a558a04da2ab0d5819a873ecee19ff96f864365d;hb=0f5bdd666fa66bd279f8629a670d8058780a613d;hp=b25d8059ceb8d013e8cf3840a8eed1e596da6ab8;hpb=f450df300c9c057141a4caf79ff6dbfbf58492d9;p=ardour.git diff --git a/libs/pbd/wscript b/libs/pbd/wscript index b25d8059ce..a558a04da2 100644 --- a/libs/pbd/wscript +++ b/libs/pbd/wscript @@ -40,6 +40,7 @@ def configure(conf): conf.check(function_name='getmntent', header_name='mntent.h', define_name='HAVE_GETMNTENT') conf.check(header_name='execinfo.h', define_name='HAVE_EXECINFO') + conf.check(header_name='unistd.h', define_name='HAVE_UNISTD') conf.write_config_header('libpbd-config.h') @@ -57,27 +58,36 @@ def build(bld): command.cc convert.cc controllable.cc + controllable_descriptor.cc crossthread.cc + cpus.cc + debug.cc enumwriter.cc event_loop.cc dmalloc.cc + enums.cc error.cc filesystem.cc filesystem_paths.cc + file_manager.cc file_utils.cc fpu.cc id.cc locale_guard.cc malign.cc mountpoint.cc + openuri.cc pathscanner.cc pool.cc + property_list.cc pthread_utils.cc receiver.cc search_path.cc shortpath.cc signals.cc + sndfile_manager.cc stacktrace.cc + stateful_diff_command.cc stateful.cc strreplace.cc strsplit.cc @@ -101,6 +111,19 @@ def build(bld): if bld.env['build_target'] == 'x86_64': obj.cxxflags += [ '-DUSE_X86_64_ASM' ] + if bld.env['BUILD_TESTS'] and bld.env['HAVE_CPPUNIT']: + # Unit tests + testobj = bld.new_task_gen('cxx', 'program') + testobj.source = ''' + test/testrunner.cc + test/xpath.cc + test/scalar_properties.cc + '''.split() + testobj.target = 'run-tests' + testobj.includes = obj.includes + ['test', '../pbd'] + testobj.uselib = 'CPPUNIT XML' + testobj.uselib_local = 'libpbd' + def shutdown(): autowaf.shutdown()