Вызов CMake с ключами -B и -H

This commit is contained in:
Andrei Astafev 2019-11-27 16:18:37 +03:00
parent c04395ef98
commit 9952d86269

View File

@ -127,9 +127,7 @@ generate_configuration() {
fi
fi
mkdir -p "${GEN_DIR}"
pushd "${GEN_DIR}" 2>/dev/null
cmake -G "${GENERATOR}" -DCMAKE_INSTALL_PREFIX="${OUTPUT_DIR}" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" ${CMAKE_ARGS} "${SOURCE_DIR}"
cmake -B"${GEN_DIR}" -H"${SOURCE_DIR}" -G "${GENERATOR}" -DCMAKE_INSTALL_PREFIX="${OUTPUT_DIR}" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" ${CMAKE_ARGS}
if [ "x$GENERATOR" == "xNinja" ]; then
# Generate fake Makefile, so make can run ninja build
cat > Makefile <<EOF
@ -140,7 +138,6 @@ build:
@ninja
EOF
fi
popd 2>/dev/null
}
export -f generate_configuration