speed up build (#367) by downloading gtest zip and avoiding cloning

This commit is contained in:
Kjell Hedström : Available for new Engineering Leadership and Engineering Opportunities 2020-06-28 07:54:53 -06:00 committed by GitHub
parent e639f6d800
commit a5f0158abd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View File

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

View File

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