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
- don't use c++17

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>
Co-authored-by: Thomas Grützmacher <thogru.kit@gmx.de>
  • Loading branch information
5 people committed Oct 31, 2023
1 parent 2745299 commit f135d1e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 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
10 changes: 5 additions & 5 deletions cmake/openmpi_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
int main()
{
#if CHECK_HAS_OPEN_MPI && defined(OPEN_MPI) && OPEN_MPI
static_assert(true);
#elif CHECK_OPEN_MPI_VERSION
static_assert(true, "Check availability of OpenMPI");
#elif CHECK_OPEN_MPI_VERSION && defined(OPEN_MPI) && OPEN_MPI
static_assert(OMPI_MAJOR_VERSION > 4 ||
(OMPI_MAJOR_VERSION == 4 && OMPI_MINOR_VERSION >= 1));
(OMPI_MAJOR_VERSION == 4 && OMPI_MINOR_VERSION >= 1),
"Check OpenMPI version.");
#else
static_assert(false);
static_assert(false, "No OpenMPI available");
#endif
return 1;
}

0 comments on commit f135d1e

Please sign in to comment.