ucc icon indicating copy to clipboard operation
ucc copied to clipboard

BUILD: Change `prefix` to a relative path with `CMAKE_CURRENT_LIST_DIR`

Open crcrpar opened this issue 2 years ago • 4 comments

What

Describe what this PR is doing.

Set prefix to a relative path with CMAKE_CURRENT_LIST_DIR so that users can move the UCX library to a path different from prefix.

Why ?

Justification for the PR. If there is existing issue/bug please reference. For bug fixes why and what can be merged in a single item.

It's possible that prefix and installation path are different. For example, in multi-stage docker builds, we can build and install UCC in a different stage with prefix of "/build/ucc" and copy the artifacts to "/usr/local" of the main container. In this case, ucc-targets.cmake's prefix would be "/build/ucc" but it won't work in the container.

You can check this kind of discrepancy in nvcr.io/nvidia/pytorch:22.08-py3 container.

How ?

It is optional but for complex PRs please provide information about the design, architecture, approach, etc.

Related: https://github.com/openucx/ucx/pull/8574

crcrpar avatar Sep 28 '22 18:09 crcrpar

Can one of the admins verify this patch?

swx-jenkins3 avatar Sep 28 '22 18:09 swx-jenkins3

@crcrpar Is this ready for review?

manjugv avatar Sep 29 '22 20:09 manjugv

yes, is there anything I need to do?

crcrpar avatar Sep 29 '22 23:09 crcrpar

@crcrpar can you please trim the commit title? Thanks.

manjugv avatar Oct 19 '22 18:10 manjugv

@crcrpar we can't merge without codestyle check passing, can you pls fix this

Commit title is too long: 65
Bad commit title: 'BUILD: `CMAKE_CURRENT_LIST_DIR` as prefix in ucc-targets.cmake.in'

commit title should be less than 50 symbols

Sergei-Lebedev avatar Nov 01 '22 05:11 Sergei-Lebedev