added gmx_is_{single,double}_precision
authorChristoph Junghans <junghans@votca.org>
Tue, 18 Feb 2014 17:32:47 +0000 (10:32 -0700)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Thu, 20 Feb 2014 17:58:50 +0000 (18:58 +0100)
* allows easy detection of the precision for cmake, autotools
  without parsing the output of gmx_print_version_info (no
  cross-compile support) or the output of strings command (unix
  only)
* linking against libgmx with/out -DGMX_DOUBLE will lead to
  unpredictable segfaults

Change-Id: I472f10ae374a1f42c94c55e156b53f8905bdf098

src/gmxlib/copyrite.c

index f7ede977cbd95ffdcf22f04b970c0833014e6470..077e755212d242c06ddddb3f87fc41ed4a50e645 100644 (file)
@@ -771,3 +771,15 @@ void gmx_print_version_info(FILE *fp)
     gmx_print_version_info_gpu(fp);
 #endif
 }
+
+#ifdef GMX_DOUBLE
+void gmx_is_double_precision()
+{
+    /* allow precision detection */
+}
+#else
+void gmx_is_single_precision()
+{
+    /* allow precision detection */
+}
+#endif