diff options
author | Anders Kalør <anders@kaloer.com> | 2019-08-10 18:20:32 +0200 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2019-12-04 12:10:33 -0500 |
commit | df14dfd1f12605ae5dcf3a395059e255a7fcd73f (patch) | |
tree | bbb0b66313145f9ff6ff0f162a4bb6d3787af802 /gr-utils/python/modtool/core/add.py | |
parent | 6be01747e08f5446f4c69b5a3e41f33cc372630e (diff) |
modtool: use Boost UTF for 3.8 OOT blocks
modtool was adding CppUnit qa code for gnuradio 3.8. Boost UTF support
was already implemented in #2080, but for some reason not in add.py.
This commit adds the code from #2080, adapted to the new modtool.
Note that it is based on #2592. Fixes #2722, fixes #2697.
Diffstat (limited to 'gr-utils/python/modtool/core/add.py')
-rw-r--r-- | gr-utils/python/modtool/core/add.py | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/gr-utils/python/modtool/core/add.py b/gr-utils/python/modtool/core/add.py index a011b594f3..e74509f930 100644 --- a/gr-utils/python/modtool/core/add.py +++ b/gr-utils/python/modtool/core/add.py @@ -1,5 +1,5 @@ # -# Copyright 2013-2014,2017,2018 Free Software Foundation, Inc. +# Copyright 2013-2014,2017-2019 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -175,6 +175,20 @@ class ModToolAdd(ModTool): except IOError: logger.warning("Can't add C++ QA files.") + def _run_cc_qa_boostutf(self): + " Add C++ QA files for 3.8 API if intructed from _run_lib" + fname_qa_cc = 'qa_{}.cc'.format(self.info['blockname']) + self._write_tpl('qa_cpp_boostutf', 'lib', fname_qa_cc) + if self.skip_cmakefiles: + return + try: + append_re_line_sequence(self._file['cmlib'], + 'list\(APPEND test_{}_sources.*\n'.format(self.info['modname']), + 'qa_{}.cc'.format(self.info['blockname'])) + self.scm.mark_files_updated((self._file['cmlib'],)) + except IOError: + logger.warning("Can't add C++ QA files.") + def _run_lib(self): """ Do everything that needs doing in the subdir 'lib' and 'include'. - add .cc and .h files @@ -199,7 +213,9 @@ class ModToolAdd(ModTool): self._write_tpl('block_h36', self.info['includedir'], fname_h) self._write_tpl('block_cpp36', 'lib', fname_cc) if self.add_cc_qa: - if self.info['version'] in ('37', '38') : + if self.info['version'] == '38': + self._run_cc_qa_boostutf() + elif self.info['version'] == '37': self._run_cc_qa() elif self.info['version'] == '36': logger.warning("Warning: C++ QA files not supported for 3.6-style OOTs.") |