diff options
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.") |