build_support_freebsd.sh 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/usr/bin/env bash
  2. ##############################################################################
  3. # FreeBSD support functions
  4. ##############################################################################
  5. #
  6. # This script file can be included in build scripts for FreeBSD.
  7. #
  8. ##############################################################################
  9. # Setup build environment
  10. if [ "${TERM-}" -a -x /usr/local/bin/tput ]; then
  11. COLOR_RED=$(/usr/local/bin/tput setaf 1)
  12. COLOR_GREEN=$(/usr/local/bin/tput setaf 2)
  13. COLOR_BLUE=$(/usr/local/bin/tput setaf 4)
  14. COLOR_ORANGE=$(/usr/local/bin/tput setaf 3)
  15. COLOR_RESET=$(/usr/local/bin/tput sgr0)
  16. else
  17. COLOR_RED=""
  18. COLOR_GREEN=""
  19. COLOR_BLUE=""
  20. COLOR_ORANGE=""
  21. COLOR_RESET=""
  22. fi
  23. if [ "${CI}" -o "${QUIET}" ]; then
  24. export CURLCMD="curl --silent --show-error --location -O"
  25. else
  26. export CURLCMD="curl --progress-bar --location --continue-at - -O"
  27. fi
  28. _add_ccache_to_path() {
  29. if [ "${CMAKE_CCACHE_OPTIONS}" ]; then
  30. PATH="/usr/local/opt/ccache/libexec:${PATH}"
  31. status "Compiler Info:"
  32. local IFS=$'\n'
  33. for COMPILER_INFO in $(type cc c++ gcc g++ clang clang++ || true); do
  34. info "${COMPILER_INFO}"
  35. done
  36. fi
  37. }