| 1 |
# MACRO_BOOL_TO_01( VAR RESULT0 ... RESULTN ) |
| 2 |
# This macro evaluates its first argument |
| 3 |
# and sets all the given variables either to 0 or 1 |
| 4 |
# depending on the value of the first one |
| 5 |
|
| 6 |
# SPDX-FileCopyrightText: 2006 Alexander Neundorf <[email protected]> |
| 7 |
# |
| 8 |
# SPDX-License-Identifier: BSD-3-Clause |
| 9 |
# |
| 10 |
|
| 11 |
MACRO(MACRO_BOOL_TO_01 FOUND_VAR ) |
| 12 |
FOREACH (_current_VAR ${ARGN}) |
| 13 |
IF(${FOUND_VAR}) |
| 14 |
SET(${_current_VAR} 1) |
| 15 |
ELSE(${FOUND_VAR}) |
| 16 |
SET(${_current_VAR} 0) |
| 17 |
ENDIF(${FOUND_VAR}) |
| 18 |
ENDFOREACH(_current_VAR) |
| 19 |
ENDMACRO(MACRO_BOOL_TO_01) |