Mesos: Introduce configurable `UNIMPLEMENTED` macro.

use --enable-static-unimplemented to get compile time errors as opposed
to runtime errors.

Review: https://reviews.apache.org/r/36842


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/a4a23aa4
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/a4a23aa4
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/a4a23aa4

Branch: refs/heads/master
Commit: a4a23aa4c77da45e32a3acee1cd4e762d30da0a3
Parents: da85f5d
Author: Joris Van Remoortere <[email protected]>
Authored: Fri Jul 31 15:14:54 2015 -0700
Committer: Michael Park <[email protected]>
Committed: Fri Jul 31 15:42:06 2015 -0700

----------------------------------------------------------------------
 configure.ac | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/a4a23aa4/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 546c9bb..9438d88 100644
--- a/configure.ac
+++ b/configure.ac
@@ -256,6 +256,12 @@ AC_ARG_ENABLE([ssl],
                              default: no]),
               [enable_ssl=yes], [])
 
+AC_ARG_ENABLE([static-unimplemented],
+              AS_HELP_STRING([--enable-static-unimplemented],
+                             [generate static assertion errors for 
unimplemented
+                             functions default: no]),
+              [enable_static_unimplemented=yes], [])
+
 AC_ARG_WITH([libevent],
             AS_HELP_STRING([--with-libevent=@<:@=DIR@:>@],
                            [specify where to locate the libevent library]),
@@ -1552,6 +1558,10 @@ fi
 
 AM_CONDITIONAL([ENABLE_SSL], [test x"$enable_ssl" = "xyes"])
 
+if test "x$enable_static_unimplemented" = "xyes"; then
+  AC_DEFINE([ENABLE_STATIC_UNIMPLEMENTED], [1])
+fi
+
 
 # Provide more granular version numbers based on the version string,
 # using the format MAJOR.MINOR.PATCH[-SUFFIX], where SUFFIX can itself

Reply via email to