llnl / llnl/blt

with newer cmake, use bonafide cmake targets for mpi and openmp

Open
#516 1 comment 2 reactions 0 assignees View on GitHub
cuda feature openmp
Dominant language
C++
Stars
296
Forks
66
Avg merge
1h 3m
Merged PRs (30d)
1

Description

Are you tired of `-pthead` ruining your cuda linker's day?

Does `-fopenmp` come to your cuda parties uninvited?

Are you a library that doesn't even use cuda - but you **still some how cause problems** for your downstream friends (👎 ).

### Great news! :

With newer cmake all of these things are solved by using the bonafide + standard cmake targets for these libs.

While BLT specific logic will be still needed for older cmake (my broad guess is cmake < 3.15 ), life is better with cmake's new and improved targets 🥇!

And life would be **even better*** if BLT moved to use them!

Here is an example of how we use these targets selectivity in one of our projects:

https://github.com/Alpine-DAV/ap_compositor/blob/5a6ca8030c26ae70fef0616b7e99c0796316176c/src/cmake/SetupBLT.cmake#L32

Finally, there are some things to think about with respect to exporting targets. We shouldn't have to export them and the import logic for packages should call find when necessary. That will make sure the bonafide targets are configured with proper language support depending on what is in play.

*Offer subject to details. Not valid for CMake versions less than 3.15.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the CMake logic in BLT and compare it with the referenced SetupBLT.cmake example. Determine how MPI and OpenMP targets are currently configured, including compatibility with older CMake versions and target export/import behavior. Done means newer CMake uses the standard targets without passing unwanted flags to downstream CUDA or non-CUDA libraries.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake
Domain
build-system
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.