FindOpenMP: Pass compiler-driver options during linking too
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.
Edited by Brad King