From abb2fb70450b0f406b0f5be50d0ef15b82ec1d10 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 15 Apr 2017 16:51:15 +0300 Subject: [PATCH] =?UTF-8?q?Add=20support=20for=20=E2=80=9C.*cc=E2=80=9D=20?= =?UTF-8?q?extension=20//=20Resolve=20#939?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HISTORY.rst | 6 ++++-- platformio/builder/tools/piolib.py | 3 ++- platformio/builder/tools/platformio.py | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 0f5843c4..5b4f13df 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -13,8 +13,10 @@ PlatformIO 3.0 * Handle dynamic ``SRC_FILTER`` environment variable from `library.json extra script `__ * Improved auto-detecting of mbed-enabled media disks -* Update Git-submodules for development platforms and libraries which were - installed from repository +* Automatically update Git-submodules for development platforms and libraries + that were installed from repository +* Add support for ``.*cc`` extension + (`issue #939 `_) ------- diff --git a/platformio/builder/tools/piolib.py b/platformio/builder/tools/piolib.py index 0531d65e..1daedc6b 100644 --- a/platformio/builder/tools/piolib.py +++ b/platformio/builder/tools/piolib.py @@ -65,7 +65,8 @@ class LibBuilderFactory(object): # check source files for root, _, files in os.walk(path, followlinks=True): for fname in files: - if not env.IsFileWithExt(fname, ("c", "cpp", "h", "hpp")): + if not env.IsFileWithExt( + fname, piotool.SRC_BUILD_EXT + piotool.SRC_HEADER_EXT): continue with open(join(root, fname)) as f: content = f.read() diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index 8b09e248..1f2186cf 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -27,7 +27,7 @@ from SCons.Util import case_sensitive_suffixes, is_Sequence from platformio.util import glob_escape, pioversion_to_intstr -SRC_BUILD_EXT = ["c", "cpp", "S", "spp", "SPP", "sx", "s", "asm", "ASM"] +SRC_BUILD_EXT = ["c", "cc", "cpp", "S", "spp", "SPP", "sx", "s", "asm", "ASM"] SRC_HEADER_EXT = ["h", "hpp"] SRC_FILTER_DEFAULT = ["+<*>", "-<.git%s>" % sep, "-" % sep]