Check for GTEST_IS_THREADSAFE being defined
authorAleksei Iupinov <a.yupinov@gmail.com>
Tue, 30 Jan 2018 13:26:15 +0000 (14:26 +0100)
committerAleksei Iupinov <a.yupinov@gmail.com>
Thu, 1 Feb 2018 17:28:57 +0000 (18:28 +0100)
Change I0d847bc24 updated GTest library to version 1.8.0,
which added GTEST_IS_THREADSAFE to the list of macros that
can only be defined to 1, or undefined. This change corrects
the check of the macro.

Change-Id: I6e2f9bb30a9128bc85a1b5f38c73d21b65dd61f7

src/testutils/mpitest.cpp

index 959b9c52a7b10bbb753366d3c0d0c66cb1c62594..4428b6508363df5f79d4dbeaa15b4b326e3b65a1 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2016, by the GROMACS development team, led by
+ * Copyright (c) 2016,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -116,7 +116,7 @@ bool threadMpiTestRunner(std::function<void()> testBody)
     {
         return true;
     }
-#if GMX_THREAD_MPI && !GTEST_IS_THREADSAFE
+#if GMX_THREAD_MPI && !defined(GTEST_IS_THREADSAFE)
     ADD_FAILURE()
     << "Google Test is not thread safe on this platform. "
     << "Cannot run multi-rank tests with thread-MPI.";