diff options
author | Tomas Farago <sensej007@email.cz> | 2020-06-12 14:07:01 +0200 |
---|---|---|
committer | Tomas Farago <sensej007@email.cz> | 2020-06-12 14:07:01 +0200 |
commit | 86c9551f08a28db25ff4966093114a92eb92f6bb (patch) | |
tree | 7d1560c06e42eaa54f4072168351dc186a4528cd /contrib | |
parent | db3cd886b8303a8a5aff20c76660ed49c2365f94 (diff) | |
download | ufo-filters-86c9551f08a28db25ff4966093114a92eb92f6bb.tar.gz ufo-filters-86c9551f08a28db25ff4966093114a92eb92f6bb.tar.bz2 ufo-filters-86c9551f08a28db25ff4966093114a92eb92f6bb.tar.xz ufo-filters-86c9551f08a28db25ff4966093114a92eb92f6bb.zip |
Fix undefined CL_TARGET_OPENCL_VERSION warning
This is hardcoded to 120 (= OpenCL 1.2) because nvidia does not support
later standards until 3.0 comes around and we do not make use of later
features anyway.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/CMakeLists.txt | 5 | ||||
-rw-r--r-- | contrib/config.h.in | 1 | ||||
-rw-r--r-- | contrib/config.h.meson.in | 1 | ||||
-rw-r--r-- | contrib/meson.build | 8 | ||||
-rw-r--r-- | contrib/ufo-med-mad-reject-2d-task.c | 1 | ||||
-rw-r--r-- | contrib/ufo-med-mad-reject-task.c | 1 | ||||
-rw-r--r-- | contrib/ufo-ocl-1liner-task.c | 1 | ||||
-rw-r--r-- | contrib/ufo-stat-monitor-task.c | 1 | ||||
-rw-r--r-- | contrib/ufo-sxc-common.c | 1 |
9 files changed, 20 insertions, 0 deletions
diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index 324cfeb..5566941 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt @@ -47,6 +47,7 @@ add_definitions("-std=c99 -Wall -fPIC") add_definitions(-DG_LOG_DOMAIN="Ufo") include_directories(${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} ${OPENCL_INCLUDE_DIRS} ${UFO_INCLUDE_DIRS}) @@ -59,6 +60,10 @@ set(ufofilter_LIBS ${UFO_LIBRARIES} ${OpenCL_LIBRARIES}) +set(CL_TARGET_OPENCL_VERSION "120") +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in + ${CMAKE_CURRENT_BINARY_DIR}/config.h) + # build static auxiliary library first add_library(contrib_sxc_aux STATIC ${contrib_sxc_aux_SRCS}) diff --git a/contrib/config.h.in b/contrib/config.h.in new file mode 100644 index 0000000..98f75dc --- /dev/null +++ b/contrib/config.h.in @@ -0,0 +1 @@ +#define CL_TARGET_OPENCL_VERSION ${CL_TARGET_OPENCL_VERSION} diff --git a/contrib/config.h.meson.in b/contrib/config.h.meson.in new file mode 100644 index 0000000..a477269 --- /dev/null +++ b/contrib/config.h.meson.in @@ -0,0 +1 @@ +#mesondefine CL_TARGET_OPENCL_VERSION diff --git a/contrib/meson.build b/contrib/meson.build index 747d2be..80da0db 100644 --- a/contrib/meson.build +++ b/contrib/meson.build @@ -27,3 +27,11 @@ endforeach install_data(kernels, install_dir: kernel_install_dir, ) + +conf = configuration_data() +conf.set('CL_TARGET_OPENCL_VERSION', '120') +configure_file( + input: 'config.h.meson.in', + output: 'config.h', + configuration: conf, +) diff --git a/contrib/ufo-med-mad-reject-2d-task.c b/contrib/ufo-med-mad-reject-2d-task.c index 122a80f..2e2a34d 100644 --- a/contrib/ufo-med-mad-reject-2d-task.c +++ b/contrib/ufo-med-mad-reject-2d-task.c @@ -18,6 +18,7 @@ * * Serge Cohen <serge.cohen@synchrotron-soleil.fr> */ +#include "config.h" #include <stdio.h> diff --git a/contrib/ufo-med-mad-reject-task.c b/contrib/ufo-med-mad-reject-task.c index 14d03a4..5df5ed1 100644 --- a/contrib/ufo-med-mad-reject-task.c +++ b/contrib/ufo-med-mad-reject-task.c @@ -18,6 +18,7 @@ * * Serge Cohen <serge.cohen@synchrotron-soleil.fr> */ +#include "config.h" #include "ufo-med-mad-reject-task.h" #include "ufo-sxc-common.h" diff --git a/contrib/ufo-ocl-1liner-task.c b/contrib/ufo-ocl-1liner-task.c index b0a0e4e..9c54403 100644 --- a/contrib/ufo-ocl-1liner-task.c +++ b/contrib/ufo-ocl-1liner-task.c @@ -18,6 +18,7 @@ * * Serge Cohen <serge.cohen@synchrotron-soleil.fr> */ +#include "config.h" // The following define seems necessary on Linux to get stdio.h declare asprintf family of functions. // Should be done early enough to be sure that stdio.h is not already included withOUT _GNU_SOURCE on. #define _GNU_SOURCE diff --git a/contrib/ufo-stat-monitor-task.c b/contrib/ufo-stat-monitor-task.c index ab31c9b..3e52b33 100644 --- a/contrib/ufo-stat-monitor-task.c +++ b/contrib/ufo-stat-monitor-task.c @@ -18,6 +18,7 @@ * * Serge Cohen <serge.cohen@synchrotron-soleil.fr> */ +#include "config.h" #include <stdio.h> diff --git a/contrib/ufo-sxc-common.c b/contrib/ufo-sxc-common.c index a0c3d6f..4128174 100644 --- a/contrib/ufo-sxc-common.c +++ b/contrib/ufo-sxc-common.c @@ -19,6 +19,7 @@ * Serge Cohen <serge.cohen@synchrotron-soleil.fr> */ +#include "config.h" #include "ufo-sxc-common.h" // Required headers : |