vcpkg/ports/openmpi/portfile.cmake
Alexander Neumann 4935f12b6d
[vcpkg/scripts/make] trying to iron out some issues (#11836)
* take changes from fontconfig pr

* [farmhash] add autoconf

* [freexl] add autoconf

* [healpix] add autoconf

* [libb2] add autoconf

* [libwandio] add autoconf and patch

* more autoconf

* [x264] fix windows build issues

* minimal cleanup

* [libwandio] some fixes

* [vcpkg/scripts/make] add include to C/CXX flags correctly set machine flags for linker

* remove unnecessary comments part 1

* cleanup part 2

* cleanup

* remove unnecessary code

* [pbc] fix osx regressions

* [lzokay] format manifest

* try to copy sources to fix build issues

* add autoconfig to force updated configure scripts

* bump port versions of openmpi and ocilib

* added lib paths back into vcpkg_build_make because they are probably required

* Use CPP flags
add quotes around restoring of ENV
add LIB and LIBPATH correctly

* Apply suggestions from code review

Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>

* Apply more changes forom CR
- remove mingw make
- add doc for missing options
- introduce two new macros for backup/restore of env vars

* fix wrong variables.

* use the list macro instead of the single var macro

* also use it at the top

Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>
2020-08-13 13:32:55 -07:00

39 lines
1.2 KiB
CMake

vcpkg_fail_port_install(ON_TARGET "Windows" "UWP")
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
set(OpenMPI_FULL_VERSION "4.0.3")
set(OpenMPI_SHORT_VERSION "4.0")
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 23a9dfb7f4a63589b82f4e073a825550d3bc7e6b34770898325323ef4a28ed90b47576acaae6be427eb2007b37a88e18c1ea44d929b8ca083fe576ef1111fef6
)
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
)
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
OPTIONS_DEBUG
--enable-debug
)
vcpkg_install_make()
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)