This is useful if one needs to check if a variable is a disabler. Signed-off-by: James Hilliard <james.hilliard1@gmail.com>pull/5795/head
parent
8764e4f579
commit
b21fd95f73
15 changed files with 149 additions and 1 deletions
@ -0,0 +1,11 @@ |
||||
--- |
||||
title: Release 0.52.0 |
||||
short-description: Release notes for 0.52.0 |
||||
... |
||||
|
||||
# New features |
||||
|
||||
## Allow checking if a variable is a disabler |
||||
|
||||
Added the function `is_disabler(var)`. Returns true if a variable is a disabler |
||||
and false otherwise. |
@ -1,3 +1,13 @@ |
||||
project('shared library test', 'c') |
||||
lib = shared_library('mylib', 'libfile.c') |
||||
build_target('mylib2', 'libfile.c', target_type: 'shared_library') |
||||
|
||||
has_not_changed = false |
||||
if is_disabler(lib) |
||||
has_not_changed = true |
||||
else |
||||
has_not_changed = true |
||||
endif |
||||
assert(has_not_changed, 'Shared library has changed.') |
||||
|
||||
assert(not is_disabler(lib), 'Shared library is a disabler.') |
||||
|
Loading…
Reference in new issue