Files
ArduinoJson/scripts/travis/cmake.sh

23 lines
373 B
Bash
Raw Normal View History

#!/bin/sh -ex
2016-05-15 09:41:53 +02:00
if [ -n "$GCC" ]; then
export CC="gcc-$GCC"
export CXX="g++-$GCC"
fi
if [ -n "$CLANG" ]; then
export CC="clang-$CLANG"
export CXX="clang++-$CLANG"
fi
if [ -n "$SANITIZE" ]; then
export CXXFLAGS="-fsanitize=$SANITIZE"
2019-02-27 17:41:40 +01:00
BUILD_TYPE="Debug"
else
BUILD_TYPE="Release"
fi
2019-02-28 17:26:29 +01:00
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE .
cmake --build .
ctest --output-on-failure .