Fixes, refactors and enhances Linux build-scripts (#8269)

* fixes and refactors linux build scripts
 - build_linux.sh: fixes wrong AppImage build folder; refactors script; enhances help text
 - harmonizes names: BuildLinux.sh and BuildLinuxImage.sh
 - fixes file permissions: cmake inherits .in-file permission; removes chmod 755 in scripts
 - linux.d/debian: removes false positive error message
 - updates documentation

* enables ANSI-colored output for GNU or Clang

* build_linux.sh: adds -p flag to disable PCH for boosting ccache hit rate

* Allow compilation on distributions based on Ubuntu/Debian (#8625)

* build_linux.sh: takes over changes from BuildLinux.sh

* CMakeLists.txt: removes leftovers, enables ANSI-colored output

* CMakeLists.txt: fixes issue where FORCE_COLORED_OUTPUT was not respected form environment (introduces -C cli arg)

* merges 5df4275: Make it easy to pass extra build args to deps and orca in BuildLinux.sh (#9648)
This commit is contained in:
Dipl.-Ing. Raoul Rubien, BSc
2025-06-14 18:41:20 +02:00
committed by GitHub
parent 153c478c35
commit 6da7fe62a2
14 changed files with 252 additions and 233 deletions

View File

@@ -108,6 +108,15 @@ set(SLIC3R_GTK "2" CACHE STRING "GTK version to use with wxWidgets on Linux")
set(IS_CROSS_COMPILE FALSE)
option (COLORED_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." OFF)
if (${COLORED_OUTPUT})
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
add_compile_options (-fdiagnostics-color=always)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_compile_options (-fcolor-diagnostics)
endif ()
endif ()
if (APPLE)
set(CMAKE_FIND_FRAMEWORK LAST)
set(CMAKE_FIND_APPBUNDLE LAST)
@@ -806,7 +815,7 @@ endif()
if (NOT WIN32 AND NOT APPLE)
set(SLIC3R_APP_CMD "orca-slicer")
configure_file(${LIBDIR}/platform/unix/build_appimage.sh.in ${CMAKE_CURRENT_BINARY_DIR}/build_appimage.sh @ONLY)
configure_file(${LIBDIR}/platform/unix/build_appimage.sh.in ${CMAKE_CURRENT_BINARY_DIR}/build_appimage.sh USE_SOURCE_PERMISSIONS @ONLY)
endif()
option(BUILD_BBS_TEST_TOOLS "Build bbs test tools" OFF)