Only build unit tests if configure --test is passed.
git-svn-id: svn://localhost/ardour2/branches/3.0@5814 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
import autowaf
|
||||
import Options
|
||||
import os
|
||||
|
||||
# Version of this package (even if built as a child)
|
||||
@@ -23,6 +24,8 @@ blddir = 'build'
|
||||
|
||||
def set_options(opt):
|
||||
autowaf.set_options(opt)
|
||||
opt.add_option('--test', action='store_true', default=False, dest='build_tests',
|
||||
help="Build unit tests")
|
||||
|
||||
def configure(conf):
|
||||
autowaf.configure(conf)
|
||||
@@ -35,6 +38,13 @@ def configure(conf):
|
||||
# Boost headers
|
||||
autowaf.check_header(conf, 'boost/shared_ptr.hpp')
|
||||
autowaf.check_header(conf, 'boost/weak_ptr.hpp')
|
||||
|
||||
conf.env['BUILD_TESTS'] = Options.options.build_tests
|
||||
|
||||
autowaf.print_summary(conf)
|
||||
autowaf.display_header('Evoral Configuration')
|
||||
autowaf.display_msg(conf, "Unit tests", str(conf.env['BUILD_TESTS']))
|
||||
print
|
||||
|
||||
def build(bld):
|
||||
# Headers
|
||||
@@ -83,8 +93,8 @@ def build(bld):
|
||||
obj.vnum = EVORAL_LIB_VERSION
|
||||
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
|
||||
|
||||
if bld.env['HAVE_CPPUNIT']:
|
||||
# Unit tests
|
||||
# Unit tests
|
||||
if bld.env['BUILD_TESTS'] and bld.env['HAVE_CPPUNIT']:
|
||||
obj = bld.new_task_gen('cxx', 'program')
|
||||
obj.source = '''
|
||||
test/SequenceTest.cpp
|
||||
|
||||
Reference in New Issue
Block a user