Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove support for older protobuf versions #105

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
[submodule "third_party/fmt"]
path = third_party/fmt
url = https://github.com/fmtlib/fmt
[submodule "third_party/abseil-cpp"]
path = third_party/abseil-cpp
url = https://github.com/abseil/abseil-cpp.git
[submodule "third_party/datetime"]
path = third_party/datetime
url = https://github.com/HowardHinnant/date.git
Expand Down
1 change: 0 additions & 1 deletion .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ header:
- '.clang-tidy'
- '.cmake-format'
- '.licenserc.yaml'
- 'third_party/abseil-cpp'
- 'third_party/antlr4'
- 'third_party/datetime'
- 'third_party/fmt'
Expand Down
19 changes: 3 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: Apache-2.0

cmake_minimum_required(VERSION 3.24)
cmake_minimum_required(VERSION 3.27)

# set the project name
project(substrait-cpp)
Expand Down Expand Up @@ -33,25 +33,12 @@ option(
include_directories(include)
include_directories(src)

# TODO: Simplify once we can require cmake 3.27 (where CONFIG is default).

# Due to packaging changes we use the combined protobuf/absl packaging if
# available otherwise we fallback to the older protobuf method.
find_package(Protobuf QUIET CONFIG)
if(${Protobuf_FOUND})
message(STATUS "Modern protobuf library located.")
set(ABSL_INCLUDED_WITH_PROTOBUF ON)
else()
find_package(Protobuf QUIET)
if(${Protobuf_FOUND})
message(STATUS "Legacy protobuf library located.")
include_directories(${Protobuf_INCLUDE_DIRS})
set(ABSL_INCLUDED_WITH_PROTOBUF OFF)
else()
message(STATUS "Fetching external protobuf library.")
include(third_party/protobuf.cmake)
set(ABSL_INCLUDED_WITH_PROTOBUF ON)
endif()
message(STATUS "Fetching external protobuf library.")
include(third_party/protobuf.cmake)
endif()

add_subdirectory(third_party)
Expand Down
4 changes: 0 additions & 4 deletions third_party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)

set(ABSL_ENABLE_INSTALL ON)
if(NOT ${ABSL_INCLUDED_WITH_PROTOBUF})
set(ABSL_PROPAGATE_CXX_STD ON)
add_subdirectory(abseil-cpp)
endif()

include(datetime.cmake)

Expand Down
1 change: 0 additions & 1 deletion third_party/abseil-cpp
Submodule abseil-cpp deleted from c2435f
Loading