From 9d055e72aebdf1ae26444c564f3baacbb6c2e754 Mon Sep 17 00:00:00 2001 From: chapman39 Date: Thu, 27 Aug 2026 16:50:16 -0700 Subject: [PATCH 1/2] save mfem's tpl rpath info by transforming -Xlinker items to -Wl --- src/cmake/thirdparty/FindMFEM.cmake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cmake/thirdparty/FindMFEM.cmake b/src/cmake/thirdparty/FindMFEM.cmake index 0b1b2bfece..71cfb7a670 100644 --- a/src/cmake/thirdparty/FindMFEM.cmake +++ b/src/cmake/thirdparty/FindMFEM.cmake @@ -112,11 +112,12 @@ else() string(SUBSTRING "${mfem_tpl_lnk_flags}" 0 ${mfem_tpl_lnl_flags_end_pos} mfem_tpl_lnk_flags) string(STRIP "${mfem_tpl_lnk_flags}" mfem_tpl_lnk_flags) - # filter out items containing "Xlinker" + # transform -Xlinker items to -Wl set(_mfem_tpl_list ${mfem_tpl_lnk_flags}) separate_arguments(_mfem_tpl_list) - list(FILTER _mfem_tpl_list EXCLUDE REGEX Xlinker) - list(JOIN _mfem_tpl_list " " mfem_tpl_lnk_flags) + list(TRANSFORM _mfem_tpl_list + REPLACE "^-Xlinker=-rpath,(.*)$" "-Wl,-rpath,\\1") + set(mfem_tpl_lnk_flags ${_mfem_tpl_list}) else() message(WARNING "No third party library flags found in ${MFEM_CFG_DIR}/config.mk") endif() From 4c9447b7ce4740383f69c51546c1efca7808e6e3 Mon Sep 17 00:00:00 2001 From: chapman39 Date: Thu, 27 Aug 2026 16:53:37 -0700 Subject: [PATCH 2/2] formatting --- src/cmake/thirdparty/FindMFEM.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmake/thirdparty/FindMFEM.cmake b/src/cmake/thirdparty/FindMFEM.cmake index 71cfb7a670..e3d53231af 100644 --- a/src/cmake/thirdparty/FindMFEM.cmake +++ b/src/cmake/thirdparty/FindMFEM.cmake @@ -116,7 +116,7 @@ else() set(_mfem_tpl_list ${mfem_tpl_lnk_flags}) separate_arguments(_mfem_tpl_list) list(TRANSFORM _mfem_tpl_list - REPLACE "^-Xlinker=-rpath,(.*)$" "-Wl,-rpath,\\1") + REPLACE "^-Xlinker=-rpath,(.*)$" "-Wl,-rpath,\\1") set(mfem_tpl_lnk_flags ${_mfem_tpl_list}) else() message(WARNING "No third party library flags found in ${MFEM_CFG_DIR}/config.mk")