Per-language pthread link flag
Some compilers offer a
-pthread flag to use at link time instead of linking to the pthread library. The need to spell the flag differently depending on the compiler driver used has come up a few times:
- cmake-developers list Sept 2019: Possible feature request concerning conditional linking support by generator expressions
- CUDA support: #18008 (comment 412820)
I'm opening this issue to discuss possible approaches.