Allow building tests separately from Orca with build_linux.sh

This commit is contained in:
Cory Cross
2025-11-03 10:48:30 -08:00
parent b48dd917fd
commit c92826f54d
2 changed files with 31 additions and 15 deletions

View File

@@ -27,7 +27,6 @@ function usage() {
echo " -L: use ld.lld as linker (if available)"
echo "For a first use, you want to './${SCRIPT_NAME} -u'"
echo " and then './${SCRIPT_NAME} -dsi'"
echo "To build with tests: './${SCRIPT_NAME} -st' or './${SCRIPT_NAME} -dst'"
}
SLIC3R_PRECOMPILED_HEADERS="ON"
@@ -102,11 +101,6 @@ if [ ${OPTIND} -eq 1 ] ; then
exit 1
fi
if [[ -n "${BUILD_TESTS}" ]] && [[ -z "${BUILD_ORCA}" ]] ; then
echo "-t flag requires -s flag in the same invocation"
exit 1
fi
function check_available_memory_and_disk() {
FREE_MEM_GB=$(free --gibi --total | grep 'Mem' | rev | cut --delimiter=" " --fields=1 | rev)
MIN_MEM_GB=10
@@ -221,7 +215,7 @@ if [[ -n "${BUILD_DEPS}" ]] ; then
print_and_run cmake --build deps/$BUILD_DIR
fi
if [[ -n "${BUILD_ORCA}" ]] ; then
if [[ -n "${BUILD_ORCA}" ]] || [[ -n "${BUILD_TESTS}" ]] ; then
echo "Configuring OrcaSlicer..."
if [[ -n "${CLEAN_BUILD}" ]] ; then
print_and_run rm -fr $BUILD_DIR
@@ -243,11 +237,13 @@ if [[ -n "${BUILD_ORCA}" ]] ; then
"${COLORED_OUTPUT}" \
"${BUILD_ARGS[@]}"
echo "done"
echo "Building OrcaSlicer ..."
print_and_run cmake --build $BUILD_DIR --config "${BUILD_CONFIG}" --target OrcaSlicer
echo "Building OrcaSlicer_profile_validator .."
print_and_run cmake --build $BUILD_DIR --config "${BUILD_CONFIG}" --target OrcaSlicer_profile_validator
./scripts/run_gettext.sh
if [[ -n "${BUILD_ORCA}" ]]; then
echo "Building OrcaSlicer ..."
print_and_run cmake --build $BUILD_DIR --config "${BUILD_CONFIG}" --target OrcaSlicer
echo "Building OrcaSlicer_profile_validator .."
print_and_run cmake --build $BUILD_DIR --config "${BUILD_CONFIG}" --target OrcaSlicer_profile_validator
./scripts/run_gettext.sh
fi
if [[ -n "${BUILD_TESTS}" ]] ; then
echo "Building tests ..."
print_and_run cmake --build ${BUILD_DIR} --config "${BUILD_CONFIG}" --target tests/all