Skip to content

Commit eff4170

Browse files
committed
Merge pull request #2226 from rintaro/build-script-clearcache
[build-script] Clear CMakeCache.txt before (re)configuration.
2 parents d84db4c + 6f1d5bf commit eff4170

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

utils/build-script-impl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2037,10 +2037,12 @@ for deployment_target in "${HOST_TARGET}" "${CROSS_TOOLS_DEPLOYMENT_TARGETS[@]}"
20372037
fi
20382038

20392039
# Configure if necessary.
2040-
if [[ "${RECONFIGURE}" || ! -f "${build_dir}/CMakeCache.txt" || \
2040+
cmake_cache_path="${build_dir}/CMakeCache.txt"
2041+
if [[ "${RECONFIGURE}" || ! -f "${cmake_cache_path}" || \
20412042
( ! -z "${generator_output_path}" && ! -f "${generator_output_path}" ) ]] ; then
2042-
mkdir -p "${build_dir}"
20432043
set -x
2044+
mkdir -p "${build_dir}"
2045+
rm -f "${cmake_cache_path}"
20442046
(cd "${build_dir}" && "${CMAKE}" "${cmake_options[@]}" ${USER_CONFIG_ARGS})
20452047
{ set +x; } 2>/dev/null
20462048
fi

0 commit comments

Comments
 (0)