Browse Source

Add support to import custom variables from parent SConstruct (redux)

(cherry picked from commit 982e01ec7f2eb38b725282e82584cbce201c0cce)
Adam Scott 2 years ago
parent
commit
f8054cca80
1 changed files with 4 additions and 0 deletions
  1. 4 0
      SConstruct

+ 4 - 0
SConstruct

@@ -21,6 +21,10 @@ env.PrependENVPath("PATH", os.getenv("PATH"))
 
 # Custom options and profile flags.
 customs = ["custom.py"]
+try:
+    customs += Import("customs")
+except:
+    pass
 profile = ARGUMENTS.get("profile", "")
 if profile:
     if os.path.isfile(profile):