Revision: 76040
http://sourceforge.net/p/brlcad/code/76040
Author: starseeker
Date: 2020-06-06 15:13:18 +0000 (Sat, 06 Jun 2020)
Log Message:
-----------
Be a bit noisy if someone includes brlcad_version.h without BRLCADBUILD or
HAVE_CONFIG_H. Not intended to be a fatal error - brlcad_version.h stills
function without the defines, if I'm reading the header correctly - but will
reinforce separation between compile-time and non-compile-time APIs.
Modified Paths:
--------------
brlcad/trunk/include/brlcad_version.h.in
Modified: brlcad/trunk/include/brlcad_version.h.in
===================================================================
--- brlcad/trunk/include/brlcad_version.h.in 2020-06-06 14:25:41 UTC (rev
76039)
+++ brlcad/trunk/include/brlcad_version.h.in 2020-06-06 15:13:18 UTC (rev
76040)
@@ -36,6 +36,15 @@
#include "common.h"
+/* If the caller is not using this correctly per the above NOTE, issue a
+ * message about it but don't hault the build. Usage without defines set isn't
+ * correct, but will probably function anyway... */
+#if !defined(BRLCADBUILD)
+# pragma message "Warning: included brlcad_version.h (compile-time API)
without BRLCADBUILD defined"
+#endif
+#if !defined(HAVE_CONFIG_H)
+# pragma message "Warning: included brlcad_version.h (compile-time API)
without HAVE_CONFIG_H defined"
+#endif
/**************************************************/
/* Compile-time version information (discouraged) */
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits