mindspore/cmake/external_libs/ompi.cmake

18 lines
688 B
CMake
Raw Normal View History

2021-01-23 20:20:31 +08:00
if(ENABLE_GITEE)
2020-10-16 14:31:47 +08:00
set(REQ_URL "https://gitee.com/mirrors/ompi/repository/archive/v4.0.3.tar.gz")
2022-11-02 17:39:06 +08:00
set(SHA256 "2cc45973dce8f147f747a8f2c4c46d171f7f3a142548812a5649e78b84a55f60")
2020-10-16 14:31:47 +08:00
else()
set(REQ_URL "https://github.com/open-mpi/ompi/archive/v4.0.3.tar.gz")
2022-11-02 17:39:06 +08:00
set(SHA256 "5663679c17c26cf8dfd5fe1eea79c2d7476f408cc22933b9750af2158ec1657b")
2021-01-23 20:20:31 +08:00
endif()
set(ompi_CXXFLAGS "-D_FORTIFY_SOURCE=2 -O2")
mindspore_add_pkg(ompi
2020-10-12 19:15:47 +08:00
VER 4.0.3
LIBS mpi
2020-10-16 14:31:47 +08:00
URL ${REQ_URL}
2022-11-02 17:39:06 +08:00
SHA256 ${SHA256}
PRE_CONFIGURE_COMMAND ./autogen.pl
2022-05-09 20:01:48 +08:00
CONFIGURE_COMMAND ./configure --disable-mpi-fortran)
include_directories(${ompi_INC})
add_library(mindspore::ompi ALIAS ompi::mpi)