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