Skip to content

GH-46084: [C++] Always use ARROW_VCPKG to detect vcpkg mode #46467

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
merged 1 commit into from
May 19, 2025

Conversation

kou
Copy link
Member

@kou kou commented May 16, 2025

Rationale for this change

We can use ARROW_DEPENDENCY_SOURCE=VCPKG to use vcpkg for dependencies. We prepare vcpkg by cpp/cmake_modules/UseVcpkg.cmake and it always defines ARROW_VCPKG.

The current code base has some ways to detect vcpkg mode:

  • if (ARROW_PACKAGE_KIND STREQUAL "vcpkg")
  • if (VCPKG_TOOLCHAIN)

ARROW_PACKAGE_KIND is optional. ARROW_DEPENDENCY_SOURCE=VCPKG doesn't define ARROW_PACKAGE_KIND=vcpkg automatically.

So either ARROW_VCPKG or VCPKG_TOOLCHAIN is better to detect vcpkg mode.

What changes are included in this PR?

This change uses ARROW_VCPKG for readability. If we accept vcpkg mode without ARROW_DEPENDENCY_SOURCE=VCPKG, VCPKG_TOOLCHAIN is better than ARROW_VCPKG.

Are these changes tested?

Yes.

Are there any user-facing changes?

Yes.

We can use `ARROW_DEPENDENCY_SOURCE=VCPKG` to use vcpkg for
dependencies. We prepare vcpkg by `cpp/cmake_modules/UseVcpkg.cmake`
and it always defines `ARROW_VCPKG`.

The current code base has some ways to detect vcpkg mode:
* `if (ARROW_PACKAGE_KIND STREQUAL "vcpkg")`
* `if (VCPKG_TOOLCHAIN)`

`ARROW_PACKAGE_KIND` is optional. `ARROW_DEPENDENCY_SOURCE=VCPKG`
doesn't define `ARROW_PACKAGE_KIND=vcpkg` automatically.

So either `ARROW_VCPKG` or `VCPKG_TOOLCHAIN` is better to detect vcpkg
mode.

This change uses `ARROW_VCPKG` for readability. If we accept vcpkg
mode without `ARROW_DEPENDENCY_SOURCE=VCPKG`, `VCPKG_TOOLCHAIN` is
better than `ARROW_VCPKG`.
@kou
Copy link
Member Author

kou commented May 16, 2025

@github-actions crossbow submit -g python -g cpp

Copy link

⚠️ GitHub issue #46084 has been automatically assigned in GitHub to PR creator.

Copy link

Revision: 4411272

Submitted crossbow builds: ursacomputing/crossbow @ actions-73dadde10f

Task Status
example-cpp-minimal-build-static GitHub Actions
example-cpp-minimal-build-static-system-dependency GitHub Actions
example-cpp-tutorial GitHub Actions
example-python-minimal-build-fedora-conda GitHub Actions
example-python-minimal-build-ubuntu-venv GitHub Actions
test-alpine-linux-cpp GitHub Actions
test-build-cpp-fuzz GitHub Actions
test-conda-cpp GitHub Actions
test-conda-cpp-meson GitHub Actions
test-conda-cpp-valgrind GitHub Actions
test-conda-python-3.10 GitHub Actions
test-conda-python-3.10-hdfs-2.9.2 GitHub Actions
test-conda-python-3.10-hdfs-3.2.1 GitHub Actions
test-conda-python-3.10-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.11 GitHub Actions
test-conda-python-3.11-dask-latest GitHub Actions
test-conda-python-3.11-dask-upstream_devel GitHub Actions
test-conda-python-3.11-hypothesis GitHub Actions
test-conda-python-3.11-pandas-latest-numpy-1.26 GitHub Actions
test-conda-python-3.11-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.11-pandas-nightly-numpy-nightly GitHub Actions
test-conda-python-3.11-pandas-upstream_devel-numpy-nightly GitHub Actions
test-conda-python-3.11-spark-master GitHub Actions
test-conda-python-3.12 GitHub Actions
test-conda-python-3.12-cpython-debug GitHub Actions
test-conda-python-3.13 GitHub Actions
test-conda-python-3.9 GitHub Actions
test-conda-python-3.9-pandas-1.1.3-numpy-1.19.5 GitHub Actions
test-conda-python-emscripten GitHub Actions
test-cuda-cpp-ubuntu-22.04-cuda-11.7.1 GitHub Actions
test-cuda-python-ubuntu-22.04-cuda-11.7.1 GitHub Actions
test-debian-12-cpp-amd64 GitHub Actions
test-debian-12-cpp-i386 GitHub Actions
test-debian-12-python-3-amd64 GitHub Actions
test-debian-12-python-3-i386 GitHub Actions
test-fedora-39-cpp GitHub Actions
test-fedora-39-python-3 GitHub Actions
test-ubuntu-22.04-cpp GitHub Actions
test-ubuntu-22.04-cpp-20 GitHub Actions
test-ubuntu-22.04-cpp-bundled GitHub Actions
test-ubuntu-22.04-cpp-emscripten GitHub Actions
test-ubuntu-22.04-cpp-no-threading GitHub Actions
test-ubuntu-22.04-python-3 GitHub Actions
test-ubuntu-22.04-python-313-freethreading GitHub Actions
test-ubuntu-24.04-cpp GitHub Actions
test-ubuntu-24.04-cpp-bundled-offline GitHub Actions
test-ubuntu-24.04-cpp-gcc-13-bundled GitHub Actions
test-ubuntu-24.04-cpp-gcc-14 GitHub Actions
test-ubuntu-24.04-cpp-minimal-with-formats GitHub Actions
test-ubuntu-24.04-cpp-thread-sanitizer GitHub Actions
test-ubuntu-24.04-python-3 GitHub Actions

@kou
Copy link
Member Author

kou commented May 19, 2025

+1

@kou kou merged commit 1229ced into apache:main May 19, 2025
31 of 32 checks passed
@kou kou deleted the cpp-cmake-vcpkg branch May 19, 2025 02:08
@kou kou removed the awaiting committer review Awaiting committer review label May 19, 2025
Copy link

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 1229ced.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant