public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] cmake.eclass: handle quoted whitespace in MYCMAKEARGS
@ 2023-02-27 19:18 Mike Gilbert
  0 siblings, 0 replies; only message in thread
From: Mike Gilbert @ 2023-02-27 19:18 UTC (permalink / raw
  To: gentoo-dev; +Cc: kde, base-system

This uses eval in a similar way to econf and meson.eclass.

Signed-off-by: Mike Gilbert <floppym@gentoo.org>
---
 eclass/cmake.eclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass
index 2c5620adede5..46659867b1a8 100644
--- a/eclass/cmake.eclass
+++ b/eclass/cmake.eclass
@@ -595,9 +595,9 @@ cmake_src_configure() {
 		-DCMAKE_TOOLCHAIN_FILE="${toolchain_file}"
 	)
 
-	if [[ -n ${MYCMAKEARGS} ]] ; then
-		cmakeargs+=( "${MYCMAKEARGS}" )
-	fi
+	# Handle quoted whitespace
+	eval "local -a MYCMAKEARGS=( ${MYCMAKEARGS} )"
+	cmakeargs+=( "${MYCMAKEARGS[@]}" )
 
 	if [[ -n "${CMAKE_EXTRA_CACHE_FILE}" ]] ; then
 		cmakeargs+=( -C "${CMAKE_EXTRA_CACHE_FILE}" )
-- 
2.39.2



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-27 19:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-27 19:18 [gentoo-dev] [PATCH] cmake.eclass: handle quoted whitespace in MYCMAKEARGS Mike Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox