Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -270,16 +270,12 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Install dependencies
run: |
brew update
brew install protobuf
- name: Test
run: |
CMAKE_PREFIX_PATH=$(brew --prefix protobuf)
mkdir -p build
cd build
cmake .. -DBUILD_JAVA=OFF -DPROTOBUF_HOME=${CMAKE_PREFIX_PATH}
cmake .. -DBUILD_JAVA=OFF
make package test-out

meson:
Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

cmake_minimum_required (VERSION 3.12.0)
cmake_minimum_required (VERSION 3.25.0)
if (POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
endif ()
Expand Down Expand Up @@ -99,6 +99,7 @@ endif ()

# Set the package format
SET(CPACK_GENERATOR "TGZ")
SET(CPACK_SOURCE_GENERATOR "TGZ")
SET(CPACK_PACKAGE_VENDOR "Apache ORC")
SET(CPACK_PACKAGE_CONTACT "Apache ORC <[email protected]>")

Expand Down
25 changes: 0 additions & 25 deletions c++/orcConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@

@PACKAGE_INIT@

set(ORC_VENDOR_DEPENDENCIES "@ORC_VENDOR_DEPENDENCIES@")
set(ORC_SYSTEM_DEPENDENCIES "@ORC_SYSTEM_DEPENDENCIES@")

if(DEFINED CMAKE_MODULE_PATH)
Expand All @@ -59,30 +58,6 @@ include("${CMAKE_CURRENT_LIST_DIR}/orcTargets.cmake")

get_target_property(orc_static_configurations orc::orc IMPORTED_CONFIGURATIONS)

foreach(dependency ${ORC_VENDOR_DEPENDENCIES})
string(REPLACE "|" ";" dependency_pair ${dependency})
list(LENGTH dependency_pair dependency_pair_length)
if(NOT dependency_pair_length EQUAL 2)
message(FATAL_ERROR "Invalid vendor dependency: ${dependency}")
endif()
list(GET dependency_pair 0 target_name)
list(GET dependency_pair 1 static_lib_name)

add_library("${target_name}" STATIC IMPORTED)

foreach(CONFIGURATION ${orc_static_configurations})
string(TOUPPER "${CONFIGURATION}" CONFIGURATION)
get_target_property(orc_static_location orc::orc LOCATION_${CONFIGURATION})
get_filename_component(orc_lib_dir "${orc_static_location}" DIRECTORY)
set_property(TARGET "${target_name}"
APPEND
PROPERTY IMPORTED_CONFIGURATIONS ${CONFIGURATION})
set_target_properties("${target_name}"
PROPERTIES IMPORTED_LOCATION_${CONFIGURATION}
"${orc_lib_dir}/${static_lib_name}")
endforeach()
endforeach()

check_required_components(orc)

foreach(BUILD_TYPE_SUFFIX
Expand Down
10 changes: 5 additions & 5 deletions c++/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ CHECK_CXX_SOURCE_RUNS("
HAS_POST_2038
)

set(CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIR})
set(CMAKE_REQUIRED_LIBRARIES orc_zlib)
set(CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIRS})
set(CMAKE_REQUIRED_LIBRARIES ${ZLIB_LIBRARIES})
CHECK_CXX_SOURCE_COMPILES("
#define Z_PREFIX
#include<zlib.h>
Expand Down Expand Up @@ -205,14 +205,14 @@ add_library (orc STATIC ${SOURCE_FILES})
target_link_libraries (orc
INTERFACE
${ORC_INSTALL_INTERFACE_TARGETS}
PRIVATE
PUBLIC
$<BUILD_INTERFACE:orc::protobuf>
$<BUILD_INTERFACE:orc::zlib>
$<BUILD_INTERFACE:orc::snappy>
$<BUILD_INTERFACE:orc::Snappy>
$<BUILD_INTERFACE:orc::lz4>
$<BUILD_INTERFACE:orc::zstd>
$<BUILD_INTERFACE:${LIBHDFSPP_LIBRARIES}>
$<BUILD_INTERFACE:${SPARSEHASH_LIBRARIES}>
$<BUILD_INTERFACE:$<TARGET_NAME_IF_EXISTS:orc::sparsehash>>
)

target_include_directories (orc
Expand Down
1 change: 1 addition & 0 deletions c++/src/wrap/orc-proto-wrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
DIAGNOSTIC_IGNORE("-Warray-bounds")
DIAGNOSTIC_IGNORE("-Wconversion")
DIAGNOSTIC_IGNORE("-Wdeprecated")
DIAGNOSTIC_IGNORE("-Wdeprecated-declarations")
DIAGNOSTIC_IGNORE("-Wignored-qualifiers")
DIAGNOSTIC_IGNORE("-Wpadded")
DIAGNOSTIC_IGNORE("-Wsign-compare")
Expand Down
1 change: 1 addition & 0 deletions c++/src/wrap/orc-proto-wrapper.hh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ DIAGNOSTIC_PUSH
#if defined(__GNUC__) || defined(__clang__)
DIAGNOSTIC_IGNORE("-Wconversion")
DIAGNOSTIC_IGNORE("-Wdeprecated")
DIAGNOSTIC_IGNORE("-Wdeprecated-declarations")
DIAGNOSTIC_IGNORE("-Wsign-conversion")
DIAGNOSTIC_IGNORE("-Wunused-parameter")
#endif
Expand Down
5 changes: 0 additions & 5 deletions c++/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ add_executable (orc-test

target_link_libraries (orc-test
orc
orc::lz4
orc::protobuf
orc::snappy
orc::zlib
orc::gtest
orc::gmock
)
Expand All @@ -76,7 +72,6 @@ add_executable (create-test-files

target_link_libraries (create-test-files
orc
orc::protobuf
)

if (TEST_VALGRIND_MEMCHECK)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# GTEST_LIBRARY: path to libgtest
# GMOCK_STATIC_LIB: is set to gmock.a static library
# GTEST_STATIC_LIB: is set to gtest.a static library
# GTEST_FOUND is set if GTEST is found
# GTestAlt_FOUND is set if GTEST is found

if (NOT "${GTEST_HOME}" STREQUAL "")
message (STATUS "GTEST_HOME set: ${GTEST_HOME}")
Expand Down Expand Up @@ -52,14 +52,14 @@ find_library (GTEST_STATIC_LIB NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_
PATH_SUFFIXES "lib")

if (GTEST_INCLUDE_DIR AND GMOCK_LIBRARY)
set (GTEST_FOUND TRUE)
set (GTestAlt_FOUND TRUE)
set (GTEST_HEADER_NAME gmock/gmock.h)
set (GTEST_HEADER ${GTEST_INCLUDE_DIR}/${GTEST_HEADER_NAME})
else ()
set (GTEST_FOUND FALSE)
set (GTestAlt_FOUND FALSE)
endif ()

if (GTEST_FOUND)
if (GTestAlt_FOUND)
message (STATUS "Found the GTest header: ${GTEST_HEADER}")
message (STATUS "Found the GTest library: ${GTEST_LIBRARY}")
message (STATUS "Found the GMock library: ${GMOCK_LIBRARY}")
Expand Down
10 changes: 5 additions & 5 deletions cmake_modules/FindLZ4.cmake → cmake_modules/FindLZ4Alt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# LZ4_INCLUDE_DIR: directory containing headers
# LZ4_LIBRARY: path to liblz4
# LZ4_STATIC_LIB: path to lz4.a
# LZ4_FOUND: whether LZ4 has been found
# LZ4Alt_FOUND: whether LZ4 has been found

if (NOT LZ4_HOME)
if (DEFINED ENV{LZ4_HOME})
Expand Down Expand Up @@ -52,14 +52,14 @@ find_library (LZ4_STATIC_LIB NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}${LZ4_LIB_NAME}
PATH_SUFFIXES "lib" "lib64")

if (LZ4_INCLUDE_DIR AND LZ4_LIBRARY)
set (LZ4_FOUND TRUE)
set (LZ4Alt_FOUND TRUE)
set (LZ4_HEADER_NAME lz4.h)
set (LZ4_HEADER ${LZ4_INCLUDE_DIR}/${LZ4_HEADER_NAME})
else ()
set (LZ4_FOUND FALSE)
set (LZ4Alt_FOUND FALSE)
endif ()

if (LZ4_FOUND)
if (LZ4Alt_FOUND)
message (STATUS "Found the LZ4 header: ${LZ4_HEADER}")
message (STATUS "Found the LZ4 library: ${LZ4_LIBRARY}")
if (LZ4_STATIC_LIB)
Expand All @@ -85,7 +85,7 @@ mark_as_advanced (
LZ4_LIBRARY
)

if(LZ4_FOUND AND NOT TARGET LZ4::lz4)
if(LZ4Alt_FOUND AND NOT TARGET LZ4::lz4)
add_library(LZ4::lz4 UNKNOWN IMPORTED)
set_target_properties(LZ4::lz4
PROPERTIES IMPORTED_LOCATION "${LZ4_LIBRARY}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# PROTOBUF_HOME environmental variable is used to check for Protobuf headers and static library

# Protobuf_FOUND is set if Protobuf is found
# ProtobufAlt_FOUND is set if Protobuf is found
# PROTOBUF_INCLUDE_DIR: directory containing headers
# PROTOBUF_LIBRARY: location of libprotobuf
# PROTOBUF_STATIC_LIB: location of protobuf.a
Expand Down Expand Up @@ -54,7 +54,7 @@ if (NOT DEFINED CMAKE_STATIC_LIBRARY_SUFFIX)
endif ()

find_package (Protobuf CONFIG)
if (Protobuf_FOUND)
if (ProtobufAlt_FOUND)
if (TARGET protobuf::libprotobuf)
set (PROTOBUF_LIBRARY protobuf::libprotobuf)
set (PROTOBUF_STATIC_LIB PROTOBUF_STATIC_LIB-NOTFOUND)
Expand Down Expand Up @@ -127,14 +127,14 @@ else()
endif ()

if (PROTOBUF_INCLUDE_DIR AND PROTOBUF_LIBRARY AND PROTOC_LIBRARY AND PROTOBUF_EXECUTABLE)
set (Protobuf_FOUND TRUE)
set (ProtobufAlt_FOUND TRUE)
set (PROTOBUF_LIB_NAME protobuf)
set (PROTOC_LIB_NAME protoc)
else ()
set (Protobuf_FOUND FALSE)
set (ProtobufAlt_FOUND FALSE)
endif ()

if (Protobuf_FOUND)
if (ProtobufAlt_FOUND)
message (STATUS "Found the Protobuf headers: ${PROTOBUF_INCLUDE_DIR}")
message (STATUS "Found the Protobuf library: ${PROTOBUF_LIBRARY}")
message (STATUS "Found the Protoc library: ${PROTOC_LIBRARY}")
Expand Down Expand Up @@ -167,7 +167,7 @@ mark_as_advanced (
PROTOC_LIBRARY
)

if(Protobuf_FOUND AND NOT TARGET protobuf::libprotobuf)
if(ProtobufAlt_FOUND AND NOT TARGET protobuf::libprotobuf)
add_library(protobuf::libprotobuf UNKNOWN IMPORTED)
set_target_properties(protobuf::libprotobuf
PROPERTIES IMPORTED_LOCATION "${PROTOBUF_LIBRARY}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# SNAPPY_INCLUDE_DIR: directory containing headers
# SNAPPY_LIBRARY: path to libsnappy
# SNAPPY_STATIC_LIB: path to libsnappy.a
# Snappy_FOUND: whether snappy has been found
# SnappyAlt_FOUND: whether snappy has been found

if (NOT SNAPPY_HOME)
if (DEFINED ENV{SNAPPY_HOME})
Expand Down Expand Up @@ -56,14 +56,14 @@ find_library (SNAPPY_STATIC_LIB NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}${SNAPPY_LIB
PATH_SUFFIXES "lib" "lib64")

if (SNAPPY_INCLUDE_DIR AND SNAPPY_LIBRARY)
set (Snappy_FOUND TRUE)
set (SnappyAlt_FOUND TRUE)
set (SNAPPY_HEADER_NAME snappy.h)
set (SNAPPY_HEADER ${SNAPPY_INCLUDE_DIR}/${SNAPPY_HEADER_NAME})
else ()
set (Snappy_FOUND FALSE)
set (SnappyAlt_FOUND FALSE)
endif ()

if (Snappy_FOUND)
if (SnappyAlt_FOUND)
message (STATUS "Found the Snappy header: ${SNAPPY_HEADER}")
message (STATUS "Found the Snappy library: ${SNAPPY_LIBRARY}")
if (SNAPPY_STATIC_LIB)
Expand All @@ -89,7 +89,7 @@ mark_as_advanced (
SNAPPY_LIBRARY
)

if(Snappy_FOUND AND NOT TARGET Snappy::snappy)
if(SnappyAlt_FOUND AND NOT TARGET Snappy::snappy)
add_library(Snappy::snappy UNKNOWN IMPORTED)
set_target_properties(Snappy::snappy
PROPERTIES IMPORTED_LOCATION "${SNAPPY_LIBRARY}"
Expand Down
10 changes: 5 additions & 5 deletions cmake_modules/FindZLIB.cmake → cmake_modules/FindZLIBAlt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# ZLIB_INCLUDE_DIR: directory containing headers
# ZLIB_LIBRARY: path to libz/libzlib
# ZLIB_STATIC_LIB: path to zlib.a
# ZLIB_FOUND: whether ZLIB has been found
# ZLIBAlt_FOUND: whether ZLIB has been found

if (NOT ZLIB_HOME)
if (DEFINED ENV{ZLIB_HOME})
Expand Down Expand Up @@ -56,14 +56,14 @@ find_library (ZLIB_STATIC_LIB NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}${ZLIB_STATIC_
PATH_SUFFIXES "lib")

if (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
set (ZLIB_FOUND TRUE)
set (ZLIBAlt_FOUND TRUE)
set (ZLIB_HEADER_NAME zlib.h)
set (ZLIB_HEADER ${ZLIB_INCLUDE_DIR}/${ZLIB_HEADER_NAME})
else ()
set (ZLIB_FOUND FALSE)
set (ZLIBAlt_FOUND FALSE)
endif ()

if (ZLIB_FOUND)
if (ZLIBAlt_FOUND)
message (STATUS "Found the ZLIB header: ${ZLIB_HEADER}")
message (STATUS "Found the ZLIB library: ${ZLIB_LIBRARY}")
if (ZLIB_STATIC_LIB)
Expand All @@ -89,7 +89,7 @@ mark_as_advanced (
ZLIB_LIBRARY
)

if(ZLIB_FOUND AND NOT TARGET ZLIB::ZLIB)
if(ZLIBAlt_FOUND AND NOT TARGET ZLIB::ZLIB)
add_library(ZLIB::ZLIB UNKNOWN IMPORTED)
set_target_properties(ZLIB::ZLIB
PROPERTIES IMPORTED_LOCATION "${ZLIB_LIBRARY}"
Expand Down
10 changes: 5 additions & 5 deletions cmake_modules/FindZSTD.cmake → cmake_modules/FindZSTDAlt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# ZSTD_INCLUDE_DIR: directory containing headers
# ZSTD_LIBRARY: path to libzstd
# ZSTD_STATIC_LIB: path to libzstd.a
# ZSTD_FOUND: whether zstd has been found
# ZSTDAlt_FOUND: whether zstd has been found

if (NOT ZSTD_HOME)
if (DEFINED ENV{ZSTD_HOME})
Expand Down Expand Up @@ -52,14 +52,14 @@ find_library (ZSTD_STATIC_LIB NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}zstd${CMAKE_ST
PATH_SUFFIXES "lib")

if (ZSTD_INCLUDE_DIR AND ZSTD_LIBRARY)
set (ZSTD_FOUND TRUE)
set (ZSTDAlt_FOUND TRUE)
set (ZSTD_HEADER_NAME zstd.h)
set (ZSTD_HEADER ${ZSTD_INCLUDE_DIR}/${ZSTD_HEADER_NAME})
else ()
set (ZSTD_FOUND FALSE)
set (ZSTDAlt_FOUND FALSE)
endif ()

if (ZSTD_FOUND)
if (ZSTDAlt_FOUND)
message (STATUS "Found the zstd header: ${ZSTD_HEADER}")
message (STATUS "Found the zstd library: ${ZSTD_LIBRARY}")
if (ZSTD_STATIC_LIB)
Expand All @@ -85,7 +85,7 @@ mark_as_advanced (
ZSTD_LIBRARY
)

if(ZSTD_FOUND)
if(ZSTDAlt_FOUND)
if(NOT TARGET zstd::libzstd_static AND ZSTD_STATIC_LIB)
add_library(zstd::libzstd_static STATIC IMPORTED)
set_target_properties(zstd::libzstd_static
Expand Down
Loading
Loading