changeset 16899:55caca526827

New function to error due to disabled feature during build. * gripes.cc: add new function gripe_disabled_feature() to give an error due to a feature that disabled when building Octave or an Octave package, either optionally or due to a missing library. * gripes.h: define gripe_disabled_feature() as external function.
author Carnë Draug <carandraug@octave.org>
date Thu, 04 Jul 2013 20:10:25 +0100
parents 531473481084
children 434a0b29ab12
files libinterp/corefcn/gripes.cc libinterp/corefcn/gripes.h
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/gripes.cc	Thu Jul 04 20:33:02 2013 -0400
+++ b/libinterp/corefcn/gripes.cc	Thu Jul 04 20:10:25 2013 +0100
@@ -236,3 +236,11 @@
   warning_with_id ("Octave:matlab-incompatible",
                    "potential Matlab compatibility problem: comparing complex numbers");
 }
+
+void
+gripe_disabled_feature (const std::string& func, const std::string& feature,
+                        const std::string& pkg /*="Octave"*/)
+{
+  error ("%s: support for %s was disabled when %s was built",
+         func.c_str (), feature.c_str (), pkg.c_str ());
+}
--- a/libinterp/corefcn/gripes.h	Thu Jul 04 20:33:02 2013 -0400
+++ b/libinterp/corefcn/gripes.h	Thu Jul 04 20:10:25 2013 +0100
@@ -127,4 +127,7 @@
 extern OCTINTERP_API void
 gripe_warn_complex_cmp (void);
 
+extern OCTINTERP_API void
+gripe_disabled_feature (const std::string& func, const std::string& feature,
+                        const std::string& pkg="Octave");
 #endif