From 24b41e5fd709668b30286e2e4e4287bae56f4277 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Thu, 5 Dec 2024 17:40:27 -0800 Subject: [PATCH] build(cmake): Clean up various issues (#11751) Summary: I have pulled these changes from https://github.com/facebookincubator/velox/issues/10732 as they are not specifically part of the shared build. - Add `[]` as an indicator that a dependency is running CMake. This makes it much easier to parse the log and track issues: ``` -- [simdjson] Using BUNDLED simdjson -- Setting folly source to BUNDLED -- [folly] Building Folly from source -- [folly] Using Boost - Bundled ``` - use targets instead of variables for Folly::follybenchmark and glog::glog - remove explicit linking of std::fs as this is no longer necessary for gcc >= 9 (our minimum is 11) - unify generation and linking of dwrf protobuf files - don't set C++ std for dependencies Pull Request resolved: https://github.com/facebookincubator/velox/pull/11751 Reviewed By: DanielHunte Differential Revision: D66843322 Pulled By: kgpai fbshipit-source-id: a3444a3ff919028523f403e78ade05afb40295c5 --- CMake/ResolveDependency.cmake | 5 ++++ .../folly/CMakeLists.txt | 5 +--- CMakeLists.txt | 25 +++---------------- scripts/setup-helper-functions.sh | 16 ++++++------ velox/benchmarks/CMakeLists.txt | 4 +-- velox/benchmarks/basic/CMakeLists.txt | 2 +- velox/benchmarks/tpch/CMakeLists.txt | 2 +- velox/benchmarks/unstable/CMakeLists.txt | 2 +- velox/common/base/benchmarks/CMakeLists.txt | 5 ++-- .../hyperloglog/benchmarks/CMakeLists.txt | 2 +- .../connectors/hive/benchmarks/CMakeLists.txt | 2 +- .../hive/iceberg/tests/CMakeLists.txt | 8 +++--- velox/dwio/common/tests/CMakeLists.txt | 6 ++--- velox/dwio/dwrf/CMakeLists.txt | 2 +- velox/dwio/dwrf/common/CMakeLists.txt | 20 +++++++++------ velox/dwio/dwrf/proto/CMakeLists.txt | 7 ------ velox/dwio/dwrf/test/CMakeLists.txt | 8 +++--- velox/dwio/dwrf/test/utils/CMakeLists.txt | 5 ---- velox/dwio/dwrf/utils/CMakeLists.txt | 7 +----- velox/dwio/parquet/tests/CMakeLists.txt | 3 +-- .../dwio/parquet/tests/reader/CMakeLists.txt | 4 +-- velox/exec/benchmarks/CMakeLists.txt | 20 +++++++-------- .../exec/prefixsort/benchmarks/CMakeLists.txt | 2 +- velox/exec/tests/CMakeLists.txt | 6 ++--- .../wave/exec/tests/CMakeLists.txt | 2 +- .../wave/vector/tests/CMakeLists.txt | 3 +-- velox/expression/benchmarks/CMakeLists.txt | 2 +- velox/functions/lib/benchmarks/CMakeLists.txt | 2 +- .../aggregates/benchmarks/CMakeLists.txt | 6 ++--- .../prestosql/benchmarks/CMakeLists.txt | 2 +- .../sparksql/benchmarks/CMakeLists.txt | 2 +- velox/row/benchmarks/CMakeLists.txt | 2 +- velox/runner/tests/CMakeLists.txt | 2 -- velox/serializers/benchmarks/CMakeLists.txt | 2 +- velox/substrait/tests/CMakeLists.txt | 3 +-- velox/tool/trace/tests/CMakeLists.txt | 3 +-- velox/type/tests/CMakeLists.txt | 12 ++++----- velox/vector/benchmarks/CMakeLists.txt | 8 +++--- 38 files changed, 90 insertions(+), 129 deletions(-) diff --git a/CMake/ResolveDependency.cmake b/CMake/ResolveDependency.cmake index be4ae1f4c458..0290c154d316 100644 --- a/CMake/ResolveDependency.cmake +++ b/CMake/ResolveDependency.cmake @@ -64,6 +64,9 @@ endmacro() # is not found the build will fail and will not fall back to download and build # from source. macro(velox_resolve_dependency dependency_name) + # INDENT is always visible, CONTEXT has to be turned on. + list(APPEND CMAKE_MESSAGE_INDENT "[${dependency_name}] ") + set(find_package_args ${dependency_name} ${ARGN}) list(REMOVE_ITEM find_package_args REQUIRED QUIET) if(${dependency_name}_SOURCE STREQUAL "AUTO") @@ -84,6 +87,8 @@ macro(velox_resolve_dependency dependency_name) FATAL_ERROR "Invalid source for ${dependency_name}: ${${dependency_name}_SOURCE}") endif() + + list(POP_BACK CMAKE_MESSAGE_INDENT) endmacro() # By using a macro we don't need to propagate the value into the parent scope. diff --git a/CMake/resolve_dependency_modules/folly/CMakeLists.txt b/CMake/resolve_dependency_modules/folly/CMakeLists.txt index 9e79e0b0ba0a..2f960fbaadab 100644 --- a/CMake/resolve_dependency_modules/folly/CMakeLists.txt +++ b/CMake/resolve_dependency_modules/folly/CMakeLists.txt @@ -44,6 +44,7 @@ FetchContent_MakeAvailable(folly) # Folly::folly is not valid for FC but we want to match FindFolly add_library(Folly::folly ALIAS folly) +add_library(Folly::follybenchmark ALIAS follybenchmark) # The folly target does not contain any include directories, they are propagated # from folly_base. This marks them as system headers which should suppress @@ -60,7 +61,3 @@ set_target_properties( if(${gflags_SOURCE} STREQUAL "BUNDLED") add_dependencies(folly glog gflags_static fmt::fmt) endif() - -set(FOLLY_BENCHMARK_STATIC_LIB - ${folly_BINARY_DIR}/folly/libfollybenchmark${CMAKE_STATIC_LIBRARY_SUFFIX} - PARENT_SCOPE) diff --git a/CMakeLists.txt b/CMakeLists.txt index a106a0c2ad5d..5929473aeb7b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -233,10 +233,6 @@ if(${VELOX_FORCE_COLORED_OUTPUT}) endif() endif() -# At the moment we prefer static linking but by default cmake looks for shared -# libs first. This will still fallback to shared libs when static ones are not -# found -list(INSERT CMAKE_FIND_LIBRARY_SUFFIXES 0 a) if(VELOX_ENABLE_S3) # Set AWS_ROOT_DIR if you have a custom install location of AWS SDK CPP. if(AWSSDK_ROOT_DIR) @@ -293,7 +289,8 @@ endif() set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) set(CMAKE_CXX_STANDARD 17) -set(CMAKE_CXX_STANDARD_REQUIRED True) +set(CMAKE_CXX_STANDARD_REQUIRED TRUE) +set(CMAKE_CXX_EXTENSIONS ON) # Big Int is an extension execute_process( COMMAND @@ -373,7 +370,6 @@ if(${VELOX_ENABLE_GPU}) if(CMAKE_BUILD_TYPE MATCHES Debug) add_compile_options("$<$:-G>") endif() - include_directories("${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}") find_package(CUDAToolkit REQUIRED) endif() @@ -424,11 +420,10 @@ set(BOOST_INCLUDE_LIBRARIES velox_set_source(Boost) velox_resolve_dependency(Boost 1.77.0 COMPONENTS ${BOOST_INCLUDE_LIBRARIES}) -# Range-v3 will be enable when the codegen code actually lands keeping it here -# for reference. find_package(range-v3) - velox_set_source(gflags) + velox_resolve_dependency(gflags COMPONENTS ${VELOX_GFLAGS_TYPE}) + if(NOT TARGET gflags::gflags) # This is a bit convoluted, but we want to be able to use gflags::gflags as a # target even when velox is built as a subproject which uses @@ -494,8 +489,6 @@ endif() velox_set_source(simdjson) velox_resolve_dependency(simdjson 3.9.3) -# Locate or build folly. -add_compile_definitions(FOLLY_HAVE_INT128_T=1) velox_set_source(folly) velox_resolve_dependency(folly) @@ -521,12 +514,6 @@ if(VELOX_ENABLE_REMOTE_FUNCTIONS) find_package(FBThrift CONFIG REQUIRED) endif() -if(DEFINED FOLLY_BENCHMARK_STATIC_LIB) - set(FOLLY_BENCHMARK ${FOLLY_BENCHMARK_STATIC_LIB}) -else() - set(FOLLY_BENCHMARK Folly::follybenchmark) -endif() - if(VELOX_ENABLE_GCS) velox_set_source(google_cloud_cpp_storage) velox_resolve_dependency(google_cloud_cpp_storage CONFIG 2.22.0 REQUIRED) @@ -535,7 +522,6 @@ endif() # GCC needs to link a library to enable std::filesystem. if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") - set(FILESYSTEM "stdc++fs") # Ensure we have gcc at least 9+. if(CMAKE_CXX_COMPILER_VERSION LESS 9.0) @@ -545,8 +531,6 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") # Find Threads library find_package(Threads REQUIRED) -else() - set(FILESYSTEM "") endif() if(VELOX_BUILD_TESTING AND NOT VELOX_ENABLE_DUCKDB) @@ -595,7 +579,6 @@ find_package(double-conversion 3.1.5 REQUIRED) include_directories(SYSTEM velox) include_directories(SYSTEM velox/external) -# these were previously vendored in third-party/ if(NOT VELOX_DISABLE_GOOGLETEST) velox_set_source(GTest) velox_resolve_dependency(GTest) diff --git a/scripts/setup-helper-functions.sh b/scripts/setup-helper-functions.sh index 43010223a5ff..44324ede2516 100755 --- a/scripts/setup-helper-functions.sh +++ b/scripts/setup-helper-functions.sh @@ -111,15 +111,15 @@ function get_cxx_flags { case $CPU_ARCH in "arm64") - echo -n "-mcpu=apple-m1+crc -std=c++17 -fvisibility=hidden" + echo -n "-mcpu=apple-m1+crc" ;; "avx") - echo -n "-mavx2 -mfma -mavx -mf16c -mlzcnt -std=c++17 -mbmi2" + echo -n "-mavx2 -mfma -mavx -mf16c -mlzcnt -mbmi2" ;; "sse") - echo -n "-msse4.2 -std=c++17" + echo -n "-msse4.2 " ;; "aarch64") @@ -138,16 +138,16 @@ function get_cxx_flags { ARM_CPU_PRODUCT=${hex_ARM_CPU_DETECT: -4:3} if [ "$ARM_CPU_PRODUCT" = "$Neoverse_N1" ]; then - echo -n "-mcpu=neoverse-n1 -std=c++17" + echo -n "-mcpu=neoverse-n1 " elif [ "$ARM_CPU_PRODUCT" = "$Neoverse_N2" ]; then - echo -n "-mcpu=neoverse-n2 -std=c++17" + echo -n "-mcpu=neoverse-n2 " elif [ "$ARM_CPU_PRODUCT" = "$Neoverse_V1" ]; then - echo -n "-mcpu=neoverse-v1 -std=c++17" + echo -n "-mcpu=neoverse-v1 " else - echo -n "-march=armv8-a+crc+crypto -std=c++17" + echo -n "-march=armv8-a+crc+crypto " fi else - echo -n "-std=c++17" + echo -n "" fi ;; *) diff --git a/velox/benchmarks/CMakeLists.txt b/velox/benchmarks/CMakeLists.txt index dda7226d6715..45466b1ed3fd 100644 --- a/velox/benchmarks/CMakeLists.txt +++ b/velox/benchmarks/CMakeLists.txt @@ -23,7 +23,7 @@ set(velox_benchmark_deps velox_parse_expression velox_serialization Folly::folly - ${FOLLY_BENCHMARK} + Folly::follybenchmark ${DOUBLE_CONVERSION} gflags::gflags glog::glog) @@ -60,6 +60,6 @@ target_link_libraries( velox_type_fbhive velox_caching velox_vector_test_lib - ${FOLLY_BENCHMARK} Folly::folly + Folly::follybenchmark fmt::fmt) diff --git a/velox/benchmarks/basic/CMakeLists.txt b/velox/benchmarks/basic/CMakeLists.txt index 127ae10bcb51..08cf6d347204 100644 --- a/velox/benchmarks/basic/CMakeLists.txt +++ b/velox/benchmarks/basic/CMakeLists.txt @@ -23,7 +23,7 @@ set(velox_benchmark_deps velox_benchmark_builder velox_vector_test_lib Folly::folly - ${FOLLY_BENCHMARK} + Folly::follybenchmark ${DOUBLE_CONVERSION} gflags::gflags glog::glog) diff --git a/velox/benchmarks/tpch/CMakeLists.txt b/velox/benchmarks/tpch/CMakeLists.txt index 3cbe9a0a6a6b..1ac7c3f1aee7 100644 --- a/velox/benchmarks/tpch/CMakeLists.txt +++ b/velox/benchmarks/tpch/CMakeLists.txt @@ -34,7 +34,7 @@ target_link_libraries( velox_type_fbhive velox_caching velox_vector_test_lib - ${FOLLY_BENCHMARK} + Folly::follybenchmark Folly::folly fmt::fmt) diff --git a/velox/benchmarks/unstable/CMakeLists.txt b/velox/benchmarks/unstable/CMakeLists.txt index e3d264786d15..cbd8e1cf6dca 100644 --- a/velox/benchmarks/unstable/CMakeLists.txt +++ b/velox/benchmarks/unstable/CMakeLists.txt @@ -21,7 +21,7 @@ set(velox_benchmark_deps velox_parse_expression velox_serialization Folly::folly - ${FOLLY_BENCHMARK} + Folly::follybenchmark ${DOUBLE_CONVERSION} gflags::gflags glog::glog) diff --git a/velox/common/base/benchmarks/CMakeLists.txt b/velox/common/base/benchmarks/CMakeLists.txt index a8e956f8542a..72fe153b52c8 100644 --- a/velox/common/base/benchmarks/CMakeLists.txt +++ b/velox/common/base/benchmarks/CMakeLists.txt @@ -15,11 +15,12 @@ add_executable(velox_common_base_benchmarks BitUtilBenchmark.cpp) target_link_libraries( velox_common_base_benchmarks - PUBLIC ${FOLLY_BENCHMARK} + PUBLIC Folly::follybenchmark PRIVATE velox_common_base Folly::folly) add_executable(velox_common_stringsearch_benchmarks StringSearchBenchmark.cpp) + target_link_libraries( velox_common_stringsearch_benchmarks - PUBLIC ${FOLLY_BENCHMARK} + PUBLIC Folly::follybenchmark PRIVATE velox_common_base Folly::folly) diff --git a/velox/common/hyperloglog/benchmarks/CMakeLists.txt b/velox/common/hyperloglog/benchmarks/CMakeLists.txt index 2b86b9cd66ee..f18f8a0a2b7b 100644 --- a/velox/common/hyperloglog/benchmarks/CMakeLists.txt +++ b/velox/common/hyperloglog/benchmarks/CMakeLists.txt @@ -16,4 +16,4 @@ add_executable(velox_common_hyperloglog_dense_hll_bm DenseHll.cpp) target_link_libraries( velox_common_hyperloglog_dense_hll_bm velox_common_hyperloglog - ${FOLLY_BENCHMARK}) + Folly::follybenchmark) diff --git a/velox/connectors/hive/benchmarks/CMakeLists.txt b/velox/connectors/hive/benchmarks/CMakeLists.txt index ddc3e0cf67ca..38c15bb9c057 100644 --- a/velox/connectors/hive/benchmarks/CMakeLists.txt +++ b/velox/connectors/hive/benchmarks/CMakeLists.txt @@ -30,5 +30,5 @@ target_link_libraries( velox_hive_partition_function velox_memory Folly::folly - ${FOLLY_BENCHMARK} + Folly::follybenchmark fmt::fmt) diff --git a/velox/connectors/hive/iceberg/tests/CMakeLists.txt b/velox/connectors/hive/iceberg/tests/CMakeLists.txt index 44ec30a23112..51d1116d1845 100644 --- a/velox/connectors/hive/iceberg/tests/CMakeLists.txt +++ b/velox/connectors/hive/iceberg/tests/CMakeLists.txt @@ -19,7 +19,7 @@ target_link_libraries( velox_exec velox_hive_connector Folly::folly - ${FOLLY_BENCHMARK} + Folly::follybenchmark ${TEST_LINK_LIBS}) if(VELOX_ENABLE_BENCHMARKS) @@ -28,12 +28,11 @@ if(VELOX_ENABLE_BENCHMARKS) target_link_libraries( velox_dwio_iceberg_reader_benchmark velox_dwio_iceberg_reader_benchmark_lib - velox_dwio_dwrf_proto velox_exec_test_lib velox_exec velox_hive_connector Folly::folly - ${FOLLY_BENCHMARK} + Folly::follybenchmark ${TEST_LINK_LIBS}) endif() @@ -51,12 +50,11 @@ if(NOT VELOX_DISABLE_GOOGLETEST) velox_hive_partition_function velox_dwio_common_exception velox_dwio_common_test_utils - velox_dwio_dwrf_proto velox_vector_test_lib velox_exec velox_exec_test_lib Folly::folly - ${FOLLY_BENCHMARK} + Folly::follybenchmark GTest::gtest GTest::gtest_main) diff --git a/velox/dwio/common/tests/CMakeLists.txt b/velox/dwio/common/tests/CMakeLists.txt index 09b19c2971dc..6f3a36273c6d 100644 --- a/velox/dwio/common/tests/CMakeLists.txt +++ b/velox/dwio/common/tests/CMakeLists.txt @@ -85,7 +85,7 @@ if(VELOX_ENABLE_BENCHMARKS) velox_memory velox_dwio_common_exception Folly::folly - ${FOLLY_BENCHMARK}) + Folly::follybenchmark) add_executable(velox_dwio_common_int_decoder_benchmark IntDecoderBenchmark.cpp) @@ -95,7 +95,7 @@ if(VELOX_ENABLE_BENCHMARKS) velox_exception velox_dwio_dwrf_common Folly::folly - ${FOLLY_BENCHMARK}) + Folly::follybenchmark) if(VELOX_ENABLE_ARROW) add_subdirectory(Lemire/FastPFor) @@ -112,6 +112,6 @@ if(VELOX_ENABLE_BENCHMARKS) velox_fastpforlib duckdb_static Folly::folly - ${FOLLY_BENCHMARK}) + Folly::follybenchmark) endif() endif() diff --git a/velox/dwio/dwrf/CMakeLists.txt b/velox/dwio/dwrf/CMakeLists.txt index 941bbdf856d9..613f69ad2f06 100644 --- a/velox/dwio/dwrf/CMakeLists.txt +++ b/velox/dwio/dwrf/CMakeLists.txt @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -add_subdirectory(common) add_subdirectory(proto) +add_subdirectory(common) add_subdirectory(reader) if(${VELOX_BUILD_TESTING}) add_subdirectory(test) diff --git a/velox/dwio/dwrf/common/CMakeLists.txt b/velox/dwio/dwrf/common/CMakeLists.txt index 427e2a294386..bb6356c94e57 100644 --- a/velox/dwio/dwrf/common/CMakeLists.txt +++ b/velox/dwio/dwrf/common/CMakeLists.txt @@ -25,12 +25,8 @@ velox_add_library( RLEv1.cpp RLEv2.cpp Statistics.cpp - wrap/dwrf-proto-wrapper.cpp - wrap/orc-proto-wrapper.cpp) - -if(NOT VELOX_MONO_LIBRARY) - add_dependencies(velox_dwio_dwrf_common velox_dwio_dwrf_proto) -endif() + wrap/orc-proto-wrapper.cpp + wrap/dwrf-proto-wrapper.cpp) velox_link_libraries( velox_dwio_dwrf_common @@ -39,7 +35,15 @@ velox_link_libraries( velox_common_config velox_dwio_common velox_dwio_common_compression - velox_dwio_dwrf_proto velox_caching Snappy::snappy - zstd::zstd) + zstd::zstd + protobuf::libprotobuf) + +# required for the wrapped protobuf headers/sources +velox_include_directories(velox_dwio_dwrf_common PUBLIC ${PROJECT_BINARY_DIR}) + +if(NOT VELOX_MONO_LIBRARY) + # trigger generation of pb files + add_dependencies(velox_dwio_dwrf_common dwio_proto) +endif() diff --git a/velox/dwio/dwrf/proto/CMakeLists.txt b/velox/dwio/dwrf/proto/CMakeLists.txt index 299587a1f415..1cc18041d4f1 100644 --- a/velox/dwio/dwrf/proto/CMakeLists.txt +++ b/velox/dwio/dwrf/proto/CMakeLists.txt @@ -47,10 +47,3 @@ add_custom_target(dwio_proto ALL DEPENDS ${PROTO_OUTPUT_FILES}) if(VELOX_MONO_LIBRARY) add_dependencies(velox dwio_proto) endif() -velox_add_library(velox_dwio_dwrf_proto ${PROTO_HDRS} ${PROTO_SRCS}) - -# Access generated proto file with. -# -# #include "velox/dwio/dwrf/proto/dwrf_proto.pb.h" -velox_link_libraries(velox_dwio_dwrf_proto protobuf::libprotobuf) -velox_include_directories(velox_dwio_dwrf_proto PUBLIC ${PROJECT_BINARY_DIR}) diff --git a/velox/dwio/dwrf/test/CMakeLists.txt b/velox/dwio/dwrf/test/CMakeLists.txt index edd5f56cb77f..3d1711c6c5da 100644 --- a/velox/dwio/dwrf/test/CMakeLists.txt +++ b/velox/dwio/dwrf/test/CMakeLists.txt @@ -16,7 +16,6 @@ add_subdirectory(utils) set(TEST_LINK_LIBS velox_dwio_common_test_utils - velox_dwio_dwrf_proto velox_dwio_dwrf_reader velox_dwio_dwrf_writer velox_row_fast @@ -24,8 +23,7 @@ set(TEST_LINK_LIBS GTest::gtest GTest::gtest_main GTest::gmock - glog::glog - ${FILESYSTEM}) + glog::glog) add_executable(velox_dwio_dwrf_buffered_output_stream_test TestBufferedOutputStream.cpp) @@ -549,7 +547,7 @@ if(VELOX_ENABLE_BENCHMARKS) velox_memory velox_dwio_common_exception Folly::folly - ${FOLLY_BENCHMARK}) + Folly::follybenchmark) add_executable(velox_dwrf_float_column_writer_benchmark FloatColumnWriterBenchmark.cpp) @@ -559,7 +557,7 @@ if(VELOX_ENABLE_BENCHMARKS) velox_dwio_common_exception velox_dwio_dwrf_writer Folly::folly - ${FOLLY_BENCHMARK} + Folly::follybenchmark fmt::fmt) endif() diff --git a/velox/dwio/dwrf/test/utils/CMakeLists.txt b/velox/dwio/dwrf/test/utils/CMakeLists.txt index 8badcedc8db3..89bfc2e4fdf9 100644 --- a/velox/dwio/dwrf/test/utils/CMakeLists.txt +++ b/velox/dwio/dwrf/test/utils/CMakeLists.txt @@ -27,8 +27,3 @@ target_link_libraries( velox_vector GTest::gtest GTest::gtest_main) - -# older versions of GCC need it to allow std::filesystem -if(CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9) - target_link_libraries(velox_dwrf_test_utils stdc++fs) -endif() diff --git a/velox/dwio/dwrf/utils/CMakeLists.txt b/velox/dwio/dwrf/utils/CMakeLists.txt index c05206e7d1b7..9fff6d39972b 100644 --- a/velox/dwio/dwrf/utils/CMakeLists.txt +++ b/velox/dwio/dwrf/utils/CMakeLists.txt @@ -17,10 +17,5 @@ if(${VELOX_BUILD_TESTING}) endif() velox_add_library(velox_dwio_dwrf_utils ProtoUtils.cpp BitIterator.h) - -if(NOT VELOX_MONO_LIBRARY) - add_dependencies(velox_dwio_dwrf_utils velox_dwio_dwrf_proto) -endif() - -velox_link_libraries(velox_dwio_dwrf_utils velox_dwio_dwrf_proto velox_type +velox_link_libraries(velox_dwio_dwrf_utils velox_dwio_dwrf_common velox_type velox_memory) diff --git a/velox/dwio/parquet/tests/CMakeLists.txt b/velox/dwio/parquet/tests/CMakeLists.txt index 6cac19e7e196..e46b1cecbaab 100644 --- a/velox/dwio/parquet/tests/CMakeLists.txt +++ b/velox/dwio/parquet/tests/CMakeLists.txt @@ -21,8 +21,7 @@ set(TEST_LINK_LIBS GTest::gtest_main GTest::gmock gflags::gflags - ${GLOG} - ${FILESYSTEM}) + glog::glog) add_subdirectory(reader) add_subdirectory(writer) diff --git a/velox/dwio/parquet/tests/reader/CMakeLists.txt b/velox/dwio/parquet/tests/reader/CMakeLists.txt index e2f04d8294fe..8a6e25d0bddc 100644 --- a/velox/dwio/parquet/tests/reader/CMakeLists.txt +++ b/velox/dwio/parquet/tests/reader/CMakeLists.txt @@ -43,7 +43,7 @@ target_link_libraries( velox_exec velox_hive_connector ${TEST_LINK_LIBS} - ${FOLLY_BENCHMARK} + Folly::follybenchmark Folly::folly) if(VELOX_ENABLE_BENCHMARKS) @@ -79,7 +79,7 @@ if(VELOX_ENABLE_BENCHMARKS) NestedStructureDecoderBenchmark.cpp) target_link_libraries( velox_dwio_parquet_structure_decoder_benchmark - velox_dwio_native_parquet_reader Folly::folly ${FOLLY_BENCHMARK}) + velox_dwio_native_parquet_reader Folly::folly Folly::follybenchmark) endif() add_executable(velox_dwio_parquet_table_scan_test ParquetTableScanTest.cpp) diff --git a/velox/exec/benchmarks/CMakeLists.txt b/velox/exec/benchmarks/CMakeLists.txt index b97bb0547789..b3a198a11de7 100644 --- a/velox/exec/benchmarks/CMakeLists.txt +++ b/velox/exec/benchmarks/CMakeLists.txt @@ -15,7 +15,7 @@ add_executable(velox_exec_vector_hasher_benchmark VectorHasherBenchmark.cpp) target_link_libraries( velox_exec_vector_hasher_benchmark velox_exec velox_vector_test_lib - ${FOLLY_BENCHMARK}) + Folly::follybenchmark) add_executable(velox_filter_project_benchmark FilterProjectBenchmark.cpp) @@ -24,7 +24,7 @@ target_link_libraries( velox_exec velox_vector_test_lib velox_exec_test_lib - ${FOLLY_BENCHMARK}) + Folly::follybenchmark) add_executable(velox_exchange_benchmark ExchangeBenchmark.cpp) @@ -33,7 +33,7 @@ target_link_libraries( velox_exec velox_exec_test_lib velox_vector_test_lib - ${FOLLY_BENCHMARK}) + Folly::follybenchmark) add_executable(velox_merge_benchmark MergeBenchmark.cpp) @@ -41,7 +41,7 @@ target_link_libraries( velox_merge_benchmark velox_exec velox_vector_test_lib - ${FOLLY_BENCHMARK} + Folly::follybenchmark GTest::gtest GTest::gtest_main) @@ -52,7 +52,7 @@ target_link_libraries( velox_exec velox_exec_test_lib velox_vector_test_lib - ${FOLLY_BENCHMARK}) + Folly::follybenchmark) add_executable(velox_hash_join_list_result_benchmark HashJoinListResultBenchmark.cpp) @@ -62,7 +62,7 @@ target_link_libraries( velox_exec velox_exec_test_lib velox_vector_test_lib - ${FOLLY_BENCHMARK}) + Folly::follybenchmark) add_executable(velox_hash_join_prepare_join_table_benchmark HashJoinPrepareJoinTableBenchmark.cpp) @@ -72,7 +72,7 @@ target_link_libraries( velox_exec velox_exec_test_lib velox_vector_test_lib - ${FOLLY_BENCHMARK}) + Folly::follybenchmark) if(${VELOX_ENABLE_PARQUET}) add_executable(velox_sort_benchmark RowContainerSortBenchmark.cpp) @@ -82,7 +82,7 @@ if(${VELOX_ENABLE_PARQUET}) velox_exec velox_exec_test_lib velox_vector_test_lib - ${FOLLY_BENCHMARK} + Folly::follybenchmark arrow thrift) endif() @@ -94,7 +94,7 @@ target_link_libraries( velox_exec velox_vector_fuzzer velox_vector_test_lib - ${FOLLY_BENCHMARK}) + Folly::follybenchmark) add_executable(velox_window_prefixsort_benchmark WindowPrefixSortBenchmark.cpp) @@ -107,4 +107,4 @@ target_link_libraries( velox_vector_fuzzer velox_vector_test_lib velox_window - ${FOLLY_BENCHMARK}) + Folly::follybenchmark) diff --git a/velox/exec/prefixsort/benchmarks/CMakeLists.txt b/velox/exec/prefixsort/benchmarks/CMakeLists.txt index 7d29a84f520d..77a62b5c0481 100644 --- a/velox/exec/prefixsort/benchmarks/CMakeLists.txt +++ b/velox/exec/prefixsort/benchmarks/CMakeLists.txt @@ -15,4 +15,4 @@ add_executable(velox_prefix_sort_algorithm_benchmark PrefixSortAlgorithmBenchmark.cpp) target_link_libraries( velox_prefix_sort_algorithm_benchmark velox_exec_prefixsort_test_lib - velox_vector_test_lib ${FOLLY_BENCHMARK}) + velox_vector_test_lib Folly::follybenchmark) diff --git a/velox/exec/tests/CMakeLists.txt b/velox/exec/tests/CMakeLists.txt index 5798de4abc3f..2190fc5ae567 100644 --- a/velox/exec/tests/CMakeLists.txt +++ b/velox/exec/tests/CMakeLists.txt @@ -160,8 +160,7 @@ target_link_libraries( Folly::folly gflags::gflags glog::glog - fmt::fmt - ${FILESYSTEM}) + fmt::fmt) target_link_libraries( velox_exec_infra_test @@ -198,8 +197,7 @@ target_link_libraries( Folly::folly gflags::gflags glog::glog - fmt::fmt - ${FILESYSTEM}) + fmt::fmt) add_executable(velox_in_10_min_demo VeloxIn10MinDemo.cpp) diff --git a/velox/experimental/wave/exec/tests/CMakeLists.txt b/velox/experimental/wave/exec/tests/CMakeLists.txt index 49e6da748f3b..8176fd65af9b 100644 --- a/velox/experimental/wave/exec/tests/CMakeLists.txt +++ b/velox/experimental/wave/exec/tests/CMakeLists.txt @@ -82,8 +82,8 @@ if(${VELOX_ENABLE_BENCHMARKS}) GTest::gtest GTest::gtest_main GTest::gmock - ${FOLLY_BENCHMARK} Folly::folly + Folly::follybenchmark gflags::gflags glog::glog fmt::fmt diff --git a/velox/experimental/wave/vector/tests/CMakeLists.txt b/velox/experimental/wave/vector/tests/CMakeLists.txt index c6d94713a930..3abf0a43cd18 100644 --- a/velox/experimental/wave/vector/tests/CMakeLists.txt +++ b/velox/experimental/wave/vector/tests/CMakeLists.txt @@ -35,5 +35,4 @@ target_link_libraries( Folly::folly gflags::gflags glog::glog - fmt::fmt - ${FILESYSTEM}) + fmt::fmt) diff --git a/velox/expression/benchmarks/CMakeLists.txt b/velox/expression/benchmarks/CMakeLists.txt index bad77a8a5991..80321cb6db86 100644 --- a/velox/expression/benchmarks/CMakeLists.txt +++ b/velox/expression/benchmarks/CMakeLists.txt @@ -18,7 +18,7 @@ set(BENCHMARK_DEPENDENCIES velox_exec_test_lib gflags::gflags Folly::folly - ${FOLLY_BENCHMARK}) + Folly::follybenchmark) add_executable(velox_benchmark_call_null_free_no_nulls CallNullFreeBenchmark.cpp) diff --git a/velox/functions/lib/benchmarks/CMakeLists.txt b/velox/functions/lib/benchmarks/CMakeLists.txt index 572ba8dc4aa7..19306d2b3138 100644 --- a/velox/functions/lib/benchmarks/CMakeLists.txt +++ b/velox/functions/lib/benchmarks/CMakeLists.txt @@ -21,4 +21,4 @@ target_link_libraries( velox_vector_test_lib velox_vector_fuzzer Folly::folly - ${FOLLY_BENCHMARK}) + Folly::follybenchmark) diff --git a/velox/functions/prestosql/aggregates/benchmarks/CMakeLists.txt b/velox/functions/prestosql/aggregates/benchmarks/CMakeLists.txt index 58cb40540b43..a0565d517b8b 100644 --- a/velox/functions/prestosql/aggregates/benchmarks/CMakeLists.txt +++ b/velox/functions/prestosql/aggregates/benchmarks/CMakeLists.txt @@ -24,7 +24,7 @@ target_link_libraries( velox_vector_fuzzer velox_vector_test_lib Folly::folly - ${FOLLY_BENCHMARK} + Folly::follybenchmark gflags::gflags) add_executable(velox_aggregates_string_keys_bm TwoStringKeys.cpp) @@ -40,7 +40,7 @@ target_link_libraries( velox_vector_fuzzer velox_vector_test_lib Folly::folly - ${FOLLY_BENCHMARK} + Folly::follybenchmark gflags::gflags) add_executable(velox_aggregates_reduce_agg_bm SimpleAggregates.cpp) @@ -56,5 +56,5 @@ target_link_libraries( velox_vector_fuzzer velox_vector_test_lib Folly::folly - ${FOLLY_BENCHMARK} + Folly::follybenchmark gflags::gflags) diff --git a/velox/functions/prestosql/benchmarks/CMakeLists.txt b/velox/functions/prestosql/benchmarks/CMakeLists.txt index 0c1ac0f026e4..8365abfb6a79 100644 --- a/velox/functions/prestosql/benchmarks/CMakeLists.txt +++ b/velox/functions/prestosql/benchmarks/CMakeLists.txt @@ -18,7 +18,7 @@ set(BENCHMARK_DEPENDENCIES_NO_FUNC velox_exec_test_lib gflags::gflags Folly::folly - ${FOLLY_BENCHMARK} + Folly::follybenchmark velox_benchmark_builder) set(BENCHMARK_DEPENDENCIES diff --git a/velox/functions/sparksql/benchmarks/CMakeLists.txt b/velox/functions/sparksql/benchmarks/CMakeLists.txt index 8a9ef858460f..cbc2db8be960 100644 --- a/velox/functions/sparksql/benchmarks/CMakeLists.txt +++ b/velox/functions/sparksql/benchmarks/CMakeLists.txt @@ -22,7 +22,7 @@ target_link_libraries( velox_vector_test_lib velox_vector_fuzzer Folly::folly - ${FOLLY_BENCHMARK}) + Folly::follybenchmark) add_executable(velox_sparksql_benchmarks_compare CompareBenchmark.cpp) target_link_libraries( diff --git a/velox/row/benchmarks/CMakeLists.txt b/velox/row/benchmarks/CMakeLists.txt index 34e863100722..51888106aa3c 100644 --- a/velox/row/benchmarks/CMakeLists.txt +++ b/velox/row/benchmarks/CMakeLists.txt @@ -21,4 +21,4 @@ target_link_libraries( velox_row_fast velox_vector_fuzzer Folly::folly - ${FOLLY_BENCHMARK}) + Folly::follybenchmark) diff --git a/velox/runner/tests/CMakeLists.txt b/velox/runner/tests/CMakeLists.txt index d9e8315d9b0f..863f572fa828 100644 --- a/velox/runner/tests/CMakeLists.txt +++ b/velox/runner/tests/CMakeLists.txt @@ -20,8 +20,6 @@ target_link_libraries( velox_local_runner_test velox_exec_runner_test_util velox_exec_test_lib - velox_dwio_common - velox_dwio_dwrf_proto velox_parse_parser velox_parse_expression GTest::gtest) diff --git a/velox/serializers/benchmarks/CMakeLists.txt b/velox/serializers/benchmarks/CMakeLists.txt index d0efd1d14135..6087a2b738ae 100644 --- a/velox/serializers/benchmarks/CMakeLists.txt +++ b/velox/serializers/benchmarks/CMakeLists.txt @@ -19,4 +19,4 @@ target_link_libraries( velox_vector_fuzzer velox_memory Folly::folly - ${FOLLY_BENCHMARK}) + Folly::follybenchmark) diff --git a/velox/substrait/tests/CMakeLists.txt b/velox/substrait/tests/CMakeLists.txt index 7f5498a0d6bf..b1ee68ebea7d 100644 --- a/velox/substrait/tests/CMakeLists.txt +++ b/velox/substrait/tests/CMakeLists.txt @@ -61,5 +61,4 @@ target_link_libraries( Folly::folly gflags::gflags glog::glog - fmt::fmt - ${FILESYSTEM}) + fmt::fmt) diff --git a/velox/tool/trace/tests/CMakeLists.txt b/velox/tool/trace/tests/CMakeLists.txt index f6241119110d..70104ca11c91 100644 --- a/velox/tool/trace/tests/CMakeLists.txt +++ b/velox/tool/trace/tests/CMakeLists.txt @@ -40,5 +40,4 @@ target_link_libraries( Folly::folly gflags::gflags glog::glog - fmt::fmt - ${FILESYSTEM}) + fmt::fmt) diff --git a/velox/type/tests/CMakeLists.txt b/velox/type/tests/CMakeLists.txt index 7d795493410b..2110fb2fbd1e 100644 --- a/velox/type/tests/CMakeLists.txt +++ b/velox/type/tests/CMakeLists.txt @@ -50,7 +50,7 @@ if(VELOX_ENABLE_BENCHMARKS) velox_type velox_serialization Folly::folly - ${FOLLY_BENCHMARK} + Folly::follybenchmark GTest::gtest GTest::gtest_main gflags::gflags @@ -64,7 +64,7 @@ if(VELOX_ENABLE_BENCHMARKS) velox_type velox_serialization Folly::folly - ${FOLLY_BENCHMARK} + Folly::follybenchmark GTest::gtest GTest::gtest_main gflags::gflags @@ -78,7 +78,7 @@ if(VELOX_ENABLE_BENCHMARKS) velox_type velox_serialization Folly::folly - ${FOLLY_BENCHMARK} + Folly::follybenchmark GTest::gtest GTest::gtest_main gflags::gflags @@ -92,7 +92,7 @@ if(VELOX_ENABLE_BENCHMARKS) velox_type velox_serialization Folly::folly - ${FOLLY_BENCHMARK} + Folly::follybenchmark GTest::gtest GTest::gtest_main gflags::gflags @@ -106,7 +106,7 @@ if(VELOX_ENABLE_BENCHMARKS) velox_type velox_serialization Folly::folly - ${FOLLY_BENCHMARK} + Folly::follybenchmark GTest::gtest GTest::gtest_main gflags::gflags @@ -118,7 +118,7 @@ if(VELOX_ENABLE_BENCHMARKS) velox_string_view_benchmark velox_type Folly::folly - ${FOLLY_BENCHMARK} + Folly::follybenchmark GTest::gtest GTest::gtest_main gflags::gflags diff --git a/velox/vector/benchmarks/CMakeLists.txt b/velox/vector/benchmarks/CMakeLists.txt index 09d4a20f4b34..275864423e84 100644 --- a/velox/vector/benchmarks/CMakeLists.txt +++ b/velox/vector/benchmarks/CMakeLists.txt @@ -17,7 +17,7 @@ target_link_libraries( velox_vector_hash_all_benchmark velox_vector Folly::folly - ${FOLLY_BENCHMARK} + Folly::follybenchmark fmt::fmt) # This is a workaround for the use of VectorTestUtils.h which include gtest.h target_link_libraries( @@ -28,18 +28,18 @@ add_executable(velox_vector_selectivity_vector_benchmark target_link_libraries( velox_vector_selectivity_vector_benchmark velox_vector Folly::folly - ${FOLLY_BENCHMARK}) + Folly::follybenchmark) add_executable(copy_benchmark CopyBenchmark.cpp) target_link_libraries( - copy_benchmark velox_vector_test_lib Folly::folly ${FOLLY_BENCHMARK}) + copy_benchmark velox_vector_test_lib Folly::folly Folly::follybenchmark) add_executable(velox_vector_map_update_benchmark MapUpdateBenchmark.cpp) target_link_libraries( velox_vector_map_update_benchmark velox_vector_test_lib Folly::folly - ${FOLLY_BENCHMARK} + Folly::follybenchmark gflags::gflags glog::glog)