diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eecace7..2db1279 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,10 +25,14 @@ jobs: fail-fast: false matrix: os: + - ubuntu-24.04 - ubuntu-22.04 - ubuntu-20.04 + - macos-15 - macos-14 - macos-13 + - windows-2022 + - windows-2019 steps: - uses: actions/checkout@v4 - run: bash -x build-cmake.sh @@ -40,8 +44,10 @@ jobs: fail-fast: false matrix: os: + - ubuntu-24.04 - ubuntu-22.04 - ubuntu-20.04 + - macos-15 - macos-14 - macos-13 steps: @@ -58,8 +64,10 @@ jobs: fail-fast: false matrix: os: + - ubuntu-24.04 - ubuntu-22.04 - ubuntu-20.04 + - macos-15 - macos-14 - macos-13 steps: diff --git a/CMakeLists.txt b/CMakeLists.txt index 73ca518..be482fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,11 @@ cmake_minimum_required(VERSION 3.5.0) -project(mpi-stubs VERSION 4.2 LANGUAGES C) +project(mpi-abi-stubs VERSION 5.0 LANGUAGES C) option(BUILD_SHARED_LIBS "Build libraries as SHARED" TRUE) add_library(mpi_abi mpistubs.c) set_target_properties(mpi_abi PROPERTIES VERSION 0) +set_target_properties(mpi_abi PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS 1) include(GNUInstallDirs) install(FILES mpi.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/build-cmake.sh b/build-cmake.sh index 1946a67..2f2c344 100755 --- a/build-cmake.sh +++ b/build-cmake.sh @@ -1,6 +1,6 @@ #!/bin/sh set -eu cmake -B build -DCMAKE_INSTALL_PREFIX="${PREFIX:-$PWD}" -cmake --build build -cmake --install build +cmake --build build --config Release +cmake --install build --config Release (test -d lib64 && ln -f -s lib64 lib) || true diff --git a/check.sh b/check.sh index 3695549..7f9febf 100755 --- a/check.sh +++ b/check.sh @@ -6,12 +6,18 @@ export PATH=${prefix}/bin:$PATH case "$(uname)" in Linux) + lib="lib" so=".so" ;; Darwin) ldd () { otool -L "$1"; } + lib="lib" so=".dylib" ;; + *_NT-*) + lib="" + so=".dll" + ;; esac tempdir="$(mktemp -d)" @@ -41,13 +47,11 @@ command -v mpicc command -v mpicxx echo "$(mpicc -show-incdir)/mpi.h": grep -E 'MPI_(SUB)?VERSION' "$(mpicc -show-incdir)/mpi.h" -echo "$(mpicc -show-libdir)/lib$(mpicc -show-libs)$so": -ldd "$(mpicc -show-libdir)/lib$(mpicc -show-libs)$so" +echo "$(mpicc -show-libdir)/$lib$(mpicc -show-libs)$so": +ldd "$(mpicc -show-libdir)/$lib$(mpicc -show-libs)$so" set -x -RPATH=-Wl,-rpath,$(mpicc -show-libdir) - mpicc -show mpicc -show-incdir mpicc -show-libdir @@ -58,8 +62,8 @@ for cc in gcc clang; do diff cc.log mpicc.log mpicc -cc="$cc" ./helloworld.c -c test -f helloworld.o && rm helloworld.o - mpicc -cc="$cc" ./helloworld.c "$RPATH" - ldd a.out && rm a.out + mpicc -cc="$cc" ./helloworld.c -o hw.exe + ldd hw.exe && rm hw.exe done mpicxx -show @@ -72,6 +76,6 @@ for cxx in g++ clang++; do diff cxx.log mpicxx.log mpicxx -cxx="$cxx" ./helloworld.cxx -c test -f helloworld.o && rm helloworld.o - mpicxx -cxx="$cxx" ./helloworld.cxx "$RPATH" - ldd a.out && rm a.out + mpicxx -cxx="$cxx" ./helloworld.cxx -o hw.exe + ldd hw.exe && rm hw.exe done