Skip to content

Commit

Permalink
[doc] Mention CMake is not supported for Windows R build. [skip ci] (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis authored Jan 7, 2025
1 parent 7f1add8 commit e78629a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions doc/build.rst
Original file line number Diff line number Diff line change
Expand Up @@ -301,23 +301,24 @@ project in the RStudio IDE.
library(devtools)
devtools::load_all(path = "/path/to/xgboost/R-package")
If you want to use the CMake build for greater flexibility around compile flags, the
earlier snippet can be replaced by:
On Linux, if you want to use the CMake build for greater flexibility around compile flags,
the earlier snippet can be replaced by:

.. code-block:: bash
cmake -B build -S . -DR_LIB=ON -GNinja
cd build && ninja install
.. warning::

MSVC is not supported for the R package as it has difficulty handling R C
headers. CMake build is not supported either.

Note in this case that ``cmake`` will not take configurations from your regular
``Makevars`` file (if you have such a file under ``~/.R/Makevars``) - instead, custom
configurations such as compilers to use and flags need to be set through CMake variables
like ``-DCMAKE_CXX_COMPILER``.

.. warning::

MSVC is not supported for the R package as it has difficulty handling R C headers.


.. _r_gpu_support:

Expand Down

0 comments on commit e78629a

Please sign in to comment.