diff --git a/.travis.yml b/.travis.yml index 7be58e63..9e127233 100644 --- a/.travis.yml +++ b/.travis.yml @@ -203,9 +203,13 @@ install: before_script: - export CXX=${COMPILER} - cd ${TRAVIS_BUILD_DIR} - # Only run valgrind in debug build - - cmake -H. -BBuild-Debug -DCMAKE_BUILD_TYPE=Debug -Wdev -DUSE_CPP14=${CPP14} -DUSE_VALGRIND=${VALGRIND} -DNO_SELFTEST=${ENV_NO_SELFTEST} -DBUILD_EXAMPLES=${ENV_BUILD_EXAMPLES} - - cmake -H. -BBuild-Release -DCMAKE_BUILD_TYPE=Release -Wdev -DUSE_CPP14=${CPP14} -DNO_SELFTEST=${ENV_NO_SELFTEST} -DBUILD_EXAMPLES=${ENV_BUILD_EXAMPLES} + # Regenerate single header file, so it is tested in the examples... + - python scripts/generateSingleHeader.py + + # Use Debug builds for running Valgrind and building examples + - cmake -H. -BBuild-Debug -DCMAKE_BUILD_TYPE=Debug -Wdev -DUSE_CPP14=${CPP14} -DUSE_VALGRIND=${VALGRIND} -DBUILD_EXAMPLES=ON + # Check that we don't miscompile with optimalizations... + - cmake -H. -BBuild-Release -DCMAKE_BUILD_TYPE=Release -Wdev -DUSE_CPP14=${CPP14} script: - cd Build-Debug diff --git a/CMakeLists.txt b/CMakeLists.txt index aaa8877a..106f23ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 3.0) project(CatchSelfTest) option(USE_VALGRIND "Perform SelfTests with Valgrind" OFF) +option(BUILD_EXAMPLES "Build documentation examples" OFF) set_property(GLOBAL PROPERTY USE_FOLDERS ON) diff --git a/appveyor.yml b/appveyor.yml index 2f7084ae..f3a2c5bd 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,24 +20,11 @@ environment: - additional_flags: "/D_UNICODE /DUNICODE" wmain: 1 - - additional_flags: "" - wmain: 0 - env_build_examples: 1 - env_no_selftest: 1 - matrix: exclude: - os: Visual Studio 2015 additional_flags: "/permissive- /std:c++latest" - - os: Visual Studio 2015 - env_build_examples: 1 - env_no_selftest: 1 - - - configuration: Debug - env_build_examples: 1 - env_no_selftest: 1 - init: - git config --global core.autocrlf input # Set build version to git commit-hash @@ -59,8 +46,9 @@ configuration: #Cmake will autodetect the compiler, but we set the arch before_build: + - python scripts/generateSingleHeader.py - set CXXFLAGS=%additional_flags% - - cmake -H. -BBuild -A%PLATFORM% -DUSE_WMAIN=%wmain% -DNO_SELFTEST=%env_no_selftest% -DBUILD_EXAMPLES=%env_build_examples% + - cmake -H. -BBuild -A%PLATFORM% -DUSE_WMAIN=%wmain% -DBUILD_EXAMPLES=ON # build with MSBuild build: