Browse Source

pio: filter single-source files by absolute path

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
mcspr-patch-1
Maxim Prokhorov 4 years ago
parent
commit
850db61b76
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      code/scripts/pio_pre.py

+ 6
- 3
code/scripts/pio_pre.py View File

@ -156,7 +156,10 @@ if "1" == os.environ.get("ESPURNA_BUILD_SINGLE_SOURCE", "0"):
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")

Loading…
Cancel
Save