Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ add_test(
)

#-- spectator library
add_library(spectator
add_library(spectator SHARED
"spectator/logger.cc"
"spectator/publisher.cc"
"spectator/config.h"
Expand Down
19 changes: 13 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,21 @@ set -e

# usage: ./build.sh [clean|clean --confirm|skiptest]

BUILD_DIR=cmake-build
# Choose: Debug, Release, RelWithDebInfo and MinSizeRel. Use Debug for asan checking locally.
BUILD_TYPE=Debug
if [[ -z "$BUILD_DIR" ]]; then
BUILD_DIR="cmake-build"
fi

if [[ -z "$BUILD_TYPE" ]]; then
# Choose: Debug, Release, RelWithDebInfo and MinSizeRel. Use Debug for asan checking locally.
BUILD_TYPE="Debug"
fi

BLUE="\033[0;34m"
NC="\033[0m"

if [[ "$1" == "clean" ]]; then
echo -e "${BLUE}==== clean ====${NC}"
rm -rf $BUILD_DIR
rm -rf "$BUILD_DIR"
rm -f spectator/*.inc
if [[ "$2" == "--confirm" ]]; then
# remove all packages from the conan cache, to allow swapping between Release/Debug builds
Expand All @@ -22,8 +27,10 @@ if [[ "$1" == "clean" ]]; then
fi

if [[ "$OSTYPE" == "linux-gnu"* ]]; then
export CC=gcc-13
export CXX=g++-13
if [[ -z "$CC" || -z "$CXX" ]]; then
export CC=gcc-13
export CXX=g++-13
fi
fi

if [[ ! -f "$HOME/.conan2/profiles/default" ]]; then
Expand Down
Loading