From 058efebef43e886b5de86088786d45275fbcc90d Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 26 Oct 2020 09:59:59 +0100 Subject: Meson: Only build gpu_sim_check when OpenCL is available See 8aff8c658925f0. Sometimes, the OpenCL headers are not available at all. --- tests/meson.build | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/meson.build b/tests/meson.build index 5c60d484..7c7c7519 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -65,13 +65,15 @@ exe = executable('prof2d_check', dependencies : [libcrystfeldep, mdep, gsldep]) test('prof2d_check', exe) -exe = executable('gpu_sim_check', - ['gpu_sim_check.c', - simulation_bits], - dependencies : [libcrystfeldep, mdep, gsldep, opencldep], - include_directories: conf_inc) -geom = files('gpu_sim_check.geom') -test('gpu_sim_check', exe, args: [geom]) +if opencldep.found() + exe = executable('gpu_sim_check', + ['gpu_sim_check.c', + simulation_bits], + dependencies : [libcrystfeldep, mdep, gsldep, opencldep], + include_directories: conf_inc) + geom = files('gpu_sim_check.geom') + test('gpu_sim_check', exe, args: [geom]) +endif exe = executable('polarisation_check', ['polarisation_check.c'], -- cgit v1.2.3