| 1 |
# @HEADER |
| 2 |
# ***************************************************************************** |
| 3 |
# TriBITS: Tribal Build, Integrate, and Test System |
| 4 |
# |
| 5 |
# Copyright 2013-2016 NTESS and the TriBITS contributors. |
| 6 |
# SPDX-License-Identifier: BSD-3-Clause |
| 7 |
# ***************************************************************************** |
| 8 |
# @HEADER |
| 9 |
|
| 10 |
include(GlobalSet) |
| 11 |
include(AssertDefined) |
| 12 |
|
| 13 |
|
| 14 |
# @MACRO: prepend_global_set() |
| 15 |
# |
| 16 |
# Utility macro that prepends arguments to a global variable (reduces |
| 17 |
# boiler-plate code and mistakes). |
| 18 |
# |
| 19 |
# Usage:: |
| 20 |
# |
| 21 |
# prepend_global_set(<varName> <arg0> <arg1> ...) |
| 22 |
# |
| 23 |
# The variable ``<varName>`` must exist before calling this function. To set |
| 24 |
# it empty initially use `global_null_set()`_. |
| 25 |
# |
| 26 |
macro(prepend_global_set VARNAME) |
| 27 |
assert_defined(${VARNAME}) |
| 28 |
global_set(${VARNAME} ${ARGN} ${${VARNAME}}) |
| 29 |
endmacro() |