Commit 6b6fdea6 authored by Atkins, Charles Vernon's avatar Atkins, Charles Vernon
Browse files

Merge branch 'fix-findmpi-version-check' into release

* fix-findmpi-version-check:
  Fix backwards compatibility logic for FindMPI
  Bump FindMPI to v3.15.1, modified for v3.6 compatibility.
  Use a 4 part version string in between releases
parents cc92c54a 62da19da
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#------------------------------------------------------------------------------# #------------------------------------------------------------------------------#
# This module is already included in new versions of CMake # This module is already included in new versions of CMake
if(CMAKE_VERSION VERSION_LESS 4.0) if(CMAKE_VERSION VERSION_LESS 3.15.1)
include(${CMAKE_CURRENT_LIST_DIR}/upstream/FindMPI.cmake) include(${CMAKE_CURRENT_LIST_DIR}/upstream/FindMPI.cmake)
else() else()
include(${CMAKE_ROOT}/Modules/FindMPI.cmake) include(${CMAKE_ROOT}/Modules/FindMPI.cmake)
......
This diff is collapsed.
#include <mpi.h> #include <mpi.h>
#ifdef __cplusplus #ifdef __cplusplus
#include <cstdio> # include <cstdio>
#else #else
#include <stdio.h> # include <stdio.h>
#endif #endif
int main(int argc, char* argv[]) int main(int argc, char* argv[])
...@@ -16,4 +16,5 @@ int main(int argc, char* argv[]) ...@@ -16,4 +16,5 @@ int main(int argc, char* argv[])
#else #else
puts(mpilibver_str); puts(mpilibver_str);
#endif #endif
return 0;
} }
#include <mpi.h> #include <mpi.h>
#ifdef __cplusplus #ifdef __cplusplus
#include <cstdio> # include <cstdio>
#else #else
#include <stdio.h> # include <stdio.h>
#endif #endif
#if defined(MPI_VERSION) && defined(MPI_SUBVERSION) #if defined(MPI_VERSION) && defined(MPI_SUBVERSION)
...@@ -21,11 +21,11 @@ const char mpiver_str[] = { 'I', 'N', ...@@ -21,11 +21,11 @@ const char mpiver_str[] = { 'I', 'N',
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
#if defined(MPI_VERSION) && defined(MPI_SUBVERSION) #if defined(MPI_VERSION) && defined(MPI_SUBVERSION)
#ifdef __cplusplus # ifdef __cplusplus
std::puts(mpiver_str); std::puts(mpiver_str);
#else # else
puts(mpiver_str); puts(mpiver_str);
#endif # endif
#endif #endif
#ifdef TEST_MPI_MPICXX #ifdef TEST_MPI_MPICXX
MPI::MPI_Init(&argc, &argv); MPI::MPI_Init(&argc, &argv);
...@@ -34,4 +34,5 @@ int main(int argc, char* argv[]) ...@@ -34,4 +34,5 @@ int main(int argc, char* argv[])
MPI_Init(&argc, &argv); MPI_Init(&argc, &argv);
MPI_Finalize(); MPI_Finalize();
#endif #endif
return 0;
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment