-
Notifications
You must be signed in to change notification settings - Fork 423
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
CMAKE: Make CMake config idempotent w.r.t. target discovery and creation #9622
Conversation
a03a8d2
to
9697de2
Compare
@vyasr could you squash commits? I think in general only one commit per PR is expected, the first one seems to be named correctly but the latest isn't, squashing them into a single commit should resolve that and be in line with what is normally expected in this repo. |
f5bc316
to
230f0e1
Compare
Done. |
I don't think the one failure is related, but I don't know ucx well enough to be sure. It seems like an unrelated build issue on the runner though. |
I agree, the failure is here and seems to be related to mlx5/verbs:
@yosefe @brminich could you please confirm the above isn't related? I think this is ready for review too, could you please take a look when you have the chance? |
merged as #9696 |
What
This PR makes it safe to call
find_package(ucx)
multiple times in the same scope in CMake.Resolves #9614
Why ?
In complex build environments where multiple packages may depend on ucx, it may be found twice in different parts of the CMake code. Depending on the relative scope of these
find_package
calls, callingfind_package(ucx)
multiple times in the same or nested scopes is a common occurrence.How ?
This PR changes the ucx-targets.cmake file to check which targets are defined before trying to create new ones. It exits early if all the desired targets have already been created in this scope.