Debian Codegraph @

cmake/tribits/core/utils/DualScopeAppendCmndlineArgs.cmake

raw
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(AppendCmndlineArgs)
11 include(DualScopeSet)
12
13
14 # @MACRO: dual_scope_append_cmndline_args()
15 #
16 # Utility function that appends command-line arguments to a variable of
17 # command-line options and sets the result in current scope and parent scope.
18 #
19 # Usage::
20 #
21 # dual_scope_append_cmndline_args(<var> "<extraArgs>")
22 #
23 # Just calls `append_cmndline_args()`_ and then ``set(<var> ${<var>} PARENT_SCOPE)``.
24 #
25 macro(dual_scope_append_cmndline_args CMNDLINE_VAR_NAME EXTRAARGS)
26 append_cmndline_args(${CMNDLINE_VAR_NAME} "${EXTRAARGS}")
27 set(${CMNDLINE_VAR_NAME} "${${CMNDLINE_VAR_NAME}}" PARENT_SCOPE)
28 endmacro()