Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 5 additions & 28 deletions ports/openmpi/mpi-wrapper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,13 @@ if(NOT DEFINED MPI_HOME)
unset(z_vcpkg_mpiexec_directories)
endif()

# Seed FindMPI from vcpkg's OpenMPI layout. The pkg-config path remains
# available for metadata probing, including cross builds.
# pkg-config in FindMPI.cmake works also in cross builds (when providing
# the pc files without the 'o' prefix, which is handled in port mpi.)
# Skip everything else.
set(MPI_ASSUME_NO_BUILTIN_MPI TRUE)
set(MPI_SKIP_COMPILER_WRAPPER TRUE)
set(MPI_SKIP_GUESSING TRUE)

if(NOT MPI_C_INCLUDE_PATH)
set(MPI_C_INCLUDE_PATH "${MPI_HOME}/include" CACHE PATH "vcpkg" FORCE)
endif()
if(NOT MPI_CXX_INCLUDE_PATH)
set(MPI_CXX_INCLUDE_PATH "${MPI_HOME}/include" CACHE PATH "vcpkg" FORCE)
endif()
if(NOT MPI_C_LIB_NAMES)
set(MPI_C_LIB_NAMES mpi CACHE STRING "vcpkg" FORCE)
endif()
if(NOT MPI_CXX_LIB_NAMES)
set(MPI_CXX_LIB_NAMES mpi CACHE STRING "vcpkg" FORCE)
endif()
set(MPI_CXX_SKIP_MPICXX ON CACHE BOOL "vcpkg")

if(NOT DEFINED CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE MATCHES "^[Dd][Ee][Bb][Uu][Gg]$")
set(z_vcpkg_mpi_library_dir "${MPI_HOME}/debug/lib")
else()
set(z_vcpkg_mpi_library_dir "${MPI_HOME}/lib")
endif()
if(NOT MPI_mpi_LIBRARY)
find_library(MPI_mpi_LIBRARY NAMES mpi PATHS "${z_vcpkg_mpi_library_dir}" NO_DEFAULT_PATH)
endif()
unset(z_vcpkg_mpi_library_dir)

find_program(PKG_CONFIG_EXECUTABLE NAMES pkg-config pkgconf PATHS "${VCPKG_INSTALLED_DIR}/@HOST_TRIPLET@/tools/bin" NO_DEFAULT_PATH)
find_program(PKG_CONFIG_EXECUTABLE NAMES pkgconf PATHS "${VCPKG_INSTALLED_DIR}/@HOST_TRIPLET@/tools/pkgconf" REQUIRED)
find_package(PkgConfig)
set(z_vcpkg_mpiexec_pkg_config_path "$ENV{PKG_CONFIG_PATH}")
if(NOT DEFINED CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE MATCHES "^[Dd][Ee][Bb][Uu][Gg]$")
Expand All @@ -57,3 +33,4 @@ _find_package(${ARGS})

set(ENV{PKG_CONFIG_PATH} "${z_vcpkg_mpiexec_pkg_config_path}")
unset(z_vcpkg_mpiexec_pkg_config_path)

2 changes: 1 addition & 1 deletion ports/openmpi/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "openmpi",
"version": "4.1.8",
"port-version": 1,
"port-version": 2,
"description": "The Open MPI Project is an open source Message Passing Interface implementation that is developed and maintained by a consortium of academic, research, and industry partners. Open MPI is therefore able to combine the expertise, technologies, and resources from all across the High Performance Computing community in order to build the best MPI library available. Open MPI offers advantages for system and software vendors, application developers and computer science researchers.",
"homepage": "https://www.open-mpi.org/",
"supports": "!windows",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -7382,7 +7382,7 @@
},
"openmpi": {
"baseline": "4.1.8",
"port-version": 1
"port-version": 2
},
"openmvg": {
"baseline": "2.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/openmpi.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "26f38572be3d125c021d64d81f6d42f23d180f58",
"version": "4.1.8",
"port-version": 2
},
{
"git-tree": "b331e84d5d13199f2179a51e9688017881ae096e",
"version": "4.1.8",
Expand Down
Loading