From 1c2cd11645b33aadee31c37e15f4a24d6ae37587 Mon Sep 17 00:00:00 2001
From: Kevin Smith <git@kismith.co.uk>
Date: Sat, 9 Jul 2011 21:50:55 +0100
Subject: Allow ccache when compiling from xcode


diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index d752348..4a4f9ab 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -264,6 +264,9 @@ if target in ["iphone-device", "iphone-simulator", "xcode"] :
 	# Set the build flags
 	env["CC"] = "$XCODE_PLATFORM_DEVELOPER_BIN_DIR/gcc"
 	env["CXX"] = "$XCODE_PLATFORM_DEVELOPER_BIN_DIR/g++"
+	if env.get("ccache", False):
+		env["CC"] = "ccache " + env["CC"]
+		env["CXX"] = "ccache " + env["CXX"]
 	env["OBJCCFLAGS"] = ["-fobjc-abi-version=2", "-fobjc-legacy-dispatch"]
 	env["LD"] = env["CC"]
 	env.Append(CCFLAGS = env["XCODE_ARCH_FLAGS"] + ["-fvisibility=hidden"])
-- 
cgit v0.10.2-6-g49f6