1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-25 17:31:36 +01:00

Merge pull request #625 from ivankravets/master

Provide custom build configuration for the PlatformIO
This commit is contained in:
Mark VanderVoord
2022-11-12 20:34:06 -05:00
committed by GitHub
2 changed files with 21 additions and 1 deletions

View File

@@ -11,5 +11,8 @@
},
"frameworks": "*",
"platforms": "*",
"headers": "unity.h"
"headers": "unity.h",
"build": {
"extraScript": "platformio-build.py"
}
}

17
platformio-build.py Normal file
View File

@@ -0,0 +1,17 @@
import os
Import("env")
env.Append(CPPDEFINES=["UNITY_INCLUDE_CONFIG_H"])
# import "unity_config.h" folder to the library builder
try:
Import("projenv")
projenv.Append(CPPDEFINES=["UNITY_INCLUDE_CONFIG_H"])
for p in projenv["CPPPATH"]:
p = projenv.subst(p)
if os.path.isfile(os.path.join(p, "unity_config.h")):
env.Prepend(CPPPATH=[p])
except:
pass