[cmake-developers] [PATCH] New module FindLibDl

Brad King brad.king at kitware.com
Tue Nov 25 11:41:46 EST 2014


On 11/21/2014 02:59 PM, Chuck Atkins wrote:
> dlopen defined in dlfcn.h is part of POSIX so generally if you're
> on a *nix system then you can rely on it being there.  The associated
> library, however, is a different story, hence CMAKE_DL_LIBS.

My initial reaction to Roger's post was to say that CMAKE_DL_LIBS was
created very early in CMake and I think a module like FindLibDl would
supersede it.  However, Chuck raises a valid point.  The dlfcn.h header
may be in a toolchain-defined path so "finding" it ourselves may get
the wrong one.  We don't have find modules for "unistd.h" for example.

Perhaps it is simplest to update the documentation of CMAKE_DL_LIBS
to explain this.

-Brad



More information about the cmake-developers mailing list