diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-11-17 19:42:14 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-11-17 21:00:45 +0000 |
| commit | 2aeb895aa5c05e0db6cfa36bef2d6d8cb2e59bfa (patch) | |
| tree | 868013b59e73df9f2ffc45254fa0768c165774e6 | |
| parent | 609aa163d80bcd1ccfcda96c971df048f90c5cb3 (diff) | |
Fix uninitialised variable; Win32 build fixes.
| -rw-r--r-- | asdcplib/src/KM_tai.cpp | 1 | ||||
| -rw-r--r-- | cscript | 2 | ||||
| -rw-r--r-- | test/wscript | 18 | ||||
| -rw-r--r-- | wscript | 4 |
4 files changed, 17 insertions, 8 deletions
diff --git a/asdcplib/src/KM_tai.cpp b/asdcplib/src/KM_tai.cpp index 2cbd1253..509e8632 100644 --- a/asdcplib/src/KM_tai.cpp +++ b/asdcplib/src/KM_tai.cpp @@ -190,6 +190,7 @@ Kumu::TAI::tai::now() ct.hour = st.wHour; ct.minute = st.wMinute; ct.second = st.wSecond; + ct.offset = 0; caltime_tai(&ct, this); #else struct timeval now; @@ -12,7 +12,7 @@ def build(target, options): if (target.distro == 'debian' and target.version == 'unstable' or target.distro == 'fedora' and target.version == '23'): target.append_with_space('CXXFLAGS', '-std=c++11') elif target.platform == 'windows': - cmd += ' --target-windows' + cmd += ' --target-windows --disable-gcov' elif target.platform == 'osx': cmd += ' --disable-tests' diff --git a/test/wscript b/test/wscript index 89bf2fb2..707b776f 100644 --- a/test/wscript +++ b/test/wscript @@ -9,9 +9,9 @@ def configure(conf): #include <boost/test/unit_test.hpp>\n int main() {} """, - msg='Checking for boost unit testing library', - lib='boost_unit_test_framework%s' % boost_lib_suffix, - uselib_store='BOOST_TEST') + msg='Checking for boost unit testing library', + lib='boost_unit_test_framework%s' % boost_lib_suffix, + uselib_store='BOOST_TEST') conf.env.prepend_value('LINKFLAGS', '-Lsrc') @@ -19,9 +19,12 @@ def build(bld): obj = bld(features='cxx cxxprogram') obj.name = 'tests' obj.uselib = 'BOOST_TEST BOOST_FILESYSTEM OPENJPEG CXML XMLSEC1 SNDFILE' + obj.cppflags = ['-fno-inline', '-fno-default-inline', '-fno-elide-constructors', '-g', '-O0'] if bld.is_defined('HAVE_GCOV'): obj.use = 'libdcp%s_gcov' % bld.env.API_VERSION obj.lib = ['gcov'] + obj.cppflags.append('-ftest-coverage') + obj.cppflags.append('-fprofile-arcs') else: obj.use = 'libdcp%s' % bld.env.API_VERSION obj.source = """ @@ -57,30 +60,33 @@ def build(bld): """ obj.target = 'tests' obj.install_path = '' - obj.cppflags = ['-fprofile-arcs', '-ftest-coverage', '-fno-inline', '-fno-default-inline', '-fno-elide-constructors', '-g', '-O0'] obj = bld(features='cxx cxxprogram') obj.name = 'subs_in_out' obj.uselib = 'BOOST_TEST BOOST_FILESYSTEM OPENJPEG CXML' + obj.cppflags = ['-fno-inline', '-fno-default-inline', '-fno-elide-constructors', '-g', '-O0'] if bld.is_defined('HAVE_GCOV'): obj.use = 'libdcp%s_gcov' % bld.env.API_VERSION obj.lib = ['gcov'] + obj.cppflags.append('-ftest-coverage') + obj.cppflags.append('-fprofile-arcs') else: obj.use = 'libdcp%s' % bld.env.API_VERSION obj.source = 'subs_in_out.cc' obj.target = 'subs_in_out' obj.install_path = '' - obj.cppflags = ['-fprofile-arcs', '-ftest-coverage', '-fno-inline', '-fno-default-inline', '-fno-elide-constructors', '-g', '-O0'] obj = bld(features='cxx cxxprogram') obj.name = 'rewrite_subs' obj.uselib = 'BOOST_TEST BOOST_FILESYSTEM OPENJPEG CXML' + obj.cppflags = ['-fno-inline', '-fno-default-inline', '-fno-elide-constructors', '-g', '-O0'] if bld.is_defined('HAVE_GCOV'): obj.use = 'libdcp%s_gcov' % bld.env.API_VERSION obj.lib = ['gcov'] + obj.cppflags.append('-ftest-coverage') + obj.cppflags.append('-fprofile-arcs') else: obj.use = 'libdcp%s' % bld.env.API_VERSION obj.source = 'rewrite_subs.cc' obj.target = 'rewrite_subs' obj.install_path = '' - obj.cppflags = ['-fprofile-arcs', '-ftest-coverage', '-fno-inline', '-fno-default-inline', '-fno-elide-constructors', '-g', '-O0'] @@ -14,6 +14,7 @@ def options(opt): opt.add_option('--enable-debug', action='store_true', default=False, help='build with debugging information and without optimisation') opt.add_option('--static', action='store_true', default=False, help='build libdcp and in-tree dependencies statically, and link statically to openjpeg and cxml') opt.add_option('--disable-tests', action='store_true', default=False, help='disable building of tests') + opt.add_option('--disable-gcov', action='store_true', default=False, help='don''t use gcov in tests') opt.add_option('--disable-examples', action='store_true', default=False, help='disable building of examples') def configure(conf): @@ -122,7 +123,8 @@ def configure(conf): if not conf.env.DISABLE_TESTS: conf.recurse('test') - conf.check(lib='gcov', define_name='HAVE_GCOV', mandatory=False) + if not conf.options.disable_gcov: + conf.check(lib='gcov', define_name='HAVE_GCOV', mandatory=False) conf.recurse('asdcplib') def build(bld): |
