diff --git a/velox/connectors/hive/iceberg/tests/CMakeLists.txt b/velox/connectors/hive/iceberg/tests/CMakeLists.txt index 84b3514f7040..51d1116d1845 100644 --- a/velox/connectors/hive/iceberg/tests/CMakeLists.txt +++ b/velox/connectors/hive/iceberg/tests/CMakeLists.txt @@ -28,7 +28,6 @@ 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 @@ -51,7 +50,6 @@ 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 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 cfd63f87e68e..f66789b97315 100644 --- a/velox/dwio/dwrf/common/CMakeLists.txt +++ b/velox/dwio/dwrf/common/CMakeLists.txt @@ -24,7 +24,9 @@ velox_add_library( IntEncoder.cpp RLEv1.cpp RLEv2.cpp - Statistics.cpp) + Statistics.cpp + wrap/orc-proto-wrapper.cpp + wrap/dwrf-proto-wrapper.cpp) velox_link_libraries( velox_dwio_dwrf_common @@ -36,6 +38,13 @@ velox_link_libraries( velox_dwio_dwrf_proto velox_caching Snappy::snappy - zstd::zstd) + zstd::zstd + protobuf::libprotobuf) -add_subdirectory(wrap) +# 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/common/wrap/CMakeLists.txt b/velox/dwio/dwrf/common/wrap/CMakeLists.txt deleted file mode 100644 index f08e457be1a5..000000000000 --- a/velox/dwio/dwrf/common/wrap/CMakeLists.txt +++ /dev/null @@ -1,25 +0,0 @@ -# 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. - -# These files wrap the generated source and header files from -# velox_dwio_dwrf_proto with pragamas to disable certain warnings TODO: transfer -# disabling the warnings to CMake/Buck -velox_add_library(velox_dwio_dwrf_proto orc-proto-wrapper.cpp - dwrf-proto-wrapper.cpp) -velox_link_libraries(velox_dwio_dwrf_proto protobuf::libprotobuf) -velox_include_directories(velox_dwio_dwrf_proto PUBLIC ${PROJECT_BINARY_DIR}) - -if(NOT VELOX_MONO_LIBRARY) - add_dependencies(velox_dwio_dwrf_proto dwio_proto) -endif() diff --git a/velox/dwio/dwrf/test/CMakeLists.txt b/velox/dwio/dwrf/test/CMakeLists.txt index e5c7993f5760..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 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/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)