From 7042d14341df8c14760876ac0aaf761cf25efb0d Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 6 Jun 2014 06:35:28 -0700 Subject: [PATCH] Disable extra tests unless FMT_EXTRA_TESTS is set. --- .travis.yml | 2 +- CMakeLists.txt | 4 +++- appveyor.yml | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4ce58caf..947d9543 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,6 @@ env: - BUILD_TYPE=Release script: - - cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE . + - cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DFMT_EXTRA_TESTS=ON . - make -j4 - make test diff --git a/CMakeLists.txt b/CMakeLists.txt index 1554e253..a0c61dac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,8 @@ if (NOT CMAKE_BUILD_TYPE) "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.") endif () +option(FMT_EXTRA_TESTS "Enable extra tests." OFF) + project(FORMAT) include(CheckCXXCompilerFlag) @@ -49,7 +51,7 @@ if (CMAKE_COMPILER_IS_GNUCXX) set_target_properties(format PROPERTIES COMPILE_FLAGS "-Wall -Wextra -pedantic") endif () -if (CPP11_FLAG) +if (CPP11_FLAG AND FMT_EXTRA_TESTS) set_target_properties(format PROPERTIES COMPILE_FLAGS ${CPP11_FLAG}) # Test compilation with default flags. file(GLOB src RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} test/*.cc test/*.h) diff --git a/appveyor.yml b/appveyor.yml index cc50a30a..eed7fea9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,7 +5,7 @@ configuration: install: - set PATH=C:\Program Files (x86)\MSBuild\12.0\bin\;%PATH% -before_build: cmake . +before_build: cmake -DFMT_EXTRA_TESTS=ON . build_script: - msbuild /m:4 FORMAT.sln