mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-25 10:01:33 +08:00
Merge branch 'v1.x' of https://github.com/gabime/spdlog into v1.x
This commit is contained in:
commit
4003218ceb
@ -104,6 +104,7 @@ script:
|
||||
-DCMAKE_CXX_STANDARD=$CPP \
|
||||
-DSPDLOG_BUILD_EXAMPLES=ON \
|
||||
-DSPDLOG_BUILD_BENCH=OFF \
|
||||
-DSPDLOG_BUILD_TESTS=ON \
|
||||
-DSPDLOG_SANITIZE_ADDRESS=$ASAN \
|
||||
-DSPDLOG_SANITIZE_THREAD=$TSAN
|
||||
- make VERBOSE=1 -j2
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
project(spdlog VERSION 1.3.0 LANGUAGES CXX)
|
||||
include(CTest)
|
||||
include(CMakeDependentOption)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
@ -53,11 +52,8 @@ endif()
|
||||
|
||||
option(SPDLOG_BUILD_EXAMPLES "Build examples" ${SPDLOG_MASTER_PROJECT})
|
||||
option(SPDLOG_BUILD_BENCH "Build benchmarks" ${SPDLOG_MASTER_PROJECT})
|
||||
option(SPDLOG_BUILD_TESTS "Build tests" ${SPDLOG_MASTER_PROJECT})
|
||||
|
||||
cmake_dependent_option(SPDLOG_BUILD_TESTING
|
||||
"Build spdlog tests" ${SPDLOG_MASTER_PROJECT}
|
||||
"BUILD_TESTING" OFF
|
||||
)
|
||||
|
||||
target_include_directories(
|
||||
spdlog
|
||||
@ -72,7 +68,8 @@ if(SPDLOG_BUILD_EXAMPLES)
|
||||
add_subdirectory(example)
|
||||
endif()
|
||||
|
||||
if(SPDLOG_BUILD_TESTING)
|
||||
if(SPDLOG_BUILD_TESTS)
|
||||
include(CTest)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
|
@ -29,4 +29,6 @@ build_script:
|
||||
cmake .. -G %GENERATOR% -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DSPDLOG_BUILD_BENCH=OFF
|
||||
|
||||
cmake --build . --config %BUILD_TYPE%
|
||||
test: off
|
||||
|
||||
test_script:
|
||||
- ctest -VV -C "%BUILD_TYPE%"
|
||||
|
@ -86,7 +86,7 @@ TEST_CASE("periodic flush", "[periodic_flush]")
|
||||
auto test_sink = std::static_pointer_cast<sinks::test_sink_mt>(logger->sinks()[0]);
|
||||
|
||||
spdlog::flush_every(std::chrono::seconds(1));
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1100));
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1250));
|
||||
REQUIRE(test_sink->flush_counter() == 1);
|
||||
spdlog::flush_every(std::chrono::seconds(0));
|
||||
spdlog::drop_all();
|
||||
|
@ -110,4 +110,5 @@ TEST_CASE("disable automatic registration", "[registry]")
|
||||
REQUIRE(logger1->level() == log_level);
|
||||
REQUIRE(logger2->level() == log_level);
|
||||
spdlog::set_level(spdlog::level::info);
|
||||
spdlog::set_automatic_registration(true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user