Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
marin-ma committed Nov 27, 2024
1 parent 21664d6 commit 0724c0b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,6 @@ if(VELOX_ENABLE_PARQUET)
set(VELOX_ENABLE_ARROW ON)
endif()

if(VELOX_ENABLE_COMPRESSION_LZ4)
add_definitions(-DVELOX_ENABLE_COMPRESSION_LZ4)
endif()

# make buildPartitionBounds_ a vector int64 instead of int32 to avoid integer
# overflow
if(${VELOX_ENABLE_INT64_BUILD_PARTITION_BOUND})
Expand Down
26 changes: 15 additions & 11 deletions velox/common/compression/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,21 @@ if(${VELOX_BUILD_TESTING})
add_subdirectory(tests)
endif()

set(VELOX_COMMON_COMPRESSION_SRCS Compression.cpp LzoDecompressor.cpp)
set(VELOX_COMMON_COMPRESSION_LINK_LIBS velox_status Folly::folly)

if(VELOX_ENABLE_COMPRESSION_LZ4)
list(APPEND VELOX_COMMON_COMPRESSION_SRCS Lz4Compression.cpp
HadoopCompressionFormat.cpp)
list(APPEND VELOX_COMMON_COMPRESSION_LINK_LIBS lz4::lz4)
endif()

velox_add_library(velox_common_compression ${VELOX_COMMON_COMPRESSION_SRCS})
velox_add_library(
velox_common_compression
Compression.cpp
LzoDecompressor.cpp
Lz4Compression.cpp
HadoopCompressionFormat.cpp)
velox_link_libraries(
velox_common_compression
PUBLIC ${VELOX_COMMON_COMPRESSION_LINK_LIBS}
PUBLIC velox_status Folly::folly lz4::lz4
PRIVATE velox_exception)

if(VELOX_ENABLE_COMPRESSION_LZ4)
velox_sources(velox_common_compression PRIVATE Lz4Compression.cpp
HadoopCompressionFormat.cpp)
velox_link_libraries(velox_common_compression PUBLIC lz4::lz4)
velox_compile_definitions(velox_common_compression
PRIVATE VELOX_ENABLE_COMPRESSION_LZ4)
endif()

0 comments on commit 0724c0b

Please sign in to comment.