- Add a CCACHE_BIN variable for simplified use where needed.

This commit is contained in:
Bryan Drewery 2019-10-10 20:06:24 +00:00
parent 2d75318930
commit d500249dad
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=514246
3 changed files with 4 additions and 3 deletions

View file

@ -34,6 +34,7 @@ BUILD_DEPENDS+= ${LOCALBASE}/bin/ccache:devel/ccache
. endif
CCACHE_WRAPPER_PATH?= ${LOCALBASE}/libexec/ccache
CCACHE_BIN?= ${CCACHE_WRAPPER_PATH:C,/libexec/ccache$,,}/bin/ccache
.if exists(${CCACHE_WRAPPER_PATH})
# Prepend the ccache dir into the PATH and setup ccache env

View file

@ -74,8 +74,8 @@ CMAKE_ARGS+= -DPROC_TARGET_NUMBER="1"
.endif
.if "${WITH_CCACHE_BUILD}" == "yes" && !defined(NO_CCACHE) && !defined(NOCCACHE)
CMAKE_ARGS+= -DCMAKE_C_COMPILER_LAUNCHER=${CCACHE_WRAPPER_PATH:C,/libexec/ccache$,,}/bin/ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=${CCACHE_WRAPPER_PATH:C,/libexec/ccache$,,}/bin/ccache
CMAKE_ARGS+= -DCMAKE_C_COMPILER_LAUNCHER=${CCACHE_BIN} \
-DCMAKE_CXX_COMPILER_LAUNCHER=${CCACHE_BIN}
.endif
RTDIR= ${PREFIX}/libdata/${PORTNAME}

View file

@ -141,7 +141,7 @@ post-patch-SOURCES-off:
${WRKSRC}/src/bootstrap/install.rs
.if defined(WITH_CCACHE_BUILD) && !defined(NO_CCACHE) && !defined(NOCCACHE)
CCACHE_VALUE= "${CCACHE_WRAPPER_PATH:C,/libexec/ccache$,,}/bin/ccache"
CCACHE_VALUE= "${CCACHE_BIN}"
.else
CCACHE_VALUE= false
.endif