Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
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
2 changes: 0 additions & 2 deletions .github/workflows/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,6 @@ jobs:
ARROW_WITH_SNAPPY: ON
ARROW_WITH_ZLIB: ON
ARROW_WITH_ZSTD: ON
# Don't use preinstalled Boost by empty BOOST_ROOT
BOOST_ROOT: ""
ARROW_CMAKE_ARGS: >-
-DARROW_PACKAGE_PREFIX=/${{ matrix.msystem_lower}}
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON
Expand Down
30 changes: 7 additions & 23 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,8 @@ jobs:
ARROW_WITH_SNAPPY: ON
ARROW_WITH_ZLIB: ON
ARROW_WITH_ZSTD: ON
# Don't use preinstalled Boost by empty BOOST_ROOT and
# -DBoost_NO_BOOST_CMAKE=ON
BOOST_ROOT: ""
ARROW_CMAKE_ARGS: >-
-DARROW_PACKAGE_PREFIX=/ucrt${{ matrix.mingw-n-bits }}
-DBoost_NO_BOOST_CMAKE=ON
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON
CMAKE_UNITY_BUILD: ON
steps:
Expand Down Expand Up @@ -318,9 +314,9 @@ jobs:

windows-msvc:
name: AMD64 Windows MSVC GLib
runs-on: windows-2019
runs-on: windows-2022
if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
timeout-minutes: 90
timeout-minutes: 240
strategy:
fail-fast: false
env:
Expand Down Expand Up @@ -356,10 +352,8 @@ jobs:
CMAKE_CXX_STANDARD: "17"
CMAKE_GENERATOR: Ninja
CMAKE_INSTALL_PREFIX: "${{ github.workspace }}/dist"
CMAKE_UNITY_BUILD: ON
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
VCPKG_ROOT: "${{ github.workspace }}/vcpkg"
VCPKG_TRIPLET: x64-windows
VCPKG_DEFAULT_TRIPLET: x64-windows
permissions:
packages: write
steps:
Expand All @@ -376,10 +370,6 @@ jobs:
with:
fetch-depth: 0
submodules: recursive
- name: Install vcpkg
shell: bash
run: |
ci/scripts/install_vcpkg.sh "${VCPKG_ROOT}"
- name: Install meson
run: |
python -m pip install meson
Expand Down Expand Up @@ -408,29 +398,23 @@ jobs:
- name: Setup NuGet credentials for vcpkg caching
shell: bash
run: |
$(vcpkg/vcpkg.exe fetch nuget | tail -n 1) \
$(vcpkg fetch nuget | tail -n 1) \
sources add \
-source "https://nuget.pkg.github.com/$GITHUB_REPOSITORY_OWNER/index.json" \
-storepasswordincleartext \
-name "GitHub" \
-username "$GITHUB_REPOSITORY_OWNER" \
-password "${{ secrets.GITHUB_TOKEN }}"
$(vcpkg/vcpkg.exe fetch nuget | tail -n 1) \
$(vcpkg fetch nuget | tail -n 1) \
setapikey "${{ secrets.GITHUB_TOKEN }}" \
-source "https://nuget.pkg.github.com/$GITHUB_REPOSITORY_OWNER/index.json"
- name: Build C++ vcpkg dependencies
run: |
vcpkg\vcpkg.exe install `
--triplet $env:VCPKG_TRIPLET `
--x-manifest-root cpp `
--x-install-root build\cpp\vcpkg_installed
- name: Build C++
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
bash -c "ci/scripts/cpp_build.sh $(pwd) $(pwd)/build"
- name: Build GLib
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
bash -c "ci/scripts/c_glib_build.sh $(pwd) $(pwd)/build"
14 changes: 14 additions & 0 deletions c_glib/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,19 @@
"glib",
"gobject-introspection",
"pkgconf"
],
"$comment": "2025.02.14",
"builtin-baseline": "d5ec528843d29e3a52d745a64b469f810b2cedbf",
"overrides": [
{
"$comment":
"We need gobject-introspection 1.80.0 or later for GLib 2.80.0 but vcpkg doesn't provide it yet.",
"name": "glib",
"version": "2.78.4"
},
{
"name": "vcpkg-tool-meson",
"version": "1.3.2"
}
]
}
14 changes: 7 additions & 7 deletions ci/scripts/c_glib_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,19 @@ meson_pkg_config_path="${ARROW_HOME}/lib/pkgconfig"

mkdir -p "${build_dir}"

if [ -n "${VCPKG_ROOT:-}" ] && [ -n "${VCPKG_TRIPLET:-}" ]; then
if [ -n "${VCPKG_DEFAULT_TRIPLET:-}" ]; then
vcpkg_install_root="${build_root}/vcpkg_installed"
"${VCPKG_ROOT}/vcpkg" install \
vcpkg install \
--x-manifest-root="${source_dir}" \
--x-install-root="${vcpkg_install_root}"
PKG_CONFIG="${vcpkg_install_root}/${VCPKG_TRIPLET}/tools/pkgconf/pkgconf.exe"
PKG_CONFIG="${vcpkg_install_root}/${VCPKG_DEFAULT_TRIPLET}/tools/pkgconf/pkgconf.exe"
export PKG_CONFIG
meson_pkg_config_path="${vcpkg_install_root}/${VCPKG_TRIPLET}/lib/pkgconfig:${meson_pkg_config_path}"
meson_pkg_config_path="${vcpkg_install_root}/${VCPKG_DEFAULT_TRIPLET}/lib/pkgconfig:${meson_pkg_config_path}"
# Configure PATH for libraries required by the gobject-introspection generated binary
cpp_vcpkg_install_root="${build_root}/cpp/vcpkg_installed"
PATH="${cpp_vcpkg_install_root}/${VCPKG_TRIPLET}/debug/bin:${PATH}"
PATH="${cpp_vcpkg_install_root}/${VCPKG_TRIPLET}/bin:${PATH}"
PATH="${vcpkg_install_root}/${VCPKG_TRIPLET}/bin:${PATH}"
PATH="${cpp_vcpkg_install_root}/${VCPKG_DEFAULT_TRIPLET}/debug/bin:${PATH}"
PATH="${cpp_vcpkg_install_root}/${VCPKG_DEFAULT_TRIPLET}/bin:${PATH}"
PATH="${vcpkg_install_root}/${VCPKG_DEFAULT_TRIPLET}/bin:${PATH}"
fi

if [ -n "${VCToolsInstallDir:-}" ] && [ -n "${MSYSTEM:-}" ]; then
Expand Down
7 changes: 7 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ if(POLICY CMP0135)
cmake_policy(SET CMP0135 NEW)
endif()

# https://cmake.org/cmake/help/latest/policy/CMP0167.html
#
# Use Boost's CMake packages instead of FindBoost.cmake in CMake.
if(POLICY CMP0167)
cmake_policy(SET CMP0167 NEW)
endif()

# https://cmake.org/cmake/help/latest/policy/CMP0170.html
#
# CMP0170 is for enforcing dependency populations by users with
Expand Down
4 changes: 4 additions & 0 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2743,6 +2743,10 @@ if(ARROW_WITH_ZSTD)
else()
set(ARROW_ZSTD_LIBZSTD zstd::libzstd_static)
endif()
# vcpkg uses zstd::libzstd
if(NOT TARGET ${ARROW_ZSTD_LIBZSTD} AND TARGET zstd::libzstd)
set(ARROW_ZSTD_LIBZSTD zstd::libzstd)
endif()
if(NOT TARGET ${ARROW_ZSTD_LIBZSTD})
message(FATAL_ERROR "Zstandard target doesn't exist: ${ARROW_ZSTD_LIBZSTD}")
endif()
Expand Down
92 changes: 0 additions & 92 deletions cpp/cmake_modules/Usevcpkg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -116,52 +116,9 @@ if(NOT DEFINED VCPKG_MANIFEST_MODE AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/vcpkg
CACHE BOOL "Use vcpkg.json manifest")
message(STATUS "vcpkg.json manifest found. Using VCPKG_MANIFEST_MODE: ON")
endif()
# vcpkg can install packages in three different places
set(_INST_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/vcpkg_installed") # try here first
set(_INST_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/vcpkg_installed") # try here second
set(_INST_VCPKG_ROOT "${VCPKG_ROOT}/installed")
# Iterate over the places
foreach(_INST_DIR ${_INST_BUILD_DIR} ${_INST_SOURCE_DIR} ${_INST_VCPKG_ROOT} "notfound")
if(_INST_DIR STREQUAL "notfound")
message(FATAL_ERROR "vcpkg installed libraries directory not found. "
"Install packages with vcpkg before executing cmake.")
elseif(NOT EXISTS "${_INST_DIR}")
continue()
elseif((_INST_DIR STREQUAL _INST_BUILD_DIR OR _INST_DIR STREQUAL _INST_SOURCE_DIR)
AND NOT VCPKG_MANIFEST_MODE)
# Do not look for packages in the build or source dirs if manifest mode is off
message(STATUS "Skipped looking for installed packages in ${_INST_DIR} "
"because -DVCPKG_MANIFEST_MODE=OFF")
continue()
else()
message(STATUS "Looking for installed packages in ${_INST_DIR}")
endif()
if(DEFINED VCPKG_TARGET_TRIPLET)
# Check if a subdirectory named VCPKG_TARGET_TRIPLET
# exists in the vcpkg installed directory
if(EXISTS "${_INST_DIR}/${VCPKG_TARGET_TRIPLET}")
set(_VCPKG_INSTALLED_DIR "${_INST_DIR}")
break()
endif()
else()
# Infer VCPKG_TARGET_TRIPLET from the name of the
# subdirectory in the vcpkg installed directory
list_subdirs(_VCPKG_TRIPLET_SUBDIRS "${_INST_DIR}")
list(REMOVE_ITEM _VCPKG_TRIPLET_SUBDIRS "vcpkg")
list(LENGTH _VCPKG_TRIPLET_SUBDIRS _NUM_VCPKG_TRIPLET_SUBDIRS)
if(_NUM_VCPKG_TRIPLET_SUBDIRS EQUAL 1)
list(GET _VCPKG_TRIPLET_SUBDIRS 0 VCPKG_TARGET_TRIPLET)
set(_VCPKG_INSTALLED_DIR "${_INST_DIR}")
break()
endif()
endif()
endforeach()
if(NOT DEFINED VCPKG_TARGET_TRIPLET)
message(FATAL_ERROR "Could not infer VCPKG_TARGET_TRIPLET. "
"Specify triplet with -DVCPKG_TARGET_TRIPLET.")
elseif(NOT DEFINED _VCPKG_INSTALLED_DIR)
message(FATAL_ERROR "Could not find installed vcpkg packages for triplet ${VCPKG_TARGET_TRIPLET}. "
"Install packages with vcpkg before executing cmake.")
endif()

set(VCPKG_TARGET_TRIPLET
Expand Down Expand Up @@ -201,52 +158,3 @@ set(ARROW_VCPKG
set(ARROW_DEPENDENCY_SOURCE
"SYSTEM"
CACHE STRING "The specified value VCPKG is implemented internally as SYSTEM" FORCE)

set(BOOST_ROOT
"${ARROW_VCPKG_PREFIX}"
CACHE STRING "")
set(BOOST_INCLUDEDIR
"${ARROW_VCPKG_PREFIX}/include/boost"
CACHE STRING "")
set(BOOST_LIBRARYDIR
"${ARROW_VCPKG_PREFIX}/lib"
CACHE STRING "")
set(OPENSSL_INCLUDE_DIR
"${ARROW_VCPKG_PREFIX}/include"
CACHE STRING "")
set(OPENSSL_LIBRARIES
"${ARROW_VCPKG_PREFIX}/lib"
CACHE STRING "")
set(OPENSSL_ROOT_DIR
"${ARROW_VCPKG_PREFIX}"
CACHE STRING "")
set(Thrift_ROOT
"${ARROW_VCPKG_PREFIX}/lib"
CACHE STRING "")
set(ZSTD_INCLUDE_DIR
"${ARROW_VCPKG_PREFIX}/include"
CACHE STRING "")
set(ZSTD_ROOT
"${ARROW_VCPKG_PREFIX}"
CACHE STRING "")
set(BROTLI_ROOT
"${ARROW_VCPKG_PREFIX}"
CACHE STRING "")
set(LZ4_ROOT
"${ARROW_VCPKG_PREFIX}"
CACHE STRING "")

if(CMAKE_HOST_WIN32)
set(LZ4_MSVC_LIB_PREFIX
""
CACHE STRING "")
set(LZ4_MSVC_STATIC_LIB_SUFFIX
""
CACHE STRING "")
set(ZSTD_MSVC_LIB_PREFIX
""
CACHE STRING "")
set(ZSTD_MSVC_STATIC_LIB_SUFFIX
""
CACHE STRING "")
endif()
7 changes: 3 additions & 4 deletions cpp/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
]
},
"benchmark",
"boost-cmake",
"boost-crc",
"boost-filesystem",
"boost-multiprecision",
Expand Down Expand Up @@ -51,8 +52,6 @@
"zlib",
"zstd"
],
"overrides": [
{ "name": "gtest", "version": "1.10.0", "port-version": 4 }
],
"builtin-baseline": "3d8f78171a2a37d461077bf8d063256b63e25a4f"
"$comment": "2025.02.14",
"builtin-baseline": "d5ec528843d29e3a52d745a64b469f810b2cedbf"
}
Loading