Mk/bsd.ccache.mk: Fix ccache for ports that have USES=llvm and USES=cmake

PR:		284893
Approved by:	Rene Ladan <rene@FreeBSD.org> (on behalf of portmgr@)
This commit is contained in:
Yuri Victorovich 2025-03-22 22:09:17 -07:00
parent 3fe34c578d
commit 56538adacf

View file

@ -105,4 +105,12 @@ ccache-wrkdir-link: ${WRKDIR}/.ccache .PHONY
post-extract: ccache-wrkdir-link
. endif
# enable ccache in case of USES=llvm and cmake
. if ${CCACHE_ENABLED} == yes && \
defined(_INCLUDE_USES_LLVM_MK) && \
defined(_INCLUDE_USES_CMAKE_MK)
CMAKE_ARGS+= -DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
. endif
.endif