Skip to content
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

Tests now can be SERIAL and use FetchContent to get rapids-cmake #48

Conversation

robertmaynard
Copy link
Contributor

To properly test cpm packages in rapids-cmake we need to fix
two major issues.

  1. A way to have tests that depend on the same CPM package
    not execute at the same time. This is required so we don't
    double checkout a project

  2. A way to checkout and build projects such as RMM that themselves
    use rapids-cmake without issue.

Number #1 is solved by the introduction of the SERIAL keyword

Number #2 is solved for most tests by having the project_template
that .cmake tests use get rapids-cmake via FETCH_CONENT. This
will allow us to verify local rapids-cmake changes against existing
projects that use rapids-cmake

To properly test `cpm` packages in rapids-cmake we need to fix
two major issues.

 1. A way to have tests that depend on the same CPM package
    not execute at the same time. This is required so we don't
    double checkout a project

 2. A way to checkout and build projects such as RMM that themselves
    use rapids-cmake without issue.

Number rapidsai#1 is solved by the introduction of the `SERIAL` keyword

Number rapidsai#2 is solved for most tests by having the `project_template`
that `.cmake` tests use get `rapids-cmake` via FETCH_CONENT. This
will allow us to verify local rapids-cmake changes against existing
projects that use rapids-cmake
@robertmaynard robertmaynard added feature request New feature or request non-breaking Introduces a non-breaking change 3 - Ready for Review Ready for review by team tests Unit testing for project labels Jul 29, 2021
@robertmaynard
Copy link
Contributor Author

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 95d8cbd into rapidsai:branch-21.10 Aug 2, 2021
@robertmaynard robertmaynard deleted the fea/testing_harness_better_represents_users branch August 2, 2021 16:20
rapids-bot bot pushed a commit that referenced this pull request Aug 18, 2021
Requires #48 and #51

Adds rapids_cpm_<PackageName> for common packages

Fixes #32

The following packages are now are easier to user for RAPIDS projects
as rapids-cmake offers a pre-configured setup for each project.

-   GTest
-   NVBench
-   RMM
-   SpdLog
-   Thrust

On top of providing a consistent version of these packages to all RAPIDS projects, rapids-cmake now is able to deduce when these projects should also be installed.

```cmake

rapids_cpm_gtest(BUILD_EXPORT_SET myproject)
rapdis_cpm_rmm(BUILD_EXPORT_SET myproject
               INSTALL_EXPORT_SET myproject)
```
Given the above snippet when RMM is built as a subcomponent of `myproject` it will be installed as well. This is done since
RMM is part of the INSTALL export set, and therefore must be available from an installed version of `myproject`.

Authors:
  - Robert Maynard (https://github.com/robertmaynard)

Approvers:
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: #52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team feature request New feature or request non-breaking Introduces a non-breaking change tests Unit testing for project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant