Skip to content

Commit

Permalink
Add linux debugging script (#719)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkewley committed Jul 11, 2023
1 parent bd7560d commit b107f04
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions scripts/build_linux_debugging.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

# build OSC with all the necessary debugging bells and whistles
# that are used during a release

CC=clang CXX=clang++ CCFLAGS=-fsanitize=address CXXFLAGS=-fsanitize=address cmake -S third_party/ -B osc-deps-build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${PWD}/osc-deps-install
cmake --build osc-deps-build/ -v -j$(nproc)

CC=clang CXX=clang++ CCFLAGS=-fsanitize=address CXXFLAGS=-fsanitize=address cmake -S . -B osc-build -DCMAKE_BUILD_TYPE=Debug -DOSC_FORCE_ASSERTS_ENABLED=ON -DOSC_FORCE_UNDEFINE_NDEBUG=ON -DCMAKE_PREFIX_PATH=${PWD}/osc-deps-install -DCMAKE_INSTALL_PREFIX=${PWD}/osc-install
cmake --build osc-build -j$(nproc)

# run tests
./osc-build/tests/oscar/testoscar
ASAN_OPTIONS=detect_leaks=0 ./osc-build/tests/OpenSimCreator/testopensimcreator --gtest_filter=*CanAddAnyForceWithoutASegfault*

0 comments on commit b107f04

Please sign in to comment.