# Plugins are supported natively on Windows, so nothing to check if WIN32 is set
if (NOT WIN32)
- # TODO Make a proper find_package for dlopen to find
- # dlfcn.h. The CMake variable CMAKE_DL_LIBS works magically
- # for the library, however.
include(gmxTestdlopen)
gmx_test_dlopen(HAVE_DLOPEN)
if(NOT HAVE_DLOPEN)
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2012,2015, by the GROMACS development team, led by
+# Copyright (c) 2012,2015,2020, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
MESSAGE(STATUS "Checking for dlopen")
set(CMAKE_REQUIRED_INCLUDES "dlfcn.h")
+ # TODO Make a proper find_package for dlopen to find
+ # dlfcn.h. The CMake variable CMAKE_DL_LIBS works magically
+ # for the library, however.
set(CMAKE_REQUIRED_LIBRARIES "dl")
check_c_source_compiles(
"#include <dlfcn.h>
# Windows doesn't need anything special to load the dynamic libraries
# that the AMD clFFT implementation uses, but *nix and BSD do.
if (NOT WIN32)
- include(CheckCXXSymbolExists)
- check_cxx_symbol_exists(dlopen dlfcn.h HAVE_DLOPEN)
+ include(gmxTestdlopen)
+ gmx_test_dlopen(HAVE_DLOPEN)
if (NOT HAVE_DLOPEN)
message(FATAL_ERROR "Cannot use clFFT for OpenCL support unless dlopen is available")
endif()