Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 4.3k
ARROW-11340: [C++] Add vcpkg.json manifest to cpp project root#9287
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
c98b908b687f2193c921a94d5f0604a620ad52b1cbb7ac88f0a5ffae17da179a8c4deb8d65d73c27509cb9d1cdeddbbb3c13cafd1f6a777704ea0c1339d706f462e6380ffa6bed45f828a3241bd2f711f19e6fdbaa987027adada4456838ba059cea45f58424d52ffef64e33bce68bd3a1950d6File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| { | ||
| "configurations": [ | ||
| { | ||
| "name": "x64-Debug (default)", | ||
| "generator": "Ninja", | ||
| "configurationType": "Debug", | ||
| "inheritEnvironments": [ "msvc_x64_x64" ], | ||
| "buildRoot": "${projectDir}\\out\\build\\${name}", | ||
| "installRoot": "${projectDir}\\out\\install\\${name}", | ||
| "cmakeCommandArgs": "", | ||
| "buildCommandArgs": "", | ||
| "ctestCommandArgs": "", | ||
| "variables": [ | ||
| { | ||
| "name":"VCPKG_MANIFEST_MODE", | ||
| "value":"OFF" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| { | ||
| "name": "arrow", | ||
| "version-string": "4.0.0-SNAPSHOT", | ||
| "dependencies": [ | ||
| "abseil", | ||
| { | ||
| "name": "aws-sdk-cpp", | ||
| "features": [ | ||
| "config", | ||
| "cognito-identity", | ||
| "identity-management", | ||
| "s3", | ||
| "sts", | ||
| "transfer" | ||
| ] | ||
| }, | ||
| "benchmark", | ||
ianmcook marked this conversation as resolved.
Outdated
Uh oh!There was an error while loading. Please reload this page. | ||
| "boost", | ||
| "brotli", | ||
| "bzip2", | ||
| "c-ares", | ||
| "curl", | ||
| "flatbuffers", | ||
| "gflags", | ||
| "glog", | ||
| "grpc", | ||
| "gtest", | ||
| "lz4", | ||
| "openssl", | ||
| "orc", | ||
| "protobuf", | ||
| "rapidjson", | ||
| "re2", | ||
| "snappy", | ||
| "thrift", | ||
| "utf8proc", | ||
| "zlib", | ||
| "zstd" | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -82,6 +82,9 @@ groups: | ||
| ruby: | ||
| - test-*ruby* | ||
| vcpkg: | ||
| - test-*vcpkg* | ||
| integration: | ||
| - test-*dask* | ||
| - test-*hdfs* | ||
| @@ -1809,6 +1812,12 @@ tasks: | ||
| UBUNTU: 18.04 | ||
| run: ubuntu-docs | ||
| ############################## vcpkg tests ################################## | ||
| test-build-vcpkg-win: | ||
ianmcook marked this conversation as resolved.
Outdated
Uh oh!There was an error while loading. Please reload this page. | ||
| ci: github | ||
| template: vcpkg-tests/github.windows.yml | ||
| ############################## Integration tests ############################ | ||
| test-conda-python-3.7-pandas-latest: | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| @rem Licensed to the Apache Software Foundation (ASF) under one | ||
| @rem or more contributor license agreements. See the NOTICE file | ||
| @rem distributed with this work for additional information | ||
| @rem regarding copyright ownership. The ASF licenses this file | ||
| @rem to you under the Apache License, Version 2.0 (the | ||
| @rem "License"); you may not use this file except in compliance | ||
| @rem with the License. You may obtain a copy of the License at | ||
| @rem | ||
| @rem http://www.apache.org/licenses/LICENSE-2.0 | ||
| @rem | ||
| @rem Unless required by applicable law or agreed to in writing, | ||
| @rem software distributed under the License is distributed on an | ||
| @rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| @rem KIND, either express or implied. See the License for the | ||
| @rem specific language governing permissions and limitations | ||
| @rem under the License. | ||
| @rem Run VsDevCmd.bat to set Visual Studio environment variables for building | ||
| @rem on the command line. This is the path for Visual Studio Enterprise 2019 | ||
| call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=amd64 | ||
ianmcook marked this conversation as resolved.
Outdated
Uh oh!There was an error while loading. Please reload this page. | ||
| @rem Install build dependencies with vcpkg | ||
| @rem TODO(ianmcook): change --x-manifest-root to --manifest-root after it | ||
| @rem changes in vcpkg | ||
| vcpkg install ^ | ||
| --triplet x64-windows ^ | ||
| --x-manifest-root cpp ^ | ||
| --clean-after-build ^ | ||
| || exit /B 1 | ||
| @rem Set environment variables | ||
| set ARROW_TEST_DATA=%cd%\testing\data | ||
| set PARQUET_TEST_DATA=%cd%\cpp\submodules\parquet-testing\data | ||
| set VCPKG_INSTALLED=%cd%\cpp\vcpkg_installed | ||
| @rem Build Arrow C++ library | ||
| mkdir cpp\build | ||
| pushd cpp\build | ||
| @rem TODO(ianmcook): test using --parallel %NUMBER_OF_PROCESSORS% with | ||
| @rem cmake --build instead of specifying -DARROW_CXXFLAGS="/MP" here | ||
| @rem (see https://gitlab.kitware.com/cmake/cmake/-/issues/20564) | ||
| @rem TODO(ianmcook): Add -DARROW_BUILD_BENCHMARKS=ON after the issue described | ||
| @rem at https://github.com/google/benchmark/issues/1046 is resolved | ||
| cmake -G "Visual Studio 16 2019" -A x64 ^ | ||
ianmcook marked this conversation as resolved.
Outdated
Uh oh!There was an error while loading. Please reload this page. | ||
| -DARROW_BOOST_USE_SHARED=ON ^ | ||
| -DARROW_BUILD_SHARED=ON ^ | ||
| -DARROW_BUILD_STATIC=OFF ^ | ||
| -DARROW_BUILD_TESTS=ON ^ | ||
ianmcook marked this conversation as resolved.
Outdated
Uh oh!There was an error while loading. Please reload this page. | ||
| -DARROW_CXXFLAGS="/MP" ^ | ||
ianmcook marked this conversation as resolved.
Outdated
Uh oh!There was an error while loading. Please reload this page. | ||
| -DARROW_DATASET=ON ^ | ||
| -DARROW_DEPENDENCY_SOURCE=SYSTEM ^ | ||
| -DARROW_FLIGHT=ON ^ | ||
| -DARROW_MIMALLOC=ON ^ | ||
| -DARROW_PACKAGE_PREFIX="%VCPKG_INSTALLED%\x64-windows" ^ | ||
| -DARROW_PARQUET=ON ^ | ||
| -DARROW_PYTHON=OFF ^ | ||
| -DARROW_WITH_BROTLI=ON ^ | ||
| -DARROW_WITH_BZ2=ON ^ | ||
| -DARROW_WITH_LZ4=ON ^ | ||
| -DARROW_WITH_SNAPPY=ON ^ | ||
| -DARROW_WITH_ZLIB=ON ^ | ||
| -DARROW_WITH_ZSTD=ON ^ | ||
| -DCMAKE_BUILD_TYPE=release ^ | ||
| -DCMAKE_TOOLCHAIN_FILE="C:\vcpkg\scripts\buildsystems\vcpkg.cmake" ^ | ||
| -DCMAKE_UNITY_BUILD=ON ^ | ||
| -DLZ4_MSVC_LIB_PREFIX="" ^ | ||
| -DLZ4_MSVC_STATIC_LIB_SUFFIX="" ^ | ||
| -D_VCPKG_INSTALLED_DIR="%VCPKG_INSTALLED%" ^ | ||
| -DVCPKG_MANIFEST_MODE=ON ^ | ||
| -DVCPKG_TARGET_TRIPLET="x64-windows" ^ | ||
| -DZSTD_MSVC_LIB_PREFIX="" ^ | ||
| .. || exit /B 1 | ||
| cmake --build . --target INSTALL --config Release || exit /B 1 | ||
ianmcook marked this conversation as resolved.
Outdated
Uh oh!There was an error while loading. Please reload this page. | ||
| @rem Test Arrow C++ library | ||
| @rem TODO(ianmcook): Troubleshoot two test failures: | ||
ianmcook marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| @rem - TestStatisticsSortOrder/0.MinMax | ||
| @rem - TestStatistic.Int32Extremums | ||
| ctest --output-on-failure ^ | ||
| --parallel %NUMBER_OF_PROCESSORS% ^ | ||
| --timeout 300 || exit /B 1 | ||
| popd | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
| # NOTE: must set "Crossbow" as name to have the badge links working in the | ||
| # github comment reports! | ||
| name: Crossbow | ||
| on: | ||
| push: | ||
| branches: | ||
| - "*-github-*" | ||
| jobs: | ||
| test-vcpkg-win: | ||
| name: Install build deps with vcpkg and build Arrow C++ | ||
| runs-on: windows-2019 | ||
| steps: | ||
| - name: Checkout Arrow | ||
| run: | | ||
| git clone --no-checkout {{ arrow.remote }} arrow | ||
| git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }} | ||
| git -C arrow checkout FETCH_HEAD | ||
| git -C arrow submodule update --init --recursive | ||
| - name: Remove and Reinstall vcpkg | ||
| # As of January 2021, the version of vcpkg that is preinstalled on the | ||
| # Github Actions windows-2019 image is 2020.11.12, as noted at | ||
| # https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md | ||
| # This version of vcpkg has a bug that causes the installation of | ||
| # aws-cpp-sdk to fail. See details at | ||
| # https://github.com/awslabs/aws-c-common/issues/734 | ||
| # and https://github.com/microsoft/vcpkg/pull/14716. | ||
| # When running vcpkg in Github Actions on Windows, remove the | ||
| # preinstalled vcpkg and install the newest version from source. | ||
| shell: cmd | ||
| run: | | ||
| CALL vcpkg integrate remove 2>NUL | ||
| CALL C: | ||
| CALL cd \ | ||
| CALL rmdir /s /q vcpkg 2>NUL | ||
| CALL git clone https://github.com/microsoft/vcpkg.git vcpkg | ||
| CALL cd vcpkg | ||
| CALL bootstrap-vcpkg.bat -win64 -disableMetrics | ||
| CALL vcpkg integrate install | ||
| CALL setx PATH "%PATH%;C:\vcpkg" | ||
| - name: Install Dependencies with vcpkg and Build Arrow C++ | ||
| shell: cmd | ||
| run: | | ||
| CALL cd arrow | ||
| CALL dev\tasks\vcpkg-tests\cpp-build-vcpkg.bat | ||
ianmcook marked this conversation as resolved.
Outdated
Uh oh!There was an error while loading. Please reload this page. | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For developers who are using Visual Studio 2019 and have vcpkg installed, when the
arrow/cppdirectory is opened in the Visual Studio IDE, it automatically identifies thevcpkg.jsonmanifest and begins installing the dependencies listed in it into a subdirectory within the project. This is an undesirable behavior because the developer might want to use conda to install the dependencies or they might have already used vcpkg to install the dependencies outside the project. ThisCMakeSettings.jsonfile sets the CMake variableVCPKG_MANIFEST_MODEtoOFF, preventing Visual Studio from performing this automatic action. In ARROW-11336, I will document this and instruct users to change the value toONif they do wish for vcpkg to automatically install dependencies.