mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Restore PIO macros if it was deleted by framework
This commit is contained in:
@ -35,10 +35,13 @@ SRC_DEFAULT_FILTER = " ".join([
|
||||
|
||||
def BuildProgram(env):
|
||||
|
||||
env.Append(
|
||||
CPPDEFINES=["PLATFORMIO={0:02d}{1:02d}{2:02d}".format(
|
||||
*pioversion_to_intstr())],
|
||||
)
|
||||
def _append_pio_macros():
|
||||
env.AppendUnique(
|
||||
CPPDEFINES=["PLATFORMIO={0:02d}{1:02d}{2:02d}".format(
|
||||
*pioversion_to_intstr())],
|
||||
)
|
||||
|
||||
_append_pio_macros()
|
||||
|
||||
# fix ASM handling under non-casitive OS
|
||||
if not case_sensitive_suffixes(".s", ".S"):
|
||||
@ -60,6 +63,9 @@ def BuildProgram(env):
|
||||
env.BuildFrameworks([
|
||||
f.lower().strip() for f in env.get("FRAMEWORK", "").split(",")])
|
||||
|
||||
# restore PIO macros if it was deleted by framework
|
||||
_append_pio_macros()
|
||||
|
||||
# build dependent libs
|
||||
deplibs = env.BuildDependentLibraries("$PROJECTSRC_DIR")
|
||||
|
||||
|
Reference in New Issue
Block a user