| 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 |
# @FUNCTION: tribits_standardize_abs_paths() |
| 12 |
# |
| 13 |
# Function uses get_filename_component() to standardize a list of paths to be |
| 14 |
# absolute paths. |
| 15 |
# |
| 16 |
# Usage:: |
| 17 |
# |
| 18 |
# tribits_standardize_abs_paths(<pathsListvar> <path0> <path1> ...) |
| 19 |
# |
| 20 |
# On output, ``<pathsListLvar>`` will be set to the list of paths |
| 21 |
# |
| 22 |
function(tribits_standardize_abs_paths PATHS_LIST_VAR_OUT) |
| 23 |
set(PATHS_LIST) |
| 24 |
foreach(PATH_I ${ARGN}) |
| 25 |
#print_var(PATH_I) |
| 26 |
get_filename_component(STD_ABS_PATH_I "${PATH_I}" ABSOLUTE) |
| 27 |
#print_var(STD_ABS_PATH_I) |
| 28 |
list(APPEND PATHS_LIST "${STD_ABS_PATH_I}") |
| 29 |
endforeach() |
| 30 |
set(${PATHS_LIST_VAR_OUT} ${PATHS_LIST} PARENT_SCOPE) |
| 31 |
endfunction() |
| 32 |
|