[Bug 223678] devel/cmake: find_package(OpenMP) doesn't find the openmp package

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Nov 16 23:53:06 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223678

--- Comment #9 from Christian Pfeiffer <cpfeiffer at live.de> ---
>To know if the flag itself works, `-fopenmp -Werror` could be used (assuming clang), without needing to `#include <omp.h>`. That would weed out base clang on 10.x.

`OpenMP_FOUND` should however imply that the `omp.h` file is available for
include since that's part of the OpenMP standard.

>Still, this looks like a case for doing a patch in the packaging, where we can `try_compile()` a source file that **just** does the include, then possibly use `find_file()`, to pin down where omp.h actually lives.

CMake tries to work in any environment without specific patches needed. If
FreeBSD needs $LOCALBASE as a hint to the include and library paths then that's
considered a CMake defect for that reason.

Adding support for additional library hints and an include folder isn't a
problem at all, I just didn't realize the problem so far because nobody had
reported it.

>There's additional unfortunate variation between the various machines I have and where OpenMP lives on them.

My understanding would be it should be $LOCALBASE though, right? No matter how
this gets resolved, a way to determine which OpenMP include and library paths
are required would be needed to generate usable OpenMP settings.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the kde-freebsd mailing list