diff options
Diffstat (limited to 'BuildTools/SCons')
-rw-r--r-- | BuildTools/SCons/SConstruct | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct index 4a4f9ab..2f85786 100644 --- a/BuildTools/SCons/SConstruct +++ b/BuildTools/SCons/SConstruct @@ -105,13 +105,6 @@ if env.get("distcc", False) : env["ENV"]["DISTCC_HOSTS"] = env["distcc_hosts"] env["CC"] = "distcc gcc" env["CXX"] = "distcc g++" -if env.get("ccache", False) : - env["ENV"]["HOME"] = os.environ["HOME"] - for var in os.environ : - if var.startswith("CCACHE_") : - env["ENV"][var] = os.environ[var] - env["CC"] = "ccache gcc" - env["CXX"] = "ccache g++" if "cc" in env : env["CC"] = env["cc"] if "cxx" in env : @@ -277,6 +270,21 @@ if target in ["iphone-device", "iphone-simulator", "xcode"] : # Bit of a hack, because BOOST doesn't know the endianness for ARM env.Append(CPPDEFINES = ["_LITTLE_ENDIAN"]) +# CCache +if env.get("ccache", False) : + env["ENV"]["HOME"] = os.environ["HOME"] + for var in os.environ : + if var.startswith("CCACHE_") : + env["ENV"][var] = os.environ[var] + if env.get("CC", "") != "" : + env["CC"] = "ccache " + env["CC"] + else : + env["CC"] = "ccache gcc" + if env.get("CXX", "") != "" : + env["CXX"] = "ccache " + env["CXX"] + else : + env["CC"] = "ccache g++" + conf_env = env.Clone() Export("env") |