| 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 |
|
| 11 |
if (${PROJECT_NAME}_VERBOSE_CONFIGURE) |
| 12 |
|
| 13 |
|
| 14 |
# @FUNCTION: tribits_verbose_print_var() |
| 15 |
# |
| 16 |
# print a variable giving its name then value if |
| 17 |
# ``${PROJECT_NAME}_VERBOSE_CONFIGURE=TRUE``. |
| 18 |
# |
| 19 |
# Usage:: |
| 20 |
# |
| 21 |
# tribits_verbose_print_var(<varName>) |
| 22 |
# |
| 23 |
# This prints:: |
| 24 |
# |
| 25 |
# message("-- " "${VARIBLE_NAME}='${${VARIBLE_NAME}}'") |
| 26 |
# |
| 27 |
# The variable ``<varName>`` can be defined or undefined or empty. This uses |
| 28 |
# an explicit "-- " line prefix so that it prints nice even on Windows CMake. |
| 29 |
# |
| 30 |
function(tribits_verbose_print_var VARIBLE_NAME) |
| 31 |
message("-- " "${VARIBLE_NAME}='${${VARIBLE_NAME}}'") |
| 32 |
endfunction() |
| 33 |
|
| 34 |
|
| 35 |
else() # ${PROJECT_NAME}_VERBOSE_CONFIGURE |
| 36 |
|
| 37 |
|
| 38 |
function(tribits_verbose_print_var VARIBLE_NAME) |
| 39 |
endfunction() |
| 40 |
|
| 41 |
|
| 42 |
endif() # ${PROJECT_NAME}_VERBOSE_CONFIGURE |