Restored the comment
authorMark Abraham <mark.j.abraham@gmail.com>
Thu, 25 Jun 2020 16:29:01 +0000 (16:29 +0000)
committerPaul Bauer <paul.bauer.q@gmail.com>
Thu, 25 Jun 2020 16:29:01 +0000 (16:29 +0000)
We can keep the comment in its most useful form while avoiding the warning.

src/gromacs/hardware/gpu_hw_info.h

index 2ff65173dc9f726a70e4ab89f67644b8cc25c1e3..a48da259fbd2fbef75f30130b5ac973cb1212a52 100644 (file)
@@ -65,10 +65,18 @@ enum class DeviceStatus : int
 };
 
 /*! \brief Names of the GPU detection/check results
+ *
+ * Check-source wants to warn about the use of a symbol name that would
+ * require an inclusion of config.h. However the use is in a comment, so that
+ * is a false warning. So C-style string concatenation is used to fool the
+ * naive parser in check-source. In turn, that needs a clang-format suppression
+ * in order to look reasonable.
  */
 static const gmx::EnumerationArray<DeviceStatus, const char*> c_deviceStateString = {
-    "compatible",     "nonexistent",
-    "incompatible",   "incompatible (please recompile with correct NB_CLUSTER_SIZE of 4)",
+    "compatible", "nonexistent", "incompatible",
+    // clang-format off
+    "incompatible (please recompile with correct GMX" "_OPENCL_NB_CLUSTER_SIZE of 4)",
+    // clang-format on
     "non-functional", "unavailable"
 };