Skip to content

Commit

Permalink
pio: filter single-source files by absolute path
Browse files Browse the repository at this point in the history
Specifically, this will break RFM69_SUPPORT on case insensitive
filesystems due to the RFM69.cpp from the RFM69 lib being ignored
when adding ESPurna's rfm69.cpp
  • Loading branch information
mcspr committed Nov 16, 2020
1 parent 12ae9d1 commit 850db61
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions code/scripts/pio_pre.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@ def ConvertInoToCpp(env):
for name in filenames:
if not name.endswith(".cpp"):
continue
path = os.path.relpath(os.path.join(root, name), "espurna")
env.AddBuildMiddleware(lambda node: None, "*?/{}".format(path))
cpp_files.append(path)

abspath = os.path.join(os.path.abspath(root), name)
env.AddBuildMiddleware(lambda node: None, abspath)

relpath = os.path.relpath(abspath, "espurna")
cpp_files.append(relpath)
merge_cpp(cpp_files, "espurna/espurna_single_source.cpp")

0 comments on commit 850db61

Please sign in to comment.