22from Buildhelper
import *
26 """ Modify the environment such as to redirect any
27 C/C++ compiler invocations through CCache, while using
28 CCache config variables found in the os.environment.
33 if not env[
'CCACHE']
in env[
'CC']:
34 env[
'CC'] = env.subst(
'$CCACHE $CC')
35 if not env[
'CCACHE']
in env[
'CXX']:
36 env[
'CXX'] = env.subst(
'$CCACHE $CXX')
37 print(env.subst(
"* Build using $CCACHE"))
58 if i
in os.environ
and i
not in env:
59 env[
'ENV'][i] = os.environ[i]
64 """ Ensure CCache is available.
checkCommandOption(env, optID, val=None, cmdName=None)
evaluate and verify an option, which may point at a command.