Skip to content

Commit

Permalink
additional fixes for openmpi-openshmem
Browse files Browse the repository at this point in the history
  • Loading branch information
ct-clmsn committed Nov 7, 2023
1 parent bbdcd3f commit 746ba98
Showing 1 changed file with 29 additions and 19 deletions.
48 changes: 29 additions & 19 deletions cmake/HPX_SetupOpenSHMEM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,9 @@ macro(hpx_setup_openshmem)
)
endif()

if(OPENSHMEM_CFLAGS)
if(OPENSHMEM_CFLAGS AND (NOT ("${HPX_WITH_PARCELPORT_OPENSHMEM_CONDUIT}"
STREQUAL "mpi"))
)
set(IS_PARAM "0")
set(PARAM_FOUND "0")
set(NEWPARAM "")
Expand Down Expand Up @@ -392,7 +394,9 @@ macro(hpx_setup_openshmem)
endforeach()
endif()

if(OPENSHMEM_CFLAGS_OTHER)
if(OPENSHMEM_CFLAGS_OTHER AND (NOT ("${HPX_WITH_PARCELPORT_OPENSHMEM_CONDUIT}"
STREQUAL "mpi"))
)
set(IS_PARAM "0")
set(PARAM_FOUND "0")
set(NEWPARAM "")
Expand Down Expand Up @@ -430,7 +434,9 @@ macro(hpx_setup_openshmem)
endforeach()
endif()

if(OPENSHMEM_LDFLAGS)
if(OPENSHMEM_LDFLAGS AND (NOT ("${HPX_WITH_PARCELPORT_OPENSHMEM_CONDUIT}"
STREQUAL "mpi"))
)
set(IS_PARAM "0")
set(PARAM_FOUND "0")
set(NEWPARAM "")
Expand All @@ -443,11 +449,7 @@ macro(hpx_setup_openshmem)

foreach(X IN ITEMS ${OPENSHMEM_LDFLAGS})
string(FIND "${X}" "--param" PARAM_FOUND)
if("${HPX_WITH_PARCELPORT_OPENSHMEM_CONDUIT}" STREQUAL "mpi")
string(FIND "${X}" "-loshmem" IDX)
else()
string(FIND "${X}" "-lsma" IDX)
endif()
string(FIND "${X}" "-lsma" IDX)
string(FIND "${X}" "-l" LIDX)
string(FIND "${X}" "-L" DIRIDX)
string(FIND "${X}" "-Wl" SKIP)
Expand Down Expand Up @@ -572,7 +574,9 @@ macro(hpx_setup_openshmem)
endif()
endif()

if(OPENSHMEM_LDFLAGS_OTHER)
if(OPENSHMEM_LDFLAGS_OTHER
AND (NOT ("${HPX_WITH_PARCELPORT_OPENSHMEM_CONDUIT}" STREQUAL "mpi"))
)
unset(FOUND_LIB)
set(IS_PARAM "0")
set(PARAM_FOUND "0")
Expand All @@ -586,11 +590,7 @@ macro(hpx_setup_openshmem)

foreach(X IN ITEMS ${OPENSHMEM_LDFLAGS_OTHER})
string(FIND "${X}" "--param" PARAM_FOUND)
if("${HPX_WITH_PARCELPORT_OPENSHMEM_CONDUIT}" STREQUAL "mpi")
string(FIND "${X}" "-loshmem" IDX)
else()
string(FIND "${X}" "-lsma" IDX)
endif()
string(FIND "${X}" "-lsma" IDX)
string(FIND "${X}" "-L" DIRIDX)
string(FIND "${X}" "-Wl" SKIP)

Expand Down Expand Up @@ -715,7 +715,9 @@ macro(hpx_setup_openshmem)

endif()

if(OPENSHMEM_STATIC_CFLAGS)
if(OPENSHMEM_STATIC_CFLAGS
AND (NOT ("${HPX_WITH_PARCELPORT_OPENSHMEM_CONDUIT}" STREQUAL "mpi"))
)
set(IS_PARAM "0")
set(PARAM_FOUND "0")
set(NEWPARAM "")
Expand Down Expand Up @@ -753,7 +755,9 @@ macro(hpx_setup_openshmem)
endforeach()
endif()

if(OPENSHMEM_STATIC_CFLAGS_OTHER)
if(OPENSHMEM_STATIC_CFLAGS_OTHER
AND (NOT ("${HPX_WITH_PARCELPORT_OPENSHMEM_CONDUIT}" STREQUAL "mpi"))
)
set(IS_PARAM "0")
set(PARAM_FOUND "0")
set(NEWPARAM "")
Expand Down Expand Up @@ -791,7 +795,9 @@ macro(hpx_setup_openshmem)
endforeach()
endif()

if(OPENSHMEM_STATIC_LDFLAGS)
if(OPENSHMEM_STATIC_LDFLAGS
AND (NOT ("${HPX_WITH_PARCELPORT_OPENSHMEM_CONDUIT}" STREQUAL "mpi"))
)
unset(FOUND_LIB)
set(IS_PARAM "0")
set(PARAM_FOUND "0")
Expand Down Expand Up @@ -934,7 +940,9 @@ macro(hpx_setup_openshmem)
endif()
endif()

if(OPENSHMEM_STATIC_LDFLAGS_OTHER)
if(OPENSHMEM_STATIC_LDFLAGS_OTHER
AND (NOT ("${HPX_WITH_PARCELPORT_OPENSHMEM_CONDUIT}" STREQUAL "mpi"))
)
unset(FOUND_LIB)
set(IS_PARAM "0")
set(PARAM_FOUND "0")
Expand Down Expand Up @@ -1079,7 +1087,9 @@ macro(hpx_setup_openshmem)
endif()
endif()

if(OPENSHMEM_DIR)
if(OPENSHMEM_DIR AND (NOT ("${HPX_WITH_PARCELPORT_OPENSHMEM_CONDUIT}" STREQUAL
"mpi"))
)
list(TRANSFORM OPENSHMEM_CFLAGS
REPLACE "${OPENSHMEM_DIR}/install"
"$<BUILD_INTERFACE:${OPENSHMEM_DIR}/install>"
Expand Down

0 comments on commit 746ba98

Please sign in to comment.