Skip to content

Commit

Permalink
mpi deps for outerloop (#823)
Browse files Browse the repository at this point in the history
  • Loading branch information
a-zakir authored May 22, 2024
1 parent e19998e commit 520c14b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
19 changes: 13 additions & 6 deletions src/cpp/benders/outer_loop/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@
# Targets
# ===========================================================================

find_package(TBB REQUIRED CONFIG)
if (TBB_VERSION_MAJOR VERSION_LESS "2018")
message(FATAL_ERROR "Require tbb 2018 or higher.")
endif()
if (TBB_VERSION_MAJOR VERSION_GREATER "2020")
message(FATAL_ERROR "Require tbb 2018 to 2020.")
find_package (MPI REQUIRED COMPONENTS C)
message ("MPI_C_INCLUDE_PATH ${MPI_C_INCLUDE_PATH}")
message ("MPI_C_INCLUDE_DIRS ${MPI_C_INCLUDE_DIRS}")
message ("MPI_C_LIBRARIES ${MPI_C_LIBRARIES}")

find_package(MPI REQUIRED)

if(UNIX)
set(CMAKE_CXX_COMPILER ${MPI_CXX_COMPILER})
endif()

add_library (outer_loop_lib STATIC
Expand All @@ -26,10 +29,14 @@ add_library (outer_loop_lib STATIC
target_include_directories (outer_loop_lib
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include
INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}
)

target_link_libraries (outer_loop_lib
PUBLIC
Boost::mpi
MPI::MPI_C
Boost::serialization
helpers
benders_core
benders_mpi_core
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/exe/outer_loop/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ set(CMAKE_CXX_COMPILER ${MPI_CXX_COMPILER})
endif()

target_link_libraries(outer_loop
${PROJECT_NAME}::benders_mpi_core
${PROJECT_NAME}::outer_loop_lib
factories
)

Expand Down

0 comments on commit 520c14b

Please sign in to comment.