From aa8aa3ba9fbb02b5aa6e8d02831fe128d49043be Mon Sep 17 00:00:00 2001 From: Niels Date: Sun, 29 May 2016 14:06:43 +0200 Subject: [PATCH] overworked coverity stuffy --- .travis.yml | 16 ++++++++-------- Makefile | 8 +++++++- doc/Makefile | 10 +++++++--- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6d23a0dd8..49d9efd4b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,7 +40,7 @@ matrix: description: "Build submitted via Travis CI" notification_email: niels.lohmann@gmail.com build_command_prepend: "make clean ; sudo cp $(which g++-5) $(which g++)" - build_command: "make doctest || true" + build_command: "make coverity" branch_pattern: coverity_scan env: COMPILER=g++-5 @@ -79,13 +79,13 @@ matrix: packages: ['clang-3.8', 'valgrind'] env: COMPILER=clang++-3.8 - - os: linux - compiler: clang - addons: - apt: - sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise'] - packages: ['clang-3.9', 'valgrind'] - env: COMPILER=clang++-3.9 + # - os: linux + # compiler: clang + # addons: + # apt: + # sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise'] + # packages: ['clang-3.9', 'valgrind'] + # env: COMPILER=clang++-3.9 - os: osx osx_image: beta-xcode6.1 diff --git a/Makefile b/Makefile index 6fdc06b9d..0a52b22da 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ all: json_unit # clean up clean: rm -fr json_unit json_benchmarks fuzz fuzz-testing *.dSYM + $(MAKE) clean -Cdoc ########################################################################## @@ -30,7 +31,12 @@ json_unit: test/src/unit.cpp src/json.hpp test/src/catch.hpp # compile example files and check output doctest: - make check_output -C doc + $(MAKE) check_output -C doc + + +# copmpile example files and do not check output (for coverity-scan) +coverity: + $(MAKE) compile_only -Cdoc CXXFLAGS="-std=c++11" CPPFLAGS="-I../src" ########################################################################## diff --git a/doc/Makefile b/doc/Makefile index dc10f1dd1..a34a0798d 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -2,9 +2,6 @@ SRCDIR = ../src all: doxygen -clean: - rm -fr me.nlohmann.json.docset html - ########################################################################## # example files @@ -40,10 +37,17 @@ create_output: $(EXAMPLES:.cpp=.output) create_links: $(EXAMPLES:.cpp=.link) +# only compile files +compile_only: $(EXAMPLES:.cpp=) + # check output of all stand-alone example files check_output: $(EXAMPLES:.cpp=.test) +clean: + rm -fr me.nlohmann.json.docset html $(EXAMPLES:.cpp=) + + ########################################################################## # Doxygen HTML documentation ##########################################################################