mirror of
https://github.com/KjellKod/g3log.git
synced 2024-12-12 10:23:50 +01:00
speed up build (#367) by downloading gtest zip and avoiding cloning
This commit is contained in:
parent
e639f6d800
commit
a5f0158abd
@ -4,8 +4,7 @@ project(googletest-download NONE)
|
|||||||
|
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
ExternalProject_Add(googletest
|
ExternalProject_Add(googletest
|
||||||
GIT_REPOSITORY https://github.com/google/googletest.git
|
URL https://github.com/google/googletest/archive/master.zip
|
||||||
GIT_TAG master
|
|
||||||
SOURCE_DIR "${CMAKE_BINARY_DIR}/googletest-src"
|
SOURCE_DIR "${CMAKE_BINARY_DIR}/googletest-src"
|
||||||
BINARY_DIR "${CMAKE_BINARY_DIR}/googletest-build"
|
BINARY_DIR "${CMAKE_BINARY_DIR}/googletest-build"
|
||||||
CONFIGURE_COMMAND ""
|
CONFIGURE_COMMAND ""
|
||||||
|
@ -67,7 +67,7 @@ TEST(Sink, OneSinkRemove) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// just compile test
|
// just compile test
|
||||||
TEST(Sink, DefaultSinkRemove) {
|
TEST(Sink, DefaultSinkRemove){
|
||||||
using namespace g3;
|
using namespace g3;
|
||||||
AtomicBoolPtr flag = make_shared < atomic<bool >> (false);
|
AtomicBoolPtr flag = make_shared < atomic<bool >> (false);
|
||||||
AtomicIntPtr count = make_shared < atomic<int >> (0);
|
AtomicIntPtr count = make_shared < atomic<int >> (0);
|
||||||
@ -80,6 +80,16 @@ TEST(Sink, DefaultSinkRemove) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(Sink, NullSinkRemove) {
|
||||||
|
using namespace g3;
|
||||||
|
AtomicBoolPtr flag = make_shared < atomic<bool >> (false);
|
||||||
|
AtomicIntPtr count = make_shared < atomic<int >> (0);
|
||||||
|
{
|
||||||
|
auto worker = g3::LogWorker::createLogWorker();
|
||||||
|
std::unique_ptr<g3::SinkHandle<ScopedSetTrue>> nullsink;
|
||||||
|
worker->removeSink(std::move(nullsink));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user