Skip to content

Patch FindOpenMP by adding a variant of Clang OpenMP compiler flags.

Lucas Czech requested to merge lczech/cmake:find_openmp_clang_patch into master

The current compiler options that are tried by FindOpenMP in order to figure out which of them work for the used compiler are missing a variant used by Clang. See http://stackoverflow.com/a/33358625/4184258 for details.

This patch does however not use the clever trick that is used in order to reduce the number of tried flags. In the original, the first flag that is tried out corresponds to the compiler that is used. As there are two flags for Clang now, only one (the original) is used in this trick. Thus, when the used Clang version only supports the newly added flag, there are some wrong other flages tried out first, spamming the Cmake output a bit.

Merge request reports