From 216e8f6480ee61f21d4572dba93894cdacfa7508 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Fri, 27 Oct 2023 14:05:41 -0400 Subject: [PATCH] correctly post-processing PMI paths --- cmake/HPX_SetupOpenSHMEM.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmake/HPX_SetupOpenSHMEM.cmake b/cmake/HPX_SetupOpenSHMEM.cmake index 774f0bcf573d..30bc43357bf4 100644 --- a/cmake/HPX_SetupOpenSHMEM.cmake +++ b/cmake/HPX_SetupOpenSHMEM.cmake @@ -53,8 +53,12 @@ macro(hpx_setup_openshmem) if(NOT PMI_LIBRARY OR NOT PMI_FOUND) set(PMI_AUTOCONF_OPTS "--enable-pmi-simple") else() - set(PMI_AUTOCONF_OPTS "--with-pmi=${PMI_INCLUDE_DIR} - --with-pmi-libdir=${PMI_LIBRARY}" + string(REGEX MATCH "(^\/[^\/]+)" PMI_INCLUDE_DIR_ROOT_PATH + ${PMI_INCLUDE_DIR} + ) + string(REGEX MATCH "(^\/[^\/]+)" PMI_LIBRARY_ROOT_PATH ${PMI_LIBRARY}) + set(PMI_AUTOCONF_OPTS + "--with-pmi=${PMI_INCLUDE_DIR_ROOT_PATH} --with-pmi-libdir=${PMI_LIBRARY_ROOT_PATH}" ) endif()