maintainer-feedback requested: [Bug 242945] devel/cmake: bad interaction with non-default compilers: cmake loses ccache

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Dec 28 16:59:40 GMT 2019


Matthias Andree <mandree at FreeBSD.org> has asked kde at FreeBSD.org for
maintainer-feedback:
Bug 242945: devel/cmake: bad interaction with non-default compilers: cmake
loses ccache
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242945



--- Description ---
Greetings,

our ccache rigging is incomplete and fails if a port uses cmake to build and
also a non-default compiler, such as a versioned cc/c++, or USE_GCC, or
thereabouts.

In that situation, cmake derives an absolute path (of the compiler) and loses
the ccache wrapper.

My current workaround, in, for instance, graphics/rawtherapee/Makefile, is:

.if "${WITH_CCACHE_BUILD}" == "yes" && !defined(NO_CCACHE)
CMAKE_ARGS+=	-DCMAKE_C_COMPILER_LAUNCHER=${CCACHE_BIN} \
		-DCMAKE_CXX_COMPILER_LAUNCHER=${CCACHE_BIN}
.endif

It would be good if either devel/cmake, or Mk/Uses/cmake.mk, or
Mk/bsd.ccache.mk would avoid the need of spilling this to all medium- to
heaviweight ports.


More information about the kde-freebsd mailing list