Skip to content

Commit

Permalink
compile fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Taylor committed May 5, 2024
1 parent c16d93d commit da7219a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
21 changes: 15 additions & 6 deletions cmake/HPX_SetupOpenSHMEM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1120,34 +1120,43 @@ macro(hpx_setup_openshmem)
message(STATUS "OPENSHMEM_LDFLAGS:\t${OPENSHMEM_LDFLAGS}")
message(STATUS "OPENSHMEM_LIBRARY_DIRS:\t${OPENSHMEM_LIBRARY_DIRS}")

separate_arguments(OPENSHMEM_CFLAGS UNIX_COMMAND "${OPENSHMEM_CFLAGS}")
separate_arguments(OPENSHMEM_LDFLAGS UNIX_COMMAND "${OPENSHMEM_LDFLAGS}")
separate_arguments(OPENSHMEM_LIBRARY_DIRS UNIX_COMMAND "${OPENSHMEM_LIBRARY_DIRS}")

set_target_properties(
PkgConfig::OPENSHMEM PROPERTIES INTERFACE_COMPILE_OPTIONS
"${OPENSHMEM_CFLAGS}"
${OPENSHMEM_CFLAGS}
)
set_target_properties(
PkgConfig::OPENSHMEM PROPERTIES INTERFACE_LINK_OPTIONS
"${OPENSHMEM_LDFLAGS}"
${OPENSHMEM_LDFLAGS}
)
set_target_properties(
PkgConfig::OPENSHMEM PROPERTIES INTERFACE_LINK_DIRECTORIES
"${OPENSHMEM_LIBRARY_DIRS}"
${OPENSHMEM_LIBRARY_DIRS}
)
else()
message(STATUS "OPENSHMEM_CFLAGS:\t${OPENSHMEM_CFLAGS}")
message(STATUS "OPENSHMEM_LDFLAGS:\t${OPENSHMEM_LDFLAGS}")
message(STATUS "OPENSHMEM_LIBRARY_DIRS:\t${OPENSHMEM_LIBRARY_DIRS}")

separate_arguments(OPENSHMEM_CFLAGS UNIX_COMMAND "${OPENSHMEM_CFLAGS}")
separate_arguments(OPENSHMEM_LDFLAGS UNIX_COMMAND "${OPENSHMEM_LDFLAGS}")
separate_arguments(OPENSHMEM_LIBRARY_DIRS UNIX_COMMAND "${OPENSHMEM_LIBRARY_DIRS}")


set_target_properties(
PkgConfig::OPENSHMEM PROPERTIES INTERFACE_COMPILE_OPTIONS
"${OPENSHMEM_CFLAGS}"
${OPENSHMEM_CFLAGS}
)
set_target_properties(
PkgConfig::OPENSHMEM PROPERTIES INTERFACE_LINK_OPTIONS
"${OPENSHMEM_LDFLAGS}"
${OPENSHMEM_LDFLAGS}
)
set_target_properties(
PkgConfig::OPENSHMEM PROPERTIES INTERFACE_LINK_DIRECTORIES
"${OPENSHMEM_LIBRARY_DIRS}"
${OPENSHMEM_LIBRARY_DIRS}
)
endif()
endmacro()
3 changes: 1 addition & 2 deletions libs/core/openshmem_base/src/openshmem_environment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,12 +352,11 @@ namespace hpx::util {

#if defined(SHMEM_MAJOR_VERSION) && defined(SHMEM_MINOR_VERSION) && \
defined(SHMEM_VENDOR_STRING) && defined(SHMEM_MAX_NAME_LEN) && \
SHMEM_MAJOR_VERSION == 1 && SHMEM_MINOR_VERSION == 4 && \
SHMEM_MAX_NAME_LEN == 256

int rc = 0;
for(std::size_t i = 0; i < count; ++i) {
rc = shmem_test(reinterpret_cast<unsigned int*>(sigaddr+i), SHMEM_CMP_EQ, value);
rc = shmem_uint_test(reinterpret_cast<unsigned int*>(sigaddr+i), SHMEM_CMP_EQ, value);
if(rc) { return i; }
}

Expand Down

0 comments on commit da7219a

Please sign in to comment.