A C++ library for logging very fast and without allocating.
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

46 líneas
1.0 KiB

  1. #!/usr/bin/env bash
  2. SNUGLOG_DIR=.
  3. if [ $# -ge 1 ]; then
  4. SNUGLOG_DIR=$1
  5. fi
  6. SNUGLOG_DIR=$(realpath "$SNUGLOG_DIR")
  7. source "$SNUGLOG_DIR/tools/config/defaults"
  8. if [ $# -ge 2 ]; then
  9. source "$2"
  10. elif [ -f "$SNUGLOG_DIR/tools/config/override" ]; then
  11. source "$SNUGLOG_DIR/tools/config/override"
  12. fi
  13. BUILD_DIR="$SNUGLOG_DIR/coverage"
  14. IS_NOISY_CMAKE=""
  15. if [ "$NOISY_CMAKE" -eq 1 ]; then
  16. IS_NOISY_CMAKE="-DCMAKE_VERBOSE_MAKEFILE=ON"
  17. fi
  18. if test "$MUST_REWRITE_PATHS" -eq 1 && test ! "$REWRITE_ENABLED" && [[ ! "$1" =~ /\s/g ]] && [[ ! "$2" =~ /\s/g ]]; then
  19. export REWRITE_ENABLED=1
  20. (echo "$0 $@" | /usr/bin/env bash) 2>&1 | sed $REWRITE_PATHS
  21. export REWRITE_ENABLED=0
  22. else
  23. rm -rf "$BUILD_DIR"
  24. mkdir -p "$BUILD_DIR"
  25. cd "$BUILD_DIR" || exit
  26. cmake \
  27. -DCODE_COVERAGE=ON \
  28. -DCMAKE_BUILD_TYPE=Debug \
  29. "-DCMAKE_C_COMPILER=$C_COMPILER" \
  30. "-DCMAKE_CXX_COMPILER=$CXX_COMPILER" \
  31. $IS_NOISY_CMAKE \
  32. "-DLLVM_COV_PATH=$LLVM_COV" \
  33. "-DLLVM_PROFDATA_PATH=$LLVM_PROFDATA" \
  34. "$SNUGLOG_DIR"
  35. make -j3 ccov-tests
  36. fi