Libprocess: Introduced configurable `UNIMPLEMENTED` macro. use --enable-static-unimplemented to get compile time errors as opposed to runtime errors.
Review: https://reviews.apache.org/r/36830 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/da85f5d8 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/da85f5d8 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/da85f5d8 Branch: refs/heads/master Commit: da85f5d8eee168c84cad1bbb70288f0897bd5b91 Parents: 4fa8e61 Author: Joris Van Remoortere <[email protected]> Authored: Fri Jul 31 15:13:44 2015 -0700 Committer: Michael Park <[email protected]> Committed: Fri Jul 31 15:42:06 2015 -0700 ---------------------------------------------------------------------- 3rdparty/libprocess/configure.ac | 10 ++++++++++ 1 file changed, 10 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/da85f5d8/3rdparty/libprocess/configure.ac ---------------------------------------------------------------------- diff --git a/3rdparty/libprocess/configure.ac b/3rdparty/libprocess/configure.ac index 7d1221b..40f344c 100644 --- a/3rdparty/libprocess/configure.ac +++ b/3rdparty/libprocess/configure.ac @@ -94,6 +94,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([boost], AS_HELP_STRING([--with-boost@<:@=DIR@:>@], [excludes building and using the bundled Boost @@ -711,6 +717,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 + AS_IF([test "x${ac_cv_env_CFLAGS_set}" = "x"], [CFLAGS="$debug_flags $optimize_flags"])
