aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-01-16 01:06:15 +0000
committerDavid Robillard <d@drobilla.net>2012-01-16 01:06:15 +0000
commitf96ac3ff6c8678685a499b9ef1bd9b2d22e2e387 (patch)
tree8f2d8f0d47bae52eefed11a56638a1bafe4aa87c
parentaee3de65e8eeef7757b013e247394fa7f9767e1d (diff)
downloadserd-f96ac3ff6c8678685a499b9ef1bd9b2d22e2e387.tar.gz
serd-f96ac3ff6c8678685a499b9ef1bd9b2d22e2e387.tar.bz2
serd-f96ac3ff6c8678685a499b9ef1bd9b2d22e2e387.zip
Fix test suite link errors when gcov is unavailable.
git-svn-id: http://svn.drobilla.net/serd/trunk@288 490d8e77-9747-427b-9fa3-0b8f29cee8a0
-rw-r--r--wscript19
1 files changed, 10 insertions, 9 deletions
diff --git a/wscript b/wscript
index 0e0c930c..689f1a46 100644
--- a/wscript
+++ b/wscript
@@ -147,20 +147,21 @@ def build(bld):
cflags = [ '-DSERD_INTERNAL' ])
if bld.env['BUILD_TESTS']:
+ test_libs = ['m']
+ test_cflags = ['']
+ if bld.is_defined('HAVE_GCOV'):
+ test_libs += ['gcov']
+ test_cflags += ['-fprofile-arcs', '-ftest-coverage']
+
# Static library (for unit test code coverage)
obj = bld(features = 'c cstlib',
source = lib_source,
includes = ['.', './src'],
- lib = ['m'],
+ lib = test_libs,
name = 'libserd_profiled',
target = 'serd_profiled',
install_path = '',
- cflags = [ '-fprofile-arcs', '-ftest-coverage',
- '-DSERD_INTERNAL' ])
-
- test_libs = ['m']
- if bld.is_defined('HAVE_GCOV'):
- test_libs += ['gcov']
+ cflags = test_cflags + ['-DSERD_INTERNAL'])
# Unit test serdi
obj = bld(features = 'c cprogram',
@@ -170,7 +171,7 @@ def build(bld):
lib = test_libs,
target = 'serdi_static',
install_path = '',
- cflags = [ '-fprofile-arcs', '-ftest-coverage' ])
+ cflags = test_cflags)
# Unit test program
obj = bld(features = 'c cprogram',
@@ -180,7 +181,7 @@ def build(bld):
lib = test_libs,
target = 'serd_test',
install_path = '',
- cflags = [ '-fprofile-arcs', '-ftest-coverage' ])
+ cflags = test_cflags)
# Utilities
if bld.env['BUILD_UTILS']: