From 118feb5d1b946caa614aeb46ccf142c50cd7ddec Mon Sep 17 00:00:00 2001 From: Deepak Majeti Date: Wed, 25 May 2022 23:42:05 -0700 Subject: [PATCH] Build googletest only if testing or basic benchmarking are enabled (#1666) Summary: Also, adds a dummy definition for`FRIEND_TEST` when googletest is disabled. Resolves https://github.com/facebookincubator/velox/issues/1654 Pull Request resolved: https://github.com/facebookincubator/velox/pull/1666 Reviewed By: kgpai Differential Revision: D36664732 Pulled By: mbasmanova fbshipit-source-id: a08859f96f68d5bc9d2c5092be6f7f397508706f --- CMakeLists.txt | 8 ++++++ third_party/CMakeLists.txt | 6 ++++- velox/benchmarks/basic/CMakeLists.txt | 2 -- velox/benchmarks/tpch/CMakeLists.txt | 3 --- velox/common/base/GTestMacros.h | 26 +++++++++++++++++++ velox/common/memory/CMakeLists.txt | 4 +++ velox/common/memory/Memory.h | 17 ++++++------ velox/dwio/common/ChainedBuffer.h | 22 ++++++++-------- velox/dwio/dwrf/common/IntEncoder.h | 4 +-- velox/dwio/dwrf/common/RLEv1.h | 6 ++--- velox/dwio/dwrf/common/Range.h | 6 ++--- .../dwio/dwrf/reader/StripeDictionaryCache.h | 5 ++-- velox/dwio/dwrf/test/TestWriterFlush.cpp | 2 +- velox/dwio/dwrf/writer/ColumnWriter.h | 5 ++-- velox/dwio/dwrf/writer/IndexBuilder.h | 1 - .../dwrf/writer/IntegerDictionaryEncoder.h | 8 +++--- velox/dwio/dwrf/writer/LayoutPlanner.h | 2 +- .../dwrf/writer/StringDictionaryEncoder.h | 11 ++++---- velox/dwio/dwrf/writer/WriterBase.h | 4 +-- velox/dwio/dwrf/writer/WriterContext.h | 7 +++-- velox/dwio/dwrf/writer/WriterShared.h | 7 +++-- velox/expression/benchmarks/CMakeLists.txt | 10 ++----- .../aggregates/benchmarks/CMakeLists.txt | 2 -- .../prestosql/benchmarks/CMakeLists.txt | 10 ++----- 24 files changed, 98 insertions(+), 80 deletions(-) create mode 100644 velox/common/base/GTestMacros.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 95d63b462db7..811822930878 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -309,6 +309,14 @@ if(VELOX_BUILD_TESTING AND NOT VELOX_ENABLE_DUCKDB) ) endif() +# Benchmarks and tests at some places are coupled which is not great. See +# velox/vector/CMakeLists.txt. TODO: Decouple. +set(VELOX_DISABLE_GOOGLETEST OFF) +if(NOT VELOX_BUILD_TESTING AND NOT VELOX_ENABLE_BENCHMARKS_BASIC) + set(VELOX_DISABLE_GOOGLETEST ON) + add_definitions(-DVELOX_DISABLE_GOOGLETEST) +endif() + include_directories(SYSTEM velox) include_directories(SYSTEM velox/external) include_directories(SYSTEM velox/external/duckdb) diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index 408cca574cfd..752b9728c878 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -11,5 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -add_subdirectory(googletest) + +if(NOT VELOX_DISABLE_GOOGLETEST) + add_subdirectory(googletest) +endif() + add_subdirectory(xsimd) diff --git a/velox/benchmarks/basic/CMakeLists.txt b/velox/benchmarks/basic/CMakeLists.txt index 8d051d27aa26..c8c5c24d6652 100644 --- a/velox/benchmarks/basic/CMakeLists.txt +++ b/velox/benchmarks/basic/CMakeLists.txt @@ -23,8 +23,6 @@ set(velox_benchmark_deps ${FOLLY} ${FOLLY_BENCHMARK} ${DOUBLE_CONVERSION} - gtest - gtest_main ${gflags_LIBRARIES} glog::glog) diff --git a/velox/benchmarks/tpch/CMakeLists.txt b/velox/benchmarks/tpch/CMakeLists.txt index 39575532d364..6ecf5851e719 100644 --- a/velox/benchmarks/tpch/CMakeLists.txt +++ b/velox/benchmarks/tpch/CMakeLists.txt @@ -33,9 +33,6 @@ target_link_libraries( velox_type velox_caching velox_vector - velox_vector_test_lib - gtest - gtest_main ${FOLLY_WITH_DEPENDENCIES} ${FOLLY_BENCHMARK} ${FMT}) diff --git a/velox/common/base/GTestMacros.h b/velox/common/base/GTestMacros.h new file mode 100644 index 000000000000..11b36a2ed498 --- /dev/null +++ b/velox/common/base/GTestMacros.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) Facebook, Inc. and its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#ifdef VELOX_DISABLE_GOOGLETEST +// VELOX_FRIEND_TEST macro is only used when testing is enabled. +// Replacing it with "nothing" is okay when testing is disabled. +#define VELOX_FRIEND_TEST(X, Y) +#else +#include +#define VELOX_FRIEND_TEST(X, Y) FRIEND_TEST(X, Y) +#endif diff --git a/velox/common/memory/CMakeLists.txt b/velox/common/memory/CMakeLists.txt index 72b4809a7bae..f4fc768d494f 100644 --- a/velox/common/memory/CMakeLists.txt +++ b/velox/common/memory/CMakeLists.txt @@ -29,3 +29,7 @@ add_library( target_link_libraries(velox_memory velox_flag_definitions velox_exception gtest ${FOLLY_WITH_DEPENDENCIES}) + +if(NOT VELOX_DISABLE_GOOGLETEST) + target_link_libraries(velox_memory gtest) +endif() diff --git a/velox/common/memory/Memory.h b/velox/common/memory/Memory.h index 4edef092d2f7..dfac97da1af3 100644 --- a/velox/common/memory/Memory.h +++ b/velox/common/memory/Memory.h @@ -24,15 +24,14 @@ #include #include -#include #include -#include #include "folly/CPortability.h" #include "folly/Likely.h" #include "folly/Random.h" #include "folly/SharedMutex.h" #include "folly/experimental/FunctionScheduler.h" +#include "velox/common/base/GTestMacros.h" #include "velox/common/memory/MemoryUsage.h" #include "velox/common/memory/MemoryUsageTracker.h" @@ -406,7 +405,7 @@ class MemoryPoolImpl : public MemoryPoolBase { int64_t getSubtreeMaxBytes() const; private: - FRIEND_TEST(MemoryPoolTest, Ctor); + VELOX_FRIEND_TEST(MemoryPoolTest, Ctor); template struct ALIGNER {}; @@ -549,12 +548,12 @@ class MemoryManager final : public IMemoryManager { Allocator& getAllocator(); private: - FRIEND_TEST(MemoryPoolImplTest, CapSubtree); - FRIEND_TEST(MemoryPoolImplTest, CapAllocation); - FRIEND_TEST(MemoryPoolImplTest, UncapMemory); - FRIEND_TEST(MemoryPoolImplTest, MemoryManagerGlobalCap); - FRIEND_TEST(MultiThreadingUncappingTest, Flat); - FRIEND_TEST(MultiThreadingUncappingTest, SimpleTree); + VELOX_FRIEND_TEST(MemoryPoolImplTest, CapSubtree); + VELOX_FRIEND_TEST(MemoryPoolImplTest, CapAllocation); + VELOX_FRIEND_TEST(MemoryPoolImplTest, UncapMemory); + VELOX_FRIEND_TEST(MemoryPoolImplTest, MemoryManagerGlobalCap); + VELOX_FRIEND_TEST(MultiThreadingUncappingTest, Flat); + VELOX_FRIEND_TEST(MultiThreadingUncappingTest, SimpleTree); std::shared_ptr allocator_; const int64_t memoryQuota_; diff --git a/velox/dwio/common/ChainedBuffer.h b/velox/dwio/common/ChainedBuffer.h index 61d6062e851d..30dd578516a1 100644 --- a/velox/dwio/common/ChainedBuffer.h +++ b/velox/dwio/common/ChainedBuffer.h @@ -16,8 +16,8 @@ #pragma once -#include #include +#include "velox/common/base/GTestMacros.h" #include "velox/dwio/common/DataBuffer.h" namespace facebook { @@ -202,16 +202,16 @@ class ChainedBuffer { return val + 1; } - FRIEND_TEST(ChainedBufferTests, testCreate); - FRIEND_TEST(ChainedBufferTests, testReserve); - FRIEND_TEST(ChainedBufferTests, testAppend); - FRIEND_TEST(ChainedBufferTests, testClear); - FRIEND_TEST(ChainedBufferTests, testGetPage); - FRIEND_TEST(ChainedBufferTests, testGetPageIndex); - FRIEND_TEST(ChainedBufferTests, testGetPageOffset); - FRIEND_TEST(ChainedBufferTests, testBitCount); - FRIEND_TEST(ChainedBufferTests, testTrailingZeros); - FRIEND_TEST(ChainedBufferTests, testPowerOf2); + VELOX_FRIEND_TEST(ChainedBufferTests, testCreate); + VELOX_FRIEND_TEST(ChainedBufferTests, testReserve); + VELOX_FRIEND_TEST(ChainedBufferTests, testAppend); + VELOX_FRIEND_TEST(ChainedBufferTests, testClear); + VELOX_FRIEND_TEST(ChainedBufferTests, testGetPage); + VELOX_FRIEND_TEST(ChainedBufferTests, testGetPageIndex); + VELOX_FRIEND_TEST(ChainedBufferTests, testGetPageOffset); + VELOX_FRIEND_TEST(ChainedBufferTests, testBitCount); + VELOX_FRIEND_TEST(ChainedBufferTests, testTrailingZeros); + VELOX_FRIEND_TEST(ChainedBufferTests, testPowerOf2); }; } // namespace common diff --git a/velox/dwio/dwrf/common/IntEncoder.h b/velox/dwio/dwrf/common/IntEncoder.h index a543b9647286..fa42196cdeec 100644 --- a/velox/dwio/dwrf/common/IntEncoder.h +++ b/velox/dwio/dwrf/common/IntEncoder.h @@ -17,8 +17,8 @@ #pragma once #include -#include #include "velox/common/base/BitUtil.h" +#include "velox/common/base/GTestMacros.h" #include "velox/common/base/Nulls.h" #include "velox/common/encode/Coding.h" #include "velox/dwio/dwrf/common/IntCodecCommon.h" @@ -197,7 +197,7 @@ class IntEncoder { FOLLY_ALWAYS_INLINE int32_t writeVslong(int64_t value, char* buffer); FOLLY_ALWAYS_INLINE int32_t writeLongLE(int64_t value, char* buffer); - FRIEND_TEST(TestIntEncoder, TestVarIntEncoder); + VELOX_FRIEND_TEST(TestIntEncoder, TestVarIntEncoder); }; #define WRITE_INTS(FUNC) \ diff --git a/velox/dwio/dwrf/common/RLEv1.h b/velox/dwio/dwrf/common/RLEv1.h index a504d634c8a3..82187f6a43e5 100644 --- a/velox/dwio/dwrf/common/RLEv1.h +++ b/velox/dwio/dwrf/common/RLEv1.h @@ -16,7 +16,7 @@ #pragma once -#include +#include "velox/common/base/GTestMacros.h" #include "velox/common/base/Nulls.h" #include "velox/dwio/dwrf/common/Adaptor.h" #include "velox/dwio/dwrf/common/DecoderUtil.h" @@ -198,8 +198,8 @@ class RleEncoderV1 : public IntEncoder { } } - FRIEND_TEST(RleEncoderV1Test, encodeMinAndMax); - FRIEND_TEST(RleEncoderV1Test, encodeMinAndMaxint32); + VELOX_FRIEND_TEST(RleEncoderV1Test, encodeMinAndMax); + VELOX_FRIEND_TEST(RleEncoderV1Test, encodeMinAndMaxint32); }; template diff --git a/velox/dwio/dwrf/common/Range.h b/velox/dwio/dwrf/common/Range.h index dbaf5c8e9ddd..1c5008553a7d 100644 --- a/velox/dwio/dwrf/common/Range.h +++ b/velox/dwio/dwrf/common/Range.h @@ -16,7 +16,7 @@ #pragma once -#include +#include "velox/common/base/GTestMacros.h" #include "velox/dwio/common/exception/Exception.h" namespace facebook::velox::dwrf { @@ -120,8 +120,8 @@ class Ranges { std::vector> ranges_; size_t size_{0}; - FRIEND_TEST(RangeTests, Add); - FRIEND_TEST(RangeTests, Filter); + VELOX_FRIEND_TEST(RangeTests, Add); + VELOX_FRIEND_TEST(RangeTests, Filter); }; } // namespace facebook::velox::dwrf diff --git a/velox/dwio/dwrf/reader/StripeDictionaryCache.h b/velox/dwio/dwrf/reader/StripeDictionaryCache.h index 963421175cfc..5224c59a9a2d 100644 --- a/velox/dwio/dwrf/reader/StripeDictionaryCache.h +++ b/velox/dwio/dwrf/reader/StripeDictionaryCache.h @@ -16,10 +16,9 @@ #pragma once -#include - #include +#include "velox/common/base/GTestMacros.h" #include "velox/dwio/dwrf/common/Common.h" #include "velox/dwio/dwrf/common/IntDecoder.h" #include "velox/vector/BaseVector.h" @@ -59,7 +58,7 @@ class StripeDictionaryCache { EncodingKeyHash> intDictionaryFactories_; - FRIEND_TEST(TestStripeDictionaryCache, RegisterDictionary); + VELOX_FRIEND_TEST(TestStripeDictionaryCache, RegisterDictionary); }; } // namespace facebook::velox::dwrf diff --git a/velox/dwio/dwrf/test/TestWriterFlush.cpp b/velox/dwio/dwrf/test/TestWriterFlush.cpp index 2b101ad4c404..4890d7395dde 100644 --- a/velox/dwio/dwrf/test/TestWriterFlush.cpp +++ b/velox/dwio/dwrf/test/TestWriterFlush.cpp @@ -156,7 +156,7 @@ class DummyWriter : public velox::dwrf::WriterShared { MOCK_METHOD0(resetImpl, void()); friend class WriterFlushTestHelper; - FRIEND_TEST(TestWriterFlush, CheckAgainstMemoryBudget); + VELOX_FRIEND_TEST(TestWriterFlush, CheckAgainstMemoryBudget); }; // Big idea is to directly manipulate context states (num rows) + memory pool diff --git a/velox/dwio/dwrf/writer/ColumnWriter.h b/velox/dwio/dwrf/writer/ColumnWriter.h index 8b3d8aa1f54b..62c9c342535c 100644 --- a/velox/dwio/dwrf/writer/ColumnWriter.h +++ b/velox/dwio/dwrf/writer/ColumnWriter.h @@ -16,8 +16,7 @@ #pragma once -#include "gtest/gtest_prod.h" - +#include "velox/common/base/GTestMacros.h" #include "velox/dwio/dwrf/common/ByteRLE.h" #include "velox/dwio/dwrf/common/Common.h" #include "velox/dwio/dwrf/common/IntEncoder.h" @@ -226,7 +225,7 @@ class ColumnWriter { // in_map stream const std::function onRecordPosition_; - FRIEND_TEST(ColumnWriterTests, LowMemoryModeConfig); + VELOX_FRIEND_TEST(ColumnWriterTests, LowMemoryModeConfig); friend class ValueStatisticsBuilder; }; diff --git a/velox/dwio/dwrf/writer/IndexBuilder.h b/velox/dwio/dwrf/writer/IndexBuilder.h index 1aef75ede9af..366718b78639 100644 --- a/velox/dwio/dwrf/writer/IndexBuilder.h +++ b/velox/dwio/dwrf/writer/IndexBuilder.h @@ -16,7 +16,6 @@ #pragma once -#include #include "velox/dwio/dwrf/common/OutputStream.h" #include "velox/dwio/dwrf/common/wrap/dwrf-proto-wrapper.h" #include "velox/dwio/dwrf/writer/StatisticsBuilder.h" diff --git a/velox/dwio/dwrf/writer/IntegerDictionaryEncoder.h b/velox/dwio/dwrf/writer/IntegerDictionaryEncoder.h index 9f2839d279c5..04c760224016 100644 --- a/velox/dwio/dwrf/writer/IntegerDictionaryEncoder.h +++ b/velox/dwio/dwrf/writer/IntegerDictionaryEncoder.h @@ -17,7 +17,7 @@ #pragma once #include -#include +#include "velox/common/base/GTestMacros.h" #include "velox/dwio/common/DataBuffer.h" #include "velox/dwio/dwrf/common/IntEncoder.h" #include "velox/dwio/dwrf/writer/DictionaryEncodingUtils.h" @@ -275,9 +275,9 @@ class IntegerDictionaryEncoder : public AbstractIntegerDictionaryEncoder { } private: - FRIEND_TEST(TestIntegerDictionaryEncoder, Clear); - FRIEND_TEST(TestIntegerDictionaryEncoder, GetCount); - FRIEND_TEST(TestWriterContext, GetIntDictionaryEncoder); + VELOX_FRIEND_TEST(TestIntegerDictionaryEncoder, Clear); + VELOX_FRIEND_TEST(TestIntegerDictionaryEncoder, GetCount); + VELOX_FRIEND_TEST(TestWriterContext, GetIntDictionaryEncoder); // TODO: partially specialize for integers only. template diff --git a/velox/dwio/dwrf/writer/LayoutPlanner.h b/velox/dwio/dwrf/writer/LayoutPlanner.h index 4369bdc96e15..eee4f1366798 100644 --- a/velox/dwio/dwrf/writer/LayoutPlanner.h +++ b/velox/dwio/dwrf/writer/LayoutPlanner.h @@ -47,7 +47,7 @@ class LayoutPlanner { static void sort(StreamList::iterator begin, StreamList::iterator end); }; - FRIEND_TEST(LayoutPlannerTests, Basic); + VELOX_FRIEND_TEST(LayoutPlannerTests, Basic); }; } // namespace facebook::velox::dwrf diff --git a/velox/dwio/dwrf/writer/StringDictionaryEncoder.h b/velox/dwio/dwrf/writer/StringDictionaryEncoder.h index 99d554727977..acd77c5704c6 100644 --- a/velox/dwio/dwrf/writer/StringDictionaryEncoder.h +++ b/velox/dwio/dwrf/writer/StringDictionaryEncoder.h @@ -18,7 +18,8 @@ #include #include -#include + +#include "velox/common/base/GTestMacros.h" #include "velox/dwio/common/DataBuffer.h" namespace facebook::velox::dwrf { @@ -171,10 +172,10 @@ class StringDictionaryEncoder { } private: - FRIEND_TEST(TestStringDictionaryEncoder, GetCount); - FRIEND_TEST(TestStringDictionaryEncoder, GetIndex); - FRIEND_TEST(TestStringDictionaryEncoder, GetStride); - FRIEND_TEST(TestStringDictionaryEncoder, Clear); + VELOX_FRIEND_TEST(TestStringDictionaryEncoder, GetCount); + VELOX_FRIEND_TEST(TestStringDictionaryEncoder, GetIndex); + VELOX_FRIEND_TEST(TestStringDictionaryEncoder, GetStride); + VELOX_FRIEND_TEST(TestStringDictionaryEncoder, Clear); // Intended for testing only. uint32_t getIndex(folly::StringPiece sp) { diff --git a/velox/dwio/dwrf/writer/WriterBase.h b/velox/dwio/dwrf/writer/WriterBase.h index de11b9ad2691..df47b5ac62d1 100644 --- a/velox/dwio/dwrf/writer/WriterBase.h +++ b/velox/dwio/dwrf/writer/WriterBase.h @@ -16,7 +16,7 @@ #pragma once -#include "gtest/gtest_prod.h" +#include "velox/common/base/GTestMacros.h" #include "velox/dwio/dwrf/writer/WriterContext.h" #include "velox/dwio/dwrf/writer/WriterSink.h" @@ -163,7 +163,7 @@ class WriterBase { void writeUserMetadata(uint32_t writerVersion); friend class WriterTest; - FRIEND_TEST(WriterBaseTest, FlushWriterSinkUponClose); + VELOX_FRIEND_TEST(WriterBaseTest, FlushWriterSinkUponClose); }; } // namespace facebook::velox::dwrf diff --git a/velox/dwio/dwrf/writer/WriterContext.h b/velox/dwio/dwrf/writer/WriterContext.h index 31a576e08d0b..951ea8c4e699 100644 --- a/velox/dwio/dwrf/writer/WriterContext.h +++ b/velox/dwio/dwrf/writer/WriterContext.h @@ -16,8 +16,7 @@ #pragma once -#include - +#include "velox/common/base/GTestMacros.h" #include "velox/common/time/CpuWallTimer.h" #include "velox/dwio/dwrf/common/Compression.h" #include "velox/dwio/dwrf/writer/IndexBuilder.h" @@ -498,8 +497,8 @@ class WriterContext : public CompressionBufferPool { friend class IntegerColumnWriterDirectEncodingIndexTest; friend class StringColumnWriterDictionaryEncodingIndexTest; friend class StringColumnWriterDirectEncodingIndexTest; - FRIEND_TEST(TestWriterContext, GetIntDictionaryEncoder); - FRIEND_TEST(TestWriterContext, RemoveIntDictionaryEncoderForNode); + VELOX_FRIEND_TEST(TestWriterContext, GetIntDictionaryEncoder); + VELOX_FRIEND_TEST(TestWriterContext, RemoveIntDictionaryEncoderForNode); // TODO: remove once writer code is consolidated template friend class WriterEncodingIndexTest2; diff --git a/velox/dwio/dwrf/writer/WriterShared.h b/velox/dwio/dwrf/writer/WriterShared.h index f4759cc693c8..3f359738e2ce 100644 --- a/velox/dwio/dwrf/writer/WriterShared.h +++ b/velox/dwio/dwrf/writer/WriterShared.h @@ -19,8 +19,7 @@ #include #include -#include - +#include "velox/common/base/GTestMacros.h" #include "velox/dwio/dwrf/common/Encryption.h" #include "velox/dwio/dwrf/common/wrap/dwrf-proto-wrapper.h" #include "velox/dwio/dwrf/proto/dwrf_proto.pb.h" @@ -65,8 +64,8 @@ class EncodingIter { void next(); - FRIEND_TEST(TestEncodingIter, Ctor); - FRIEND_TEST(TestEncodingIter, EncodingIterBeginAndEnd); + VELOX_FRIEND_TEST(TestEncodingIter, Ctor); + VELOX_FRIEND_TEST(TestEncodingIter, EncodingIterBeginAndEnd); bool emptyEncryptionGroups() const; const proto::StripeFooter& footer_; diff --git a/velox/expression/benchmarks/CMakeLists.txt b/velox/expression/benchmarks/CMakeLists.txt index 37cffee45481..e838bd9a5d85 100644 --- a/velox/expression/benchmarks/CMakeLists.txt +++ b/velox/expression/benchmarks/CMakeLists.txt @@ -13,14 +13,8 @@ # limitations under the License. set(BENCHMARK_DEPENDENCIES - velox_functions_test_lib - velox_exec - velox_exec_test_util - gtest - gtest_main - ${gflags_LIBRARIES} - ${FOLLY_WITH_DEPENDENCIES} - ${FOLLY_BENCHMARK}) + velox_functions_test_lib velox_exec velox_exec_test_util + ${gflags_LIBRARIES} ${FOLLY_WITH_DEPENDENCIES} ${FOLLY_BENCHMARK}) add_executable(velox_benchmark_call_null_free_no_nulls CallNullFreeBenchmark.cpp) diff --git a/velox/functions/prestosql/aggregates/benchmarks/CMakeLists.txt b/velox/functions/prestosql/aggregates/benchmarks/CMakeLists.txt index 8a6e9fbb7d6c..11bb22d17e69 100644 --- a/velox/functions/prestosql/aggregates/benchmarks/CMakeLists.txt +++ b/velox/functions/prestosql/aggregates/benchmarks/CMakeLists.txt @@ -26,6 +26,4 @@ target_link_libraries( velox_vector_test_lib ${FOLLY_WITH_DEPENDENCIES} ${FOLLY_BENCHMARK} - gtest - gtest_main ${GFLAGS_LIBRARIES}) diff --git a/velox/functions/prestosql/benchmarks/CMakeLists.txt b/velox/functions/prestosql/benchmarks/CMakeLists.txt index 930e73bd55fa..1d59531b477e 100644 --- a/velox/functions/prestosql/benchmarks/CMakeLists.txt +++ b/velox/functions/prestosql/benchmarks/CMakeLists.txt @@ -13,14 +13,8 @@ # limitations under the License. set(BENCHMARK_DEPENDENCIES_NO_FUNC - velox_functions_test_lib - velox_exec - velox_exec_test_util - gtest - gtest_main - ${gflags_LIBRARIES} - ${FOLLY_WITH_DEPENDENCIES} - ${FOLLY_BENCHMARK}) + velox_functions_test_lib velox_exec velox_exec_test_util + ${gflags_LIBRARIES} ${FOLLY_WITH_DEPENDENCIES} ${FOLLY_BENCHMARK}) set(BENCHMARK_DEPENDENCIES velox_functions_prestosql velox_functions_lib velox_vector_fuzzer