mirror of
https://github.com/boostorg/mpi.git
synced 2026-01-19 04:22:10 +00:00
88 lines
1.9 KiB
CMake
88 lines
1.9 KiB
CMake
# Generated by `boostdep --cmake mpi`
|
|
# Copyright 2020 Peter Dimov
|
|
# Distributed under the Boost Software License, Version 1.0.
|
|
# https://www.boost.org/LICENSE_1_0.txt
|
|
|
|
cmake_minimum_required(VERSION 3.5...4.0)
|
|
|
|
project(boost_mpi VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES C CXX)
|
|
|
|
add_library(boost_mpi
|
|
src/broadcast.cpp
|
|
src/cartesian_communicator.cpp
|
|
src/communicator.cpp
|
|
src/computation_tree.cpp
|
|
src/content_oarchive.cpp
|
|
src/environment.cpp
|
|
src/error_string.cpp
|
|
src/exception.cpp
|
|
src/graph_communicator.cpp
|
|
src/group.cpp
|
|
src/intercommunicator.cpp
|
|
src/mpi_datatype_cache.cpp
|
|
src/mpi_datatype_oarchive.cpp
|
|
src/offsets.cpp
|
|
src/packed_iarchive.cpp
|
|
src/packed_oarchive.cpp
|
|
src/packed_skeleton_iarchive.cpp
|
|
src/packed_skeleton_oarchive.cpp
|
|
src/point_to_point.cpp
|
|
src/request.cpp
|
|
src/status.cpp
|
|
src/text_skeleton_oarchive.cpp
|
|
src/timer.cpp
|
|
)
|
|
|
|
add_library(Boost::mpi ALIAS boost_mpi)
|
|
|
|
target_include_directories(boost_mpi PUBLIC include)
|
|
|
|
target_link_libraries(boost_mpi
|
|
PUBLIC
|
|
Boost::assert
|
|
Boost::config
|
|
Boost::core
|
|
Boost::foreach
|
|
Boost::function
|
|
Boost::graph
|
|
Boost::integer
|
|
Boost::iterator
|
|
Boost::mpl
|
|
Boost::optional
|
|
Boost::serialization
|
|
Boost::smart_ptr
|
|
Boost::static_assert
|
|
Boost::throw_exception
|
|
Boost::type_traits
|
|
|
|
PRIVATE
|
|
Boost::lexical_cast
|
|
Boost::utility
|
|
)
|
|
|
|
if(BOOST_ENABLE_MPI)
|
|
|
|
set(MPI_CXX_SKIP_MPICXX ON)
|
|
find_package(MPI REQUIRED COMPONENTS CXX)
|
|
target_link_libraries(boost_mpi PUBLIC MPI::MPI_CXX)
|
|
|
|
endif()
|
|
|
|
target_compile_definitions(boost_mpi
|
|
PUBLIC BOOST_MPI_NO_LIB
|
|
PRIVATE BOOST_MPI_SOURCE
|
|
)
|
|
|
|
if(BUILD_SHARED_LIBS)
|
|
target_compile_definitions(boost_mpi PUBLIC BOOST_MPI_DYN_LINK)
|
|
else()
|
|
target_compile_definitions(boost_mpi PUBLIC BOOST_MPI_STATIC_LINK)
|
|
endif()
|
|
|
|
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
|
|
|
|
add_subdirectory(test)
|
|
|
|
endif()
|
|
|