diff options
-rw-r--r-- | INSTALL.md | 12 | ||||
-rw-r--r-- | meson.build | 6 | ||||
-rw-r--r-- | meson_options.txt | 2 |
3 files changed, 16 insertions, 4 deletions
@@ -127,6 +127,18 @@ meson build -Dhdf5=disabled ``` When building with CMake, HDF5 is a mandatory dependency. +Using OpenCL for GPU acceleration +--------------------------------- + +OpenCL is disabled by default when building with Meson, to keep things simple +for the majority of people who don't need it. To enable it, add +`-Dopencl=enabled` to the `meson` command line: +``` +meson build -Dopencl=enabled +``` +When building with CMake, OpenCL will always be used if the libraries are +found. + Fedora 22 or later ------------------ diff --git a/meson.build b/meson.build index fa369ef7..ac956aea 100644 --- a/meson.build +++ b/meson.build @@ -59,9 +59,9 @@ endif opencldep = dependency('OpenCL', required: get_option('opencl')) if opencldep.found() conf_data.set10('HAVE_OPENCL', 1) -endif -if cc.has_header('CL/cl.h', dependencies: opencldep) - conf_data.set10('HAVE_CL_CL_H', 1) + if cc.has_header('CL/cl.h', dependencies: opencldep) + conf_data.set10('HAVE_CL_CL_H', 1) + endif endif zmqdep = dependency('libzmq', required: false) diff --git a/meson_options.txt b/meson_options.txt index 82a4fe6d..57715748 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,2 +1,2 @@ option('hdf5', type: 'feature', value: 'enabled') -option('opencl', type: 'feature', value: 'enabled') +option('opencl', type: 'feature', value: 'disabled') |