2 # Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 if conf.options.target_windows:
21 boost_lib_suffix = '-mt'
25 conf.check_cxx(fragment="""
26 #define BOOST_TEST_MODULE Config test\n
27 #include <boost/test/unit_test.hpp>\n
30 msg='Checking for boost unit testing library',
31 lib='boost_unit_test_framework%s' % boost_lib_suffix,
32 uselib_store='BOOST_TEST')
34 conf.env.prepend_value('LINKFLAGS', '-Lsrc')
37 obj = bld(features='cxx cxxprogram')
39 obj.uselib = 'BOOST_TEST BOOST_FILESYSTEM BOOST_DATETIME OPENJPEG CXML XMLSEC1 SNDFILE OPENMP ASDCPLIB_CTH LIBXML++ OPENSSL'
40 obj.cppflags = ['-fno-inline', '-fno-default-inline', '-fno-elide-constructors', '-g', '-O0']
41 if bld.is_defined('HAVE_GCOV'):
42 obj.use = 'libdcp%s_gcov' % bld.env.API_VERSION
44 obj.cppflags.append('-ftest-coverage')
45 obj.cppflags.append('-fprofile-arcs')
47 obj.use = 'libdcp%s' % bld.env.API_VERSION
52 colour_conversion_test.cc
62 gamma_transfer_function_test.cc
63 interop_load_font_test.cc
68 read_interop_subtitle_test.cc
69 read_smpte_subtitle_test.cc
74 smpte_load_font_test.cc
79 write_subtitle_test.cc
84 obj = bld(features='cxx cxxprogram')
85 obj.name = 'subs_in_out'
86 obj.uselib = 'BOOST_TEST BOOST_FILESYSTEM OPENJPEG CXML OPENMP ASDCPLIB_CTH XMLSEC1 OPENSSL'
87 obj.cppflags = ['-fno-inline', '-fno-default-inline', '-fno-elide-constructors', '-g', '-O0']
88 if bld.is_defined('HAVE_GCOV'):
89 obj.use = 'libdcp%s_gcov' % bld.env.API_VERSION
91 obj.cppflags.append('-ftest-coverage')
92 obj.cppflags.append('-fprofile-arcs')
94 obj.use = 'libdcp%s' % bld.env.API_VERSION
95 obj.source = 'subs_in_out.cc'
96 obj.target = 'subs_in_out'
99 obj = bld(features='cxx cxxprogram')
100 obj.name = 'rewrite_subs'
101 obj.uselib = 'BOOST_TEST BOOST_FILESYSTEM OPENJPEG CXML OPENMP ASDCPLIB_CTH XMLSEC1 OPENSSL'
102 obj.cppflags = ['-fno-inline', '-fno-default-inline', '-fno-elide-constructors', '-g', '-O0']
103 if bld.is_defined('HAVE_GCOV'):
104 obj.use = 'libdcp%s_gcov' % bld.env.API_VERSION
106 obj.cppflags.append('-ftest-coverage')
107 obj.cppflags.append('-fprofile-arcs')
109 obj.use = 'libdcp%s' % bld.env.API_VERSION
110 obj.source = 'rewrite_subs.cc'
111 obj.target = 'rewrite_subs'
112 obj.install_path = ''
114 obj = bld(features='cxx cxxprogram')
116 obj.uselib = 'BOOST_FILESYSTEM OPENJPEG CXML OPENMP ASDCPLIB_CTH XMLSEC1 OPENSSL LIBXML++'
117 obj.use = 'libdcp%s' % bld.env.API_VERSION
118 obj.source = 'bench.cc'
120 obj.install_path = ''