Skip to content

Commit

Permalink
Skip LLVM test if required modules aren't found
Browse files Browse the repository at this point in the history
If the required LLVM modules can't be found, skip the LLVM framework
test, rather than succesfully doing nothing.

(This optionality is a leftover from before mesonbuild#7379)

(At the moment, OpenSuse provides dynamic-only LLVM.  The cmake method
finds LLVM, but fails to find any modules.  This might be a bug in the
cmake method.)
  • Loading branch information
jon-turney committed Jun 22, 2021
1 parent 49c6328 commit 335b38c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test cases/frameworks/15 llvm/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@ llvm_dep = dependency(
static : static,
method : method,
)
if llvm_dep.found()
executable(

if not llvm_dep.found()
error('MESON_SKIP_TEST required llvm modules not found.')
endif

executable(
'sum',
'sum.c',
dependencies : [
Expand All @@ -45,4 +49,3 @@ if llvm_dep.found()
meson.get_compiler('c').find_library('dl', required : false),
]
)
endif

0 comments on commit 335b38c

Please sign in to comment.