diff options
author | David Robillard <d@drobilla.net> | 2018-01-21 00:41:34 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-01-21 00:41:34 +0100 |
commit | e84092a7acee6c4d1493cbdd23ec5676b923f44d (patch) | |
tree | 07219309ce96ee6a4a1deba279ca48f82b685d74 | |
parent | f77283d735d202e5c15d072e195325b1f876e461 (diff) | |
download | ingen-e84092a7acee6c4d1493cbdd23ec5676b923f44d.tar.gz ingen-e84092a7acee6c4d1493cbdd23ec5676b923f44d.tar.bz2 ingen-e84092a7acee6c4d1493cbdd23ec5676b923f44d.zip |
Don't build libraries twice when testing is enabled
-rw-r--r-- | src/server/wscript | 17 | ||||
-rw-r--r-- | src/wscript | 18 | ||||
-rw-r--r-- | tests/ingen_bench.cpp | 2 | ||||
-rw-r--r-- | tests/ingen_test.cpp | 2 | ||||
-rw-r--r-- | wscript | 6 |
5 files changed, 9 insertions, 36 deletions
diff --git a/src/server/wscript b/src/server/wscript index a8efd2f8..c19168f2 100644 --- a/src/server/wscript +++ b/src/server/wscript @@ -61,24 +61,11 @@ def build(bld): target = 'ingen_server', install_path = '${LIBDIR}', use = 'libingen libingen_socket', - cxxflags = bld.env.PTHREAD_CFLAGS, - linkflags = bld.env.PTHREAD_LINKFLAGS) + cxxflags = bld.env.PTHREAD_CFLAGS + bld.env.INGEN_TEST_CXXFLAGS, + linkflags = bld.env.PTHREAD_LINKFLAGS + bld.env.INGEN_TEST_LINKFLAGS) core_libs = 'GLIBMM LV2 LILV RAUL SERD SORD' autowaf.use_lib(bld, obj, core_libs) - if bld.env.BUILD_TESTS: - obj = bld(features = 'cxx cxxshlib', - source = core_source, - export_includes = ['../..'], - includes = ['.', '../..'], - name = 'libingen_server_profiled', - target = 'ingen_server_profiled', - install_path = '${LIBDIR}', - use = 'libingen_profiled', - cxxflags = bld.env.PTHREAD_CFLAGS + bld.env.INGEN_TEST_CXXFLAGS, - linkflags = bld.env.PTHREAD_LINKFLAGS + bld.env.INGEN_TEST_LINKFLAGS) - autowaf.use_lib(bld, obj, core_libs) - if bld.env.HAVE_JACK: obj = bld(features = 'cxx cxxshlib', source = 'JackDriver.cpp ingen_jack.cpp', diff --git a/src/wscript b/src/wscript index beeed33b..5b308386 100644 --- a/src/wscript +++ b/src/wscript @@ -38,20 +38,6 @@ def build(bld): vnum = '0.0.0', install_path = '${LIBDIR}', lib = lib, - cxxflags = bld.env.PTHREAD_CFLAGS, - linkflags = bld.env.PTHREAD_LINKFLAGS) + cxxflags = bld.env.PTHREAD_CFLAGS + bld.env.INGEN_TEST_CXXFLAGS, + linkflags = bld.env.PTHREAD_LINKFLAGS + bld.env.INGEN_TEST_LINKFLAGS) autowaf.use_lib(bld, obj, 'GLIBMM LV2 LILV RAUL SERD SORD SRATOM') - - if bld.env.BUILD_TESTS: - obj = bld(features = 'cxx cxxshlib', - source = sources, - export_includes = ['..'], - includes = ['..'], - name = 'libingen_profiled', - target = 'ingen_profiled', - install_path = '', - lib = lib, - cxxflags = bld.env.PTHREAD_CFLAGS + bld.env.INGEN_TEST_CXXFLAGS, - linkflags = bld.env.PTHREAD_LINKFLAGS + bld.env.INGEN_TEST_LINKFLAGS) - autowaf.use_lib(bld, obj, 'GLIBMM LV2 LILV RAUL SERD SORD SRATOM') - diff --git a/tests/ingen_bench.cpp b/tests/ingen_bench.cpp index f16908f6..e8cccf4c 100644 --- a/tests/ingen_bench.cpp +++ b/tests/ingen_bench.cpp @@ -92,7 +92,7 @@ main(int argc, char** argv) } // Load modules - ingen_try(world->load_module("server_profiled"), + ingen_try(world->load_module("server"), "Unable to load server module"); // Initialise engine diff --git a/tests/ingen_test.cpp b/tests/ingen_test.cpp index 1eb184e4..5f0f6772 100644 --- a/tests/ingen_test.cpp +++ b/tests/ingen_test.cpp @@ -104,7 +104,7 @@ main(int argc, char** argv) free(real_start_graph); // Load modules - ingen_try(world->load_module("server_profiled"), + ingen_try(world->load_module("server"), "Unable to load server module"); // Initialise engine @@ -149,9 +149,9 @@ def configure(conf): if Options.options.debug_urids: autowaf.define(conf, 'INGEN_DEBUG_URIDS', 1) + conf.env.INGEN_TEST_LINKFLAGS = [] + conf.env.INGEN_TEST_CXXFLAGS = [] if conf.env.BUILD_TESTS: - conf.env.INGEN_TEST_LINKFLAGS = [] - conf.env.INGEN_TEST_CXXFLAGS = [] if not conf.env.NO_COVERAGE: conf.env.INGEN_TEST_CXXFLAGS += ['--coverage'] conf.env.INGEN_TEST_LINKFLAGS += ['--coverage'] @@ -245,7 +245,7 @@ def build(bld): source = 'tests/%s.cpp' % i, target = 'tests/%s' % i, includes = ['.'], - use = 'libingen_profiled', + use = 'libingen', install_path = '', cxxflags = bld.env.INGEN_TEST_CXXFLAGS, linkflags = bld.env.INGEN_TEST_LINKFLAGS) |