mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 04:40:56 -06:00
Move the `static` added by commit 8cce0ad32f (FindMPI: Fix missing
static warning in the mpi test source, 2021-06-30, v3.22.0-rc1~502^2) to
the beginning of the line.
Fixes: #23141
39 lines
920 B
C
39 lines
920 B
C
#include <mpi.h>
|
|
|
|
#ifdef __cplusplus
|
|
# include <cstdio>
|
|
#else
|
|
# include <stdio.h>
|
|
#endif
|
|
|
|
#if defined(MPI_VERSION) && defined(MPI_SUBVERSION)
|
|
static const char mpiver_str[] = { 'I', 'N',
|
|
'F', 'O',
|
|
':', 'M',
|
|
'P', 'I',
|
|
'-', 'V',
|
|
'E', 'R',
|
|
'[', ('0' + MPI_VERSION),
|
|
'.', ('0' + MPI_SUBVERSION),
|
|
']', '\0' };
|
|
#endif
|
|
|
|
int main(int argc, char* argv[])
|
|
{
|
|
#if defined(MPI_VERSION) && defined(MPI_SUBVERSION)
|
|
# ifdef __cplusplus
|
|
std::puts(mpiver_str);
|
|
# else
|
|
puts(mpiver_str);
|
|
# endif
|
|
#endif
|
|
#ifdef TEST_MPI_MPICXX
|
|
MPI::MPI_Init(&argc, &argv);
|
|
MPI::MPI_Finalize();
|
|
#else
|
|
MPI_Init(&argc, &argv);
|
|
MPI_Finalize();
|
|
#endif
|
|
return 0;
|
|
}
|