Skip to content

Commit

Permalink
Merge pull request #41 from ECP-VeloC/redset_mpi
Browse files Browse the repository at this point in the history
define REDSET_ENABLE_MPI to pick up redset function declarations
  • Loading branch information
adammoody authored Dec 16, 2023
2 parents 460a9e1 + 455f80b commit b42b4ee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions buildme_deps
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ rm -rf KVTree/build
mkdir KVTree/build

cd KVTree/build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-O0" -DCMAKE_INSTALL_PREFIX=$installdir -DMPI=ON ..
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-O0" -DCMAKE_INSTALL_PREFIX=$installdir -DBUILD_SHARED_LIBS=ON -DMPI=ON ..
make clean
make
make install
Expand All @@ -45,7 +45,7 @@ mkdir rankstr/build

# rankstr
cd rankstr/build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-O0" -DCMAKE_INSTALL_PREFIX=$installdir -DMPI=ON ..
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-O0" -DCMAKE_INSTALL_PREFIX=$installdir -DBUILD_SHARED_LIBS=ON ..
make clean
make
make install
Expand All @@ -57,7 +57,7 @@ mkdir redset/build

# redset
cd redset/build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-O0" -DCMAKE_INSTALL_PREFIX=$installdir -DWITH_KVTREE_PREFIX=$installdir -DMPI=ON ..
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-O0" -DCMAKE_INSTALL_PREFIX=$installdir -DBUILD_SHARED_LIBS=ON ..
make clean
make
make install
Expand All @@ -69,7 +69,7 @@ mkdir shuffile/build

# shuffile
cd shuffile/build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-O0" -DCMAKE_INSTALL_PREFIX=$installdir -DWITH_KVTREE_PREFIX=$installdir -DMPI=ON ..
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-O0" -DCMAKE_INSTALL_PREFIX=$installdir -DBUILD_SHARED_LIBS=ON ..
make clean
make
make install
Expand Down
4 changes: 4 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,21 @@ IF(BUILD_SHARED_LIBS)
# ER Library
ADD_LIBRARY(er_o OBJECT ${liber_srcs})
TARGET_LINK_LIBRARIES(er_o PRIVATE ${ER_EXTERNAL_LIBS})
TARGET_COMPILE_DEFINITIONS(er_o PUBLIC REDSET_ENABLE_MPI)

ADD_LIBRARY(er SHARED $<TARGET_OBJECTS:er_o>)
ADD_LIBRARY(er::er ALIAS er)
TARGET_LINK_LIBRARIES(er PUBLIC ${ER_EXTERNAL_LIBS})
TARGET_INCLUDE_DIRECTORIES(er PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:include>)
TARGET_COMPILE_DEFINITIONS(er PUBLIC REDSET_ENABLE_MPI)
SET_TARGET_PROPERTIES(er PROPERTIES OUTPUT_NAME er CLEAN_DIRECT_OUTPUT 1)
INSTALL(TARGETS er EXPORT erTargets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
ENDIF()

# ER Library
ADD_LIBRARY(er_static_o OBJECT ${liber_srcs})
TARGET_LINK_LIBRARIES(er_static_o PRIVATE ${ER_EXTERNAL_STATIC_LIBS})
TARGET_COMPILE_DEFINITIONS(er_static_o PUBLIC REDSET_ENABLE_MPI)

ADD_LIBRARY(er-static STATIC $<TARGET_OBJECTS:er_static_o>)
ADD_LIBRARY(er::er-static ALIAS er-static)
Expand All @@ -41,6 +44,7 @@ IF(ER_LINK_STATIC)
ENDIF(ER_LINK_STATIC)
TARGET_LINK_LIBRARIES(er-static PUBLIC ${ER_EXTERNAL_STATIC_LIBS})
TARGET_INCLUDE_DIRECTORIES(er-static PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:include>)
TARGET_COMPILE_DEFINITIONS(er-static PUBLIC REDSET_ENABLE_MPI)

SET_TARGET_PROPERTIES(er-static PROPERTIES OUTPUT_NAME er CLEAN_DIRECT_OUTPUT 1)
INSTALL(TARGETS er-static EXPORT erTargets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})

0 comments on commit b42b4ee

Please sign in to comment.