aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-10-26 09:59:59 +0100
committerThomas White <taw@physics.org>2020-10-26 09:59:59 +0100
commit058efebef43e886b5de86088786d45275fbcc90d (patch)
treeff5093f2874e09f20b68b8bfcf3f8f9b86a52489
parent128d41309a2eb3cbe176e0c723d7842e7af3c857 (diff)
Meson: Only build gpu_sim_check when OpenCL is available
See 8aff8c658925f0. Sometimes, the OpenCL headers are not available at all.
-rw-r--r--tests/meson.build16
1 files 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'],