From ef2397fc7726748ef3782f90c2f3c550cfb392fa Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Thu, 2 Jun 2022 11:33:21 -0600 Subject: [PATCH] message_wrapper() Use arg forwarding to preserve semi-colons (#483) This was not printing out the semi-colons in a list passed to message_wrapper(). I noticed this while working on #483. --- tribits/core/utils/MessageWrapper.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tribits/core/utils/MessageWrapper.cmake b/tribits/core/utils/MessageWrapper.cmake index cf7a0723d..bdcd9e5e2 100644 --- a/tribits/core/utils/MessageWrapper.cmake +++ b/tribits/core/utils/MessageWrapper.cmake @@ -68,11 +68,13 @@ include(GlobalSet) # verify that they say the right thing. # function(message_wrapper) - #message("MESSAGE_WRAPPER: ${ARGN}") + cmake_parse_arguments(PARSE_ARGV 0 FWD "" "" "") + #message("MESSAGE_WRAPPER: ${FWD_UNPARSED_ARGUMENTS}") if (MESSAGE_WRAPPER_UNIT_TEST_MODE) - global_set(MESSAGE_WRAPPER_INPUT "${MESSAGE_WRAPPER_INPUT}" ${ARGN}) + global_set(MESSAGE_WRAPPER_INPUT "${MESSAGE_WRAPPER_INPUT}" + ${FWD_UNPARSED_ARGUMENTS}) else() - message(${ARGN}) + message(${FWD_UNPARSED_ARGUMENTS}) endif() endfunction()