Disable extra tests unless FMT_EXTRA_TESTS is set.

This commit is contained in:
Victor Zverovich 2014-06-06 06:35:28 -07:00
parent 60cd838f1c
commit 7042d14341
3 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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)

View File

@ -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