Skip to content

Commit

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

Co-authored-by: Yu-Hsiang M. Tsai <yhmtsai@gmail.com>
Co-authored-by: Pratik Nayak <pratik.nayak@kit.edu>
Co-authored-by: Tobias Ribizel <ribizel@kit.edu>
  • Loading branch information
4 people committed Oct 31, 2023
1 parent 2745299 commit d4132b6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition 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
3 changes: 1 addition & 2 deletions cmake/openmpi_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,10 @@ 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;
}

0 comments on commit d4132b6

Please sign in to comment.