From 4ad93ea7d03277735a8688943d00645dda4efc94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luc=C3=ADa=20Andrea=20Illanes=20Albornoz?= Date: Mon, 20 Mar 2023 19:10:32 +0100 Subject: Correctly pass ccache to CMake. --- build.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 7402a721..da3fb631 100755 --- a/build.sh +++ b/build.sh @@ -194,10 +194,10 @@ buildp_init_args_ccache() { local _bpiac_rstatus="${1#\$}" \ _bpiac_target=""; - if [ "${ARG_CCACHE:-0}" -eq 1 ]; then + if [ "${ARG_CCACHE:+1}" = 1 ]; then for _bpiac_target in CROSS HOST NATIVE SOFORT_NATIVE; do - eval "DEFAULT_${_bpiac_target}_CC"=\"ccache \${DEFAULT_${_bpiac_target}_CC}\"; - eval "DEFAULT_${_bpiac_target}_CXX"=\"ccache \${DEFAULT_${_bpiac_target}_CXX}\"; + eval "DEFAULT_${_bpiac_target}_CC"=\"${ARG_CCACHE} \${DEFAULT_${_bpiac_target}_CC}\"; + eval "DEFAULT_${_bpiac_target}_CXX"=\"${ARG_CCACHE} \${DEFAULT_${_bpiac_target}_CXX}\"; done; fi; @@ -226,7 +226,7 @@ buildp_init_getopts_fn() { case "${_bpigf_opt}" in --as-needed) ARG_AS_NEEDED=1; _bpigf_shiftfl=1; ;; - --ccache) ARG_CCACHE=1; _bpigf_shiftfl=1; ;; + --ccache) ARG_CCACHE="ccache"; _bpigf_shiftfl=1; ;; --debug-minipx) ARG_DEBUG_MINIPIX=1; _bpigf_shiftfl=1; ;; --help) _bpigf_shiftfl=1; ;; --reset-state) ARG_RESET_PKG=1; _bpigf_shiftfl=1; ;; -- cgit v1.2.3