mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 01:51:39 +08:00
42 lines
1.2 KiB
CMake
42 lines
1.2 KiB
CMake
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
|
|
|
set(OpenMPI_FULL_VERSION "4.1.6")
|
|
set(OpenMPI_SHORT_VERSION "4.1")
|
|
|
|
vcpkg_download_distfile(ARCHIVE
|
|
URLS "https://download.open-mpi.org/release/open-mpi/v${OpenMPI_SHORT_VERSION}/openmpi-${OpenMPI_FULL_VERSION}.tar.gz"
|
|
FILENAME "openmpi-${OpenMPI_FULL_VERSION}.tar.gz"
|
|
SHA512 6fb38cafa75021f12a9674a05056d25cc9bb5e6dd88f26fee73a89736fb741bbfb37efee31e07edb372f21583144ccc2c03cd7861e9055e87699a22740173e0b
|
|
)
|
|
|
|
vcpkg_extract_source_archive(
|
|
SOURCE_PATH
|
|
ARCHIVE ${ARCHIVE}
|
|
PATCHES
|
|
keep_isystem.patch
|
|
)
|
|
|
|
vcpkg_find_acquire_program(PERL)
|
|
get_filename_component(PERL_PATH ${PERL} DIRECTORY)
|
|
vcpkg_add_to_path(${PERL_PATH})
|
|
|
|
vcpkg_configure_make(
|
|
COPY_SOURCE
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
OPTIONS
|
|
--with-hwloc=internal
|
|
--with-libevent=internal
|
|
--with-pmix=internal
|
|
--disable-mpi-fortran
|
|
OPTIONS_DEBUG
|
|
--enable-debug
|
|
)
|
|
|
|
vcpkg_install_make()
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|