mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 10:47:35 +02:00
Disable extra tests unless FMT_EXTRA_TESTS is set.
This commit is contained in:
@ -8,6 +8,6 @@ env:
|
|||||||
- BUILD_TYPE=Release
|
- BUILD_TYPE=Release
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE .
|
- cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DFMT_EXTRA_TESTS=ON .
|
||||||
- make -j4
|
- make -j4
|
||||||
- make test
|
- make test
|
||||||
|
@ -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.")
|
"Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
option(FMT_EXTRA_TESTS "Enable extra tests." OFF)
|
||||||
|
|
||||||
project(FORMAT)
|
project(FORMAT)
|
||||||
|
|
||||||
include(CheckCXXCompilerFlag)
|
include(CheckCXXCompilerFlag)
|
||||||
@ -49,7 +51,7 @@ if (CMAKE_COMPILER_IS_GNUCXX)
|
|||||||
set_target_properties(format PROPERTIES COMPILE_FLAGS
|
set_target_properties(format PROPERTIES COMPILE_FLAGS
|
||||||
"-Wall -Wextra -pedantic")
|
"-Wall -Wextra -pedantic")
|
||||||
endif ()
|
endif ()
|
||||||
if (CPP11_FLAG)
|
if (CPP11_FLAG AND FMT_EXTRA_TESTS)
|
||||||
set_target_properties(format PROPERTIES COMPILE_FLAGS ${CPP11_FLAG})
|
set_target_properties(format PROPERTIES COMPILE_FLAGS ${CPP11_FLAG})
|
||||||
# Test compilation with default flags.
|
# Test compilation with default flags.
|
||||||
file(GLOB src RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} test/*.cc test/*.h)
|
file(GLOB src RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} test/*.cc test/*.h)
|
||||||
|
@ -5,7 +5,7 @@ configuration:
|
|||||||
install:
|
install:
|
||||||
- set PATH=C:\Program Files (x86)\MSBuild\12.0\bin\;%PATH%
|
- set PATH=C:\Program Files (x86)\MSBuild\12.0\bin\;%PATH%
|
||||||
|
|
||||||
before_build: cmake .
|
before_build: cmake -DFMT_EXTRA_TESTS=ON .
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- msbuild /m:4 FORMAT.sln
|
- msbuild /m:4 FORMAT.sln
|
||||||
|
Reference in New Issue
Block a user