Repository navigation
build: update build to modern toolchains and dependencies #154
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
Merged
andrew-coleman
merged 11 commits into
substrait-io:main
from
mbwhite:build-fedora-support
Nov 24, 2026
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
224f557
build: support Fedora and add CMake presets and installable package
mbwhite 092ce5a
ci: pin Ubuntu jobs to 24.04 for clang-format-15 availability
mbwhite 739ffdc
build: add license header to SubstraitConfig.cmake.in
mbwhite 052cc0e
build: bump fmt to 10.2.1 for MSVC 14.51 compatibility
mbwhite 5ff41d4
style: cmake-format ANTLR download
mbwhite c757408
build: address CodeRabbit review feedback for dependencies and instal…
mbwhite 536ee36
build: refine Protobuf version normalization and enforce clang-format-15
mbwhite 64213a8
style: apply cmake-format
mbwhite 6b4a10b
build: record C++ Protobuf version and fix root handling in Ubuntu setup
mbwhite 45868e6
style: lowercase fetchcontent commands to match CI cmake-format
mbwhite 39e7d72
build: fall back to fetched Protobuf cleanly and bound system versions
mbwhite File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| { | ||
| "version": 5, | ||
| "cmakeMinimumRequired": { "major": 3, "minor": 24, "patch": 0 }, | ||
| "configurePresets": [ | ||
| { | ||
| "name": "base", | ||
| "hidden": true, | ||
| "generator": "Ninja", | ||
| "binaryDir": "${sourceDir}/build-${presetName}", | ||
| "cacheVariables": { | ||
| "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" | ||
| } | ||
| }, | ||
| { | ||
| "name": "debug", | ||
| "displayName": "Debug", | ||
| "inherits": "base", | ||
| "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" } | ||
| }, | ||
| { | ||
| "name": "release", | ||
| "displayName": "Release", | ||
| "inherits": "base", | ||
| "cacheVariables": { "CMAKE_BUILD_TYPE": "Release" } | ||
| }, | ||
| { | ||
| "name": "asan", | ||
| "displayName": "Debug with ASan/UBSan", | ||
| "inherits": "debug", | ||
| "cacheVariables": { "SUBSTRAIT_CPP_SANITIZE_DEBUG_BUILD": "ON" } | ||
| }, | ||
| { | ||
| "name": "ci", | ||
| "displayName": "CI (Debug, ccache)", | ||
| "inherits": "debug", | ||
| "binaryDir": "${sourceDir}/build", | ||
| "cacheVariables": { | ||
| "BUILD_TZ_LIB": "ON", | ||
| "CMAKE_C_COMPILER_LAUNCHER": "ccache", | ||
| "CMAKE_CXX_COMPILER_LAUNCHER": "ccache" | ||
| } | ||
| } | ||
| ], | ||
| "buildPresets": [ | ||
| { "name": "debug", "configurePreset": "debug" }, | ||
| { "name": "release", "configurePreset": "release" }, | ||
| { "name": "asan", "configurePreset": "asan" }, | ||
| { "name": "ci", "configurePreset": "ci" } | ||
| ], | ||
| "testPresets": [ | ||
| { | ||
| "name": "default", | ||
| "hidden": true, | ||
| "output": { "outputOnFailure": true }, | ||
| "execution": { "timeout": 30 } | ||
| }, | ||
| { "name": "debug", "inherits": "default", "configurePreset": "debug" }, | ||
| { "name": "release", "inherits": "default", "configurePreset": "release" }, | ||
| { "name": "asan", "inherits": "default", "configurePreset": "asan" }, | ||
| { "name": "ci", "inherits": "default", "configurePreset": "ci" } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,36 +1,19 @@ | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| .PHONY: all clean build debug release | ||
| # Build configurations live in CMakePresets.json. | ||
|
|
||
| BUILD_TYPE := Release | ||
| .PHONY: all clean debug release asan format | ||
|
|
||
| all: debug | ||
|
|
||
| clean: | ||
| @rm -rf build-* | ||
|
|
||
| build-common: | ||
| @mkdir -p build-${BUILD_TYPE} | ||
| @cd build-${BUILD_TYPE} && \ | ||
| cmake -Wno-dev \ | ||
| -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ | ||
| -DPREFER_STATIC_LIBS=OFF \ | ||
| $(FORCE_COLOR) \ | ||
| .. | ||
|
|
||
| build: | ||
| VERBOSE=1 cmake --build build-${BUILD_TYPE} -j $${CPU_COUNT:-`nproc`} || \ | ||
| cmake --build build-${BUILD_TYPE} | ||
| debug release asan: | ||
| cmake --preset $@ -Wno-dev $(FORCE_COLOR) | ||
| cmake --build --preset $@ -j $${CPU_COUNT:-`nproc`} | ||
|
|
||
| format: | ||
| set -f | ||
| bash scripts/run-cmake-format.sh && bash scripts/run-clang-format.sh | ||
| set +f | ||
|
|
||
| debug: | ||
| @$(MAKE) build-common BUILD_TYPE=Debug | ||
| @$(MAKE) build BUILD_TYPE=Debug | ||
|
|
||
| release: | ||
| @$(MAKE) build-common BUILD_TYPE=Release | ||
| @$(MAKE) build BUILD_TYPE=Release |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| @PACKAGE_INIT@ | ||
|
|
||
| # Preserve the package prefix and libdir before dependency discovery, | ||
| # since find_dependency() calls in nested packages can overwrite PACKAGE_PREFIX_DIR. | ||
| set(_SUBSTRAIT_INSTALL_LIBDIR "@PACKAGE_CMAKE_INSTALL_LIBDIR@") | ||
|
|
||
| include(CMakeFindDependencyMacro) | ||
|
|
||
| # Dependencies that appear in the interface of the exported targets. They are | ||
| # either installed alongside this package or provided by the system. | ||
| if(@SUBSTRAIT_CPP_FIND_PROTOBUF_CONFIG@) | ||
| find_dependency(Protobuf @SUBSTRAIT_CPP_PROTOBUF_BUILD_VERSION@ CONFIG) | ||
| else() | ||
| find_dependency(Protobuf @SUBSTRAIT_CPP_PROTOBUF_BUILD_VERSION@) | ||
| endif() | ||
| find_dependency(absl CONFIG) | ||
| find_dependency(fmt CONFIG) | ||
| find_dependency(yaml-cpp CONFIG) | ||
| find_dependency(date CONFIG) | ||
|
|
||
| # The ANTLR4 runtime is built with ExternalProject and installed by this | ||
| # package as a plain static library, so it has to be re-declared here. | ||
| if(NOT TARGET antlr4_static) | ||
| add_library(antlr4_static STATIC IMPORTED) | ||
| set_target_properties( | ||
| antlr4_static | ||
| PROPERTIES | ||
| IMPORTED_LOCATION | ||
| "${_SUBSTRAIT_INSTALL_LIBDIR}/@SUBSTRAIT_CPP_ANTLR4_LIBRARY_FILE@" | ||
| ) | ||
| endif() | ||
|
|
||
| unset(_SUBSTRAIT_INSTALL_LIBDIR) | ||
|
|
||
| include("${CMAKE_CURRENT_LIST_DIR}/SubstraitTargets.cmake") | ||
|
|
||
| check_required_components(Substrait) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.