diff options
author | Thomas Habets <thomas@habets.se> | 2020-05-03 20:32:21 +0100 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2020-07-14 10:08:42 -0400 |
commit | 7136f861dd700111999337f08bee9df3a3fadb11 (patch) | |
tree | 86f2312451f23181b650f77bd17648f3a31a81bd /gr-utils/modtool/core/newmod.py | |
parent | 5a7a46e27e5fa1effb0ead8914955b2ac8a2c180 (diff) |
modtool: Run all generated C++ code through clang-format
Diffstat (limited to 'gr-utils/modtool/core/newmod.py')
-rw-r--r-- | gr-utils/modtool/core/newmod.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gr-utils/modtool/core/newmod.py b/gr-utils/modtool/core/newmod.py index a995b6e278..deeaf7e988 100644 --- a/gr-utils/modtool/core/newmod.py +++ b/gr-utils/modtool/core/newmod.py @@ -67,6 +67,11 @@ class ModToolNewModule(ModTool): logger.info(f"Creating out-of-tree module in {self.dir}...") try: shutil.copytree(self.srcdir, self.dir) + try: + shutil.copyfile(os.path.join(gr.prefix(), 'share', 'gnuradio', 'clang-format.conf'), + os.path.join(self.dir, '.clang-format')) + except FileNotFoundError as e: + logger.info(f'Failed to copy .clang-format: {e}') os.chdir(self.dir) except OSError: raise ModToolException(f'Could not create directory {self.dir}.') |