diff options
| author | Ganesh Viswanathan <dev@genotrance.com> | 2019-09-13 21:56:29 -0700 |
|---|---|---|
| committer | Ganesh Viswanathan <dev@genotrance.com> | 2019-10-02 15:31:53 -0500 |
| commit | 4ed751ad5a64c868cf5cc087114827b426a9c07e (patch) | |
| tree | cfa524c2e8f85880be09f5b6b68a16e406544e0f | |
| parent | b0447677f1e02ec7d6b070e374e5e92b3ad0ce51 (diff) | |
| download | nimterop-4ed751ad5a64c868cf5cc087114827b426a9c07e.tar.gz nimterop-4ed751ad5a64c868cf5cc087114827b426a9c07e.zip | |
Add ccache support
| -rw-r--r-- | nimterop/build.nim | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nimterop/build.nim b/nimterop/build.nim index 2563bb8..f2d4692 100644 --- a/nimterop/build.nim +++ b/nimterop/build.nim @@ -571,9 +571,11 @@ proc buildLibrary(lname, outdir, conFlags, cmakeFlags, makeFlags: string): strin gen = "MinGW Makefiles".quoteShell else: gen = "Unix Makefiles".quoteShell - cmake(outdir / "build", "Makefile", &".. -G {gen} {cmakeFlags}") + if findExe("ccache").len != 0: + gen &= " -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache" + makePath = outdir / "buildcache" + cmake(makePath, "Makefile", &".. -G {gen} {cmakeFlags}") cmakeDeps = true - makePath = outdir / "build" else: cmakeDepStr &= "cmake executable missing" |
