mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-24 09:31:34 +08:00
Run ASAN/TSAN jobs with clang
Bring back removed tests/Makefile
This commit is contained in:
parent
49d663f6c8
commit
368b3699d0
20
.travis.yml
20
.travis.yml
@ -38,6 +38,14 @@ addons: &clang35
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.5
|
||||
|
||||
addons: &clang6
|
||||
apt:
|
||||
packages:
|
||||
- clang-6.0
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-6.0
|
||||
|
||||
matrix:
|
||||
include:
|
||||
# Test gcc-4.8: C++11, Build=Debug/Release
|
||||
@ -76,15 +84,15 @@ matrix:
|
||||
os: linux
|
||||
addons: *clang35
|
||||
|
||||
# Test gcc-7: C++11, Build=Debug, ASAN=On
|
||||
- env: GCC_VERSION=7 BUILD_TYPE=Debug CPP=11 ASAN=On
|
||||
# Test clang-6.0: C++11, Build=Debug, ASAN=On
|
||||
- env: CLANG_VERSION=6.0 BUILD_TYPE=Debug CPP=11 ASAN=On
|
||||
os: linux
|
||||
addons: *gcc7
|
||||
addons: *clang6
|
||||
|
||||
# Test gcc-7: C++11, Build=Debug, TSAN=On
|
||||
- env: GCC_VERSION=7 BUILD_TYPE=Debug CPP=11 TSAN=On
|
||||
# Test clang-6.0: C++11, Build=Debug, TSAN=On
|
||||
- env: CLANG_VERSION=6.0 BUILD_TYPE=Debug CPP=11 TSAN=On
|
||||
os: linux
|
||||
addons: *gcc7
|
||||
addons: *clang6
|
||||
|
||||
before_install:
|
||||
- if [ -n "$GCC_VERSION" ]; then export CXX="g++-${GCC_VERSION}" CC="gcc-${GCC_VERSION}"; fi
|
||||
|
22
tests/Makefile
Normal file
22
tests/Makefile
Normal file
@ -0,0 +1,22 @@
|
||||
CXX ?= g++
|
||||
CXXFLAGS = -Wall -pedantic -std=c++11 -pthread -O3 -I../include -fmax-errors=1
|
||||
LDPFALGS = -pthread
|
||||
|
||||
CPP_FILES := $(wildcard *.cpp)
|
||||
OBJ_FILES := $(addprefix ./,$(notdir $(CPP_FILES:.cpp=.o)))
|
||||
|
||||
|
||||
tests: $(OBJ_FILES)
|
||||
$(CXX) $(CXXFLAGS) $(LDPFALGS) -o $@ $^
|
||||
mkdir -p logs
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CXXFLAGS) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -f tests *.o logs/*.txt
|
||||
|
||||
rebuild: clean tests
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user