Skip to content

Commit

Permalink
Reflect current README
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleFromNVIDIA committed Aug 20, 2024
1 parent 23c005c commit 89df0b9
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions docs/basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,30 +53,40 @@ At times projects or developers will need to verify ``rapids-cmake`` branches. T
```cmake
# To override the version that is pulled:
set(rapids-cmake-version "<version>")
include(FetchContent)
FetchContent_Declare(
rapids-cmake
GIT_REPOSITORY https://github.com/<my_fork>/rapids-cmake.git
GIT_TAG <my_feature_branch>
)
file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-21.12/RAPIDS.cmake
# To override the GitHub repository:
set(rapids-cmake-repo "<my_fork>")
# To use an exact Git SHA:
set(rapids-cmake-sha "<my_git_sha>")
# To use a Git tag:
set(rapids-cmake-tag "<my_git_tag>")
# To override the repository branch:
set(rapids-cmake-branch "<my_feature_branch>")
# Or to override the entire repository URL (e.g. to use a GitLab repo):
set(rapids-cmake-url "https://gitlab.com/<my_user>/<my_fork>/-/archive/<my_branch>/<my_fork>-<my_branch>.zip")
# To override the usage of fetching the repository without git info
# This only works when specifying
#
# set(rapids-cmake-fetch-via-git "ON")
# set(rapids-cmake-branch "branch-<cal_ver>")
#
# or
# set(rapids-cmake-fetch-via-git "ON")
# set(rapids-cmake-url "https://gitlab.com/<my_user>/<private_fork>/")
# set(rapids-cmake-sha "ABC123")
#
set(rapids-cmake-fetch-via-git "ON")
file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-22.10/RAPIDS.cmake
${CMAKE_CURRENT_BINARY_DIR}/RAPIDS.cmake)
include(${CMAKE_CURRENT_BINARY_DIR}/RAPIDS.cmake)
```

This tells ``FetchContent`` to ignore the explicit url and branch in ``RAPIDS.cmake`` and use the
ones provided.
A few notes:

- An explicitly defined ``rapids-cmake-url`` will always be used
Expand Down

0 comments on commit 89df0b9

Please sign in to comment.