summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-06-11 11:28:03 +0200
committerCarl Hetherington <cth@carlh.net>2020-06-11 11:28:03 +0200
commitb6873c6f94eae3d25666caed1386b9cb3e503ed4 (patch)
treec3c0e2965365b9ad050913e28a4b848f7940c75f
parent2040b172163bea277be6ffe712bfd8a04dcbdb86 (diff)
Support ccache on Windows.
-rwxr-xr-xcdist11
1 files changed, 9 insertions, 2 deletions
diff --git a/cdist b/cdist
index 2474307..84814ac 100755
--- a/cdist
+++ b/cdist
@@ -627,8 +627,6 @@ class WindowsTarget(DockerTarget):
self.set('PKG_CONFIG_LIBDIR', '%s/lib/pkgconfig' % self.environment_prefix)
self.set('PKG_CONFIG_PATH', '%s/lib/pkgconfig:%s/bin/pkgconfig' % (self.directory, self.directory))
self.set('PATH', '%s/bin:%s:%s' % (self.environment_prefix, self.tool_path, os.environ['PATH']))
- self.set('CC', '%s-gcc' % self.name)
- self.set('CXX', '%s-g++' % self.name)
self.set('LD', '%s-ld' % self.name)
self.set('RANLIB', '%s-ranlib' % self.name)
self.set('WINRC', '%s-windres' % self.name)
@@ -643,6 +641,15 @@ class WindowsTarget(DockerTarget):
if environment_version is not None:
self.image += '_%s' % environment_version
+ def setup(self):
+ super().setup()
+ if self.ccache:
+ self.set('CC', '"ccache %s-gcc"' % self.name)
+ self.set('CXX', '"ccache %s-g++"' % self.name)
+ else:
+ self.set('CC', '%s-gcc' % self.name)
+ self.set('CXX', '%s-g++' % self.name)
+
@property
def library_prefix(self):
log_normal('Deprecated property library_prefix: use environment_prefix')