Вызов 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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p "${GEN_DIR}"
|
cmake -B"${GEN_DIR}" -H"${SOURCE_DIR}" -G "${GENERATOR}" -DCMAKE_INSTALL_PREFIX="${OUTPUT_DIR}" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" ${CMAKE_ARGS}
|
||||||
pushd "${GEN_DIR}" 2>/dev/null
|
|
||||||
cmake -G "${GENERATOR}" -DCMAKE_INSTALL_PREFIX="${OUTPUT_DIR}" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" ${CMAKE_ARGS} "${SOURCE_DIR}"
|
|
||||||
if [ "x$GENERATOR" == "xNinja" ]; then
|
if [ "x$GENERATOR" == "xNinja" ]; then
|
||||||
# Generate fake Makefile, so make can run ninja build
|
# Generate fake Makefile, so make can run ninja build
|
||||||
cat > Makefile <<EOF
|
cat > Makefile <<EOF
|
||||||
@ -140,7 +138,6 @@ build:
|
|||||||
@ninja
|
@ninja
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
popd 2>/dev/null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export -f generate_configuration
|
export -f generate_configuration
|
||||||
|
Loading…
Reference in New Issue
Block a user