Skip to content

Commit

Permalink
Add support for “.*cc” extension // Resolve #939
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Apr 15, 2017
1 parent 44be1dc commit abb2fb7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ PlatformIO 3.0
* Handle dynamic ``SRC_FILTER`` environment variable from
`library.json extra script <http://docs.platformio.org/page/librarymanager/config.html#extrascript>`__
* 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 <https://github.com/platformio/platformio-core/issues/939>`_)

-------

Expand Down
3 changes: 2 additions & 1 deletion platformio/builder/tools/piolib.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ def get_used_frameworks(env, path):
# 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()
Expand Down
2 changes: 1 addition & 1 deletion platformio/builder/tools/platformio.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

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, "-<svn%s>" % sep]

Expand Down

0 comments on commit abb2fb7

Please sign in to comment.