Skip to content

Commit

Permalink
review updates:
Browse files Browse the repository at this point in the history
- unused variable
- correct return code

Co-authored-by: Yu-Hsiang M. Tsai <yhmtsai@gmail.com>
  • Loading branch information
MarcelKoch and yhmtsai committed Oct 31, 2023
1 parent 2745299 commit c1c4944
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ if(GINKGO_BUILD_MPI)
${Ginkgo_SOURCE_DIR}/cmake/openmpi_test.cpp
COMPILE_DEFINITIONS -DCHECK_HAS_OPEN_MPI=1
LINK_LIBRARIES MPI::MPI_CXX
OUTPUT_VARIABLE output
)
if(uses_openmpi)
try_compile(valid_openmpi_version
Expand Down
4 changes: 2 additions & 2 deletions cmake/openmpi_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ int main()
{
#if CHECK_HAS_OPEN_MPI && defined(OPEN_MPI) && OPEN_MPI
static_assert(true);
#elif CHECK_OPEN_MPI_VERSION
#elif CHECK_OPEN_MPI_VERSION && defined(OPEN_MPI) && OPEN_MPI
static_assert(OMPI_MAJOR_VERSION > 4 ||
(OMPI_MAJOR_VERSION == 4 && OMPI_MINOR_VERSION >= 1));
#else
static_assert(false);
#endif
return 1;
return 0;
}

0 comments on commit c1c4944

Please sign in to comment.