[distcc] When distcc is enabled force cmake to use localhost for configure testing.

It seems that distcc --randomize is causing cmake to invoke configuration
commands on remote machines. This is slow. Instead, just use the localhost host
when running cmake.

The rest of the build is distributed as normal.
This commit is contained in:
Michael Gottesman
2016-05-25 12:25:26 -07:00
parent 122350d450
commit f8d3b495f0

View File

@@ -1884,7 +1884,10 @@ for deployment_target in "${HOST_TARGET}" "${CROSS_COMPILE_TOOLS_DEPLOYMENT_TARG
( ! -z "${generator_output_path}" && ! -f "${generator_output_path}" ) ]] ; then
set -x
mkdir -p "${build_dir}"
(cd "${build_dir}" && "${CMAKE}" "${cmake_options[@]}" "${EXTRA_CMAKE_OPTIONS[@]}" "${source_dir}")
if [[ -n "${DISTCC}" ]]; then
EXTRA_DISTCC_OPTIONS="DISTCC_HOSTS=localhost,lzo,cpp"
fi
(cd "${build_dir}" && env "${EXTRA_DISTCC_OPTIONS}" "${CMAKE}" "${cmake_options[@]}" "${EXTRA_CMAKE_OPTIONS[@]}" "${source_dir}")
{ set +x; } 2>/dev/null
fi