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

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Nov 17 12:13:53 UTC 2017


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

--- Comment #11 from Christian Pfeiffer <cpfeiffer at live.de> ---
Okay, that was my understanding of it as well. I couldn't check myself
yesterday since I didn't have my FreeBSD box at hand, but I do now.

I think the solution would be to try the current compiles first and if they all
fail, retry them with the $LOCALBASE paths added to them. That's roughly what I
did for supporting FreeBSD's MPI libraries in the ports for FindMPI in 3.10.

This way, if a user has built their own Clang / GCC, the
$LOCALBASE/include/omp.h wouldn't take precedence over the compiler provided
headers and would still be found for base Clang. Of course, this means putting
the whole $LOCALBASE/include in the include path, but this can hardly be
avoided since the use of any OpenMP support routine requires using that header.
Since it's part of the OpenMP standard, I don't think that making it optional
or depending on a CMake component for FindOpenMP would be a good idea, either.
The library won't be a problem though, since `find_library` determines the full
path and there won't be any `-L` flag being used.

@adriaan I don't mind doing it at all. Since 3.10 is due to release very
shortly, it won't be making it into that release, though. I would suggest that
I develop an upstream patch with the outlined methodology for 3.11 and we can
then see about getting it into a 3.10 point release or applying that patch
downstream until the next release comes out.

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


More information about the kde-freebsd mailing list