Skip to content

FindOpenMP: Pass compiler-driver options during linking too

Harmen Stoppels requested to merge stabbles/cmake:fix-openmp-link into master

Use link options to make the compiler link to the correct openmp lib instead of linking 'by hand'. Make the linker use -fopenmp instead of -L/path/to/lib -lomp. This makes clang set rpaths correctly when clang is compiled with openmp enabled and it's not installed in a default system path.

Fixes: #21787, #21818
Topic-rename: FindOpenMP-link-options

Edited by Brad King

Merge request reports