From ebae18dfbd9376ccd1297b7722d102500b62250d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 12 May 2012 16:40:00 +0000 Subject: Fix compilation and gcov stuff. git-svn-id: http://svn.drobilla.net/lad/trunk/raul@4381 a436a847-0d15-0410-975c-d299462d15a1 --- wscript | 75 ++++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 37 insertions(+), 38 deletions(-) (limited to 'wscript') diff --git a/wscript b/wscript index 1587906..f1480be 100644 --- a/wscript +++ b/wscript @@ -56,16 +56,15 @@ def configure(conf): autowaf.check_pkg(conf, 'gthread-2.0', atleast_version='2.14.0', uselib_store='GTHREAD', mandatory=True) - if conf.env['BUILD_TESTS']: - conf.check_cc(lib='gcov', - define_name='HAVE_GCOV', - mandatory=False) - if Options.platform == 'darwin': conf.check(framework_name='CoreServices') conf.env['FRAMEWORK_RAUL'] = ['CoreServices'] conf.env['BUILD_TESTS'] = Options.options.build_tests + if conf.env['BUILD_TESTS']: + conf.check_cxx(lib='gcov', + define_name='HAVE_GCOV', + mandatory=False) if Options.options.log_colour: autowaf.define(conf, 'RAUL_LOG_COLOUR', 1) @@ -134,51 +133,51 @@ def build(bld): obj.defines = ['RAUL_CPP0x'] # Library - obj = bld(features = 'cxx cxxshlib') - obj.export_includes = ['.'] - obj.source = lib_source - obj.includes = ['.', './src'] - obj.name = 'libraul' - obj.target = 'raul' - obj.uselib = 'GLIB GTHREAD' - obj.lib = ['pthread'] - obj.framework = framework - obj.install_path = '${LIBDIR}' - obj.vnum = RAUL_LIB_VERSION + obj = bld(features = 'cxx cxxshlib', + export_includes = ['.'], + source = lib_source, + includes = ['.', './src'], + name = 'libraul', + target = 'raul', + uselib = 'GLIB GTHREAD', + lib = ['pthread'], + framework = framework, + install_path = '${LIBDIR}', + vnum = RAUL_LIB_VERSION) set_defines(obj); if bld.env['BUILD_TESTS']: - test_libs = [''] - test_cxxflags = [''] + test_libs = [] + test_cxxflags = [] if bld.is_defined('HAVE_GCOV'): test_libs += ['gcov'] test_cxxflags += ['-fprofile-arcs', '-ftest-coverage'] # Static library (for unit test code coverage) - obj = bld(features = 'cxx cxxstlib') - obj.source = lib_source - obj.includes = ['.', './src'] - obj.name = 'libraul_static' - obj.target = 'raul_static' - obj.uselib = 'GLIB GTHREAD' - obj.framework = framework - obj.install_path = '' - obj.cxxflags = test_cxxflags - obj.lib = test_libs + obj = bld(features = 'cxx cxxstlib', + source = lib_source, + includes = ['.', './src'], + lib = test_libs, + name = 'libraul_static', + target = 'raul_static', + uselib = 'GLIB GTHREAD', + framework = framework, + install_path = '', + cxxflags = test_cxxflags) set_defines(obj); # Unit tests for i in tests.split(): - obj = bld(features = 'cxx cxxprogram') - obj.source = i + '.cpp' - obj.includes = ['.', './src'] - obj.use = 'libraul_static' - obj.uselib = 'GLIB GTHREAD' - obj.framework = framework - obj.target = i - obj.install_path = '' - obj.cxxflags = test_cxxflags - obj.lib = test_libs + obj = bld(features = 'cxx cxxprogram', + source = i + '.cpp', + includes = ['.', './src'], + lib = test_libs, + use = 'libraul_static', + uselib = 'GLIB GTHREAD', + framework = framework, + target = i, + install_path = '', + cxxflags = test_cxxflags) set_defines(obj); # Documentation -- cgit v1.2.1