bkietz commented on a change in pull request #9855:
URL: https://github.com/apache/arrow/pull/9855#discussion_r607996277
##########
File path: docs/source/developers/cpp/windows.rst
##########
@@ -88,9 +98,16 @@ resolving the build dependencies. This is equivalent to
setting
-DARROW_DEPENDENCY_SOURCE=SYSTEM ^
-DARROW_PACKAGE_PREFIX=%CONDA_PREFIX%\Library
-Note that these packages are only supported for release builds. If you intend
-to use ``-DCMAKE_BUILD_TYPE=debug`` then you must build the packages from
-source.
+To use the Visual Studio IDE with this conda environment activated, launch it
by
+running the command:
+
+.. code-block:: shell
+
+ devenv
Review comment:
```suggestion
To use the Visual Studio IDE with this conda environment activated, launch
it by
running the command ``devenv`` in a shell with the development environment
initialized.
```
##########
File path: docs/source/developers/cpp/windows.rst
##########
@@ -88,9 +98,16 @@ resolving the build dependencies. This is equivalent to
setting
-DARROW_DEPENDENCY_SOURCE=SYSTEM ^
-DARROW_PACKAGE_PREFIX=%CONDA_PREFIX%\Library
-Note that these packages are only supported for release builds. If you intend
-to use ``-DCMAKE_BUILD_TYPE=debug`` then you must build the packages from
-source.
+To use the Visual Studio IDE with this conda environment activated, launch it
by
+running the command:
+
+.. code-block:: shell
+
+ devenv
+
+Note that these conda packages are only supported for release builds. If you
+intend to use ``-DCMAKE_BUILD_TYPE=debug`` then you must build the packages
+from source.
Review comment:
```suggestion
Note that dependencies installed as conda packages are built in release mode
and cannot link
with debug builds. If you intend to use ``-DCMAKE_BUILD_TYPE=debug`` then
you must build
the packages from source. ``-DCMAKE_BUILD_TYPE=relwithdebinfo`` is also
available, which
produces a build that can both be linked with release libraries and be
debugged.
```
##########
File path: docs/source/developers/cpp/windows.rst
##########
@@ -99,6 +116,52 @@ source.
from ``conda-forge``. You can examine the installed packages in your
environment (and their origin) with ``conda list``
+Using vcpkg for build dependencies
+========================================
+
+`vcpkg <https://github.com/microsoft/vcpkg>`_ is an open source package manager
+from Microsoft. It hosts community-contributed ports of C and C++ packages and
+their dependencies. Arrow includes a manifest file `cpp/vcpkg.json
+<https://github.com/apache/arrow/blob/master/cpp/vcpkg.json>`_ that specifies
+which vcpkg packages are required to build the C++ library.
+
+To use vcpkg for C++ build dependencies on Windows, first
+`install <https://docs.microsoft.com/en-us/cpp/build/install-vcpkg>`_ and
+`integrate <https://docs.microsoft.com/en-us/cpp/build/integrate-vcpkg>`_
+vcpkg. Then change working directory in ``cmd.exe`` to the root directory
+of Arrow and run the command:
+
+.. code-block:: shell
+
+ vcpkg install ^
+ --triplet x64-windows ^
+ --x-manifest-root cpp ^
+ --clean-after-build
+
+On Windows, vcpkg builds dynamic link libraries by default. Use the triplet
+``x64-windows-static`` to build static libraries. vcpkg downloads source
+packages and compiles them locally, so installing dependencies with vcpkg is
+more time-consuming than with conda.
+
+Then in your ``cmake`` command, to use dependencies installed by vcpkg, set:
+
+.. code-block:: shell
+
+ -DARROW_DEPENDENCY_SOURCE=VCPKG
+
+You can optionally set other variables to override the default CMake
+configurations for vcpkg, including:
+
+* ``-DCMAKE_TOOLCHAIN_FILE``: sets the path to ``vcpkg.cmake``
Review comment:
```suggestion
* ``-DCMAKE_TOOLCHAIN_FILE``: sets the path to a cmake toolchain file,
defaults to
a toolchain provided by vcpkg: ``vcpkg.cmake``
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]