Вызов CMake с ключами -B и -H
This commit is contained in:
parent
c04395ef98
commit
9952d86269
5
cmake.sh
5
cmake.sh
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user