diff options
| author | Steve M. Robbins <smr@sumost.ca> | 2001-08-07 14:48:10 +0000 |
|---|---|---|
| committer | Steve M. Robbins <smr@sumost.ca> | 2001-08-07 14:48:10 +0000 |
| commit | de0befb6d7ba3d1e6bbc67ca9c86d04412f2fb08 (patch) | |
| tree | 82b5db63068a03299e907eec4f05b1609639a17d | |
| parent | e0dd3c214df341b058c2d43f32c6521688853000 (diff) | |
| download | cppunit-de0befb6d7ba3d1e6bbc67ca9c86d04412f2fb08.tar.gz | |
Fixes to allow building with SGI MIPSpro 7.30 compiler.
The testsuite file examples/cppunittest/SubclassedTestCase.cpp
causes the compiler to dump core, so that and HelperMacrosTest
were not tested. The rest of the test suite passes.
| -rw-r--r-- | ChangeLog | 18 | ||||
| -rw-r--r-- | README | 18 | ||||
| -rw-r--r-- | configure.in | 10 | ||||
| -rw-r--r-- | doc/Makefile.am | 8 | ||||
| -rw-r--r-- | examples/cppunittest/OrthodoxTest.h | 6 | ||||
| -rw-r--r-- | include/cppunit/config-bcb5.h | 2 | ||||
| -rw-r--r-- | include/cppunit/config-msvc6.h | 2 | ||||
| -rw-r--r-- | src/cppunit/Exception.cpp | 4 | ||||
| -rw-r--r-- | src/cppunit/TestAssert.cpp | 6 | ||||
| -rw-r--r-- | src/cppunit/TestCase.cpp | 1 | ||||
| -rw-r--r-- | src/cppunit/TextTestResult.cpp | 2 |
11 files changed, 69 insertions, 8 deletions
@@ -1,5 +1,23 @@ 2001-08-07 Steve M. Robbins <steve@nyongwa.montreal.qc.ca> + * doc/Makefile.am: Add workaround for broken Doxygen. + + * src/cppunit/TextTestResult.cpp (operator<<): Remove CppUnit:: + prefix. + + * configure.in: Add check for <cmath>. + * src/cppunit/TestAssert.cpp: Use <math.h> if <cmath> not + available. + * src/cppunit/TestCase.cpp: Do not include <cmath>. + + * include/cppunit/config-bcb5.h (HAVE_CMATH): + * include/cppunit/config-msvc6.h (HAVE_CMATH): Add. + + * src/cppunit/Exception.cpp: Qualify std::exception. + + * examples/cppunittest/OrthodoxTest.h (TestCase): Add assignment + operator. MIPSpro fails to compile without one. + * Makefile.am: Removed automake conditional "DOC". * doc/Makefile.am: Placed "DOC" conditional around rules that invoke Doxygen. @@ -21,3 +21,21 @@ interface. Other compilers do not. If your compiler does not generate a pleasing class name, specify this option; the names will be generated by other means. + + + System Notes + ------------ + +* IRIX 6 / MIPSpro compiler 7.30 + +The MIPSpro compiler requires the "-LANG:std" flag to enable the +standard C++ library. You must set the CC variable when you configure, +as follows + ./configure CC='CC -LANG:std' + +There is a bug in libtool 1.4c (and presumably earlier?) that prevents +this flag from being properly passed during the linking stage. If you +get error messages about missing standard library functions (e.g. iostream), +then you need to edit the libtool script in the source directory, +find the *first* occurrance of "with_gcc=", and change it to read +"with_gcc=no". diff --git a/configure.in b/configure.in index d5986bd..07b0eac 100644 --- a/configure.in +++ b/configure.in @@ -48,7 +48,7 @@ dnl Checks for programs. AC_PROG_MAKE_SET AC_PROG_INSTALL -# The libtool macro AM_PROG_LIBTOOL checks for the C preprocessor. +# The libtool macro AC_PROG_LIBTOOL checks for the C preprocessor. # Configure gets confused if we try to check for a C preprocessor # without first checking for the C compiler # (see http://sources.redhat.com/ml/autoconf/2001-07/msg00036.html), @@ -57,7 +57,7 @@ AC_PROG_CC AC_PROG_CXX AC_LANG(C++) -AM_PROG_LIBTOOL +AC_PROG_LIBTOOL AC_ARG_ENABLE(debug-mode, [ --enable-debug-mode enable debugging mode], @@ -72,6 +72,12 @@ AC_ARG_ENABLE(debug-mode, # check for doxygen BB_ENABLE_DOXYGEN + +# Check for headers +# ---------------------------------------------------------------------------- + +AC_CHECK_HEADERS(cmath,[],[],[/**/]) + # Check for compiler characteristics # ---------------------------------------------------------------------------- diff --git a/doc/Makefile.am b/doc/Makefile.am index 4b42162..2384f65 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -12,11 +12,17 @@ html_DATA = html/* all-local: dox #pdf endif +man_extension_dir = man/man3/extensions dox: html/index.html -html/* html/index.html: Doxyfile other_documentation.dox +html/* html/index.html: Doxyfile other_documentation.dox $(man_extension_dir) @DOXYGEN@ +# Workaround for broken Doxygen. Version 1.2.9.1 doesn't create +# this directory, though it does create man/man3. +$(man_extension_dir): + mkdir -p $@ + pdf: @PACKAGE@.pdf @PACKAGE@.pdf: $(MAKE) -C ./latex pdf diff --git a/examples/cppunittest/OrthodoxTest.h b/examples/cppunittest/OrthodoxTest.h index d995e52..8c062b9 100644 --- a/examples/cppunittest/OrthodoxTest.h +++ b/examples/cppunittest/OrthodoxTest.h @@ -37,6 +37,12 @@ private: public: Value( int value =0 ) : m_value( value ) {} + Value& operator= ( const Value& v ) + { + m_value = v.m_value; + return *this; + } + bool operator ==( const Value &other ) const { return m_value == other.m_value; diff --git a/include/cppunit/config-bcb5.h b/include/cppunit/config-bcb5.h index ed92f55..7e62b02 100644 --- a/include/cppunit/config-bcb5.h +++ b/include/cppunit/config-bcb5.h @@ -1,5 +1,7 @@ #ifndef _INCLUDE_CPPUNIT_CONFIG_BCB5_H #define _INCLUDE_CPPUNIT_CONFIG_BCB5_H 1 + +#define HAVE_CMATH 1 /* include/cppunit/config-bcb5.h. Manually adapted from include/cppunit/config-auto.h */ diff --git a/include/cppunit/config-msvc6.h b/include/cppunit/config-msvc6.h index 386982b..df6b29c 100644 --- a/include/cppunit/config-msvc6.h +++ b/include/cppunit/config-msvc6.h @@ -1,5 +1,7 @@ #ifndef _INCLUDE_CPPUNIT_CONFIG_MSVC6_H #define _INCLUDE_CPPUNIT_CONFIG_MSVC6_H 1 + +#define HAVE_CMATH 1 /* include/cppunit/config-msvc6.h. Manually adapted from include/cppunit/config-auto.h */ diff --git a/src/cppunit/Exception.cpp b/src/cppunit/Exception.cpp index a1269ae..466e75a 100644 --- a/src/cppunit/Exception.cpp +++ b/src/cppunit/Exception.cpp @@ -10,7 +10,7 @@ const long Exception::UNKNOWNLINENUMBER = -1; /// Construct the exception -Exception::Exception (const Exception& other) : exception (other) +Exception::Exception (const Exception& other) : std::exception (other) { m_message = other.m_message; m_lineNumber = other.m_lineNumber; @@ -38,7 +38,7 @@ Exception::~Exception () throw() Exception& Exception::operator=( const Exception& other ) { - exception::operator= (other); + std::exception::operator= (other); if (&other != this) { diff --git a/src/cppunit/TestAssert.cpp b/src/cppunit/TestAssert.cpp index 9d8a408..72d48d9 100644 --- a/src/cppunit/TestAssert.cpp +++ b/src/cppunit/TestAssert.cpp @@ -1,4 +1,8 @@ -#include <cmath> +#if HAVE_CMATH +# include <cmath> +#else +# include <math.h> +#endif #include <cppunit/TestAssert.h> #include <cppunit/NotEqualException.h> diff --git a/src/cppunit/TestCase.cpp b/src/cppunit/TestCase.cpp index 9632e34..fc9269d 100644 --- a/src/cppunit/TestCase.cpp +++ b/src/cppunit/TestCase.cpp @@ -1,7 +1,6 @@ #include <cppunit/Portability.h> #include <typeinfo> #include <stdexcept> -#include <cmath> #include "cppunit/TestCase.h" #include "cppunit/Exception.h" diff --git a/src/cppunit/TextTestResult.cpp b/src/cppunit/TextTestResult.cpp index 0ef25e6..d04ce92 100644 --- a/src/cppunit/TextTestResult.cpp +++ b/src/cppunit/TextTestResult.cpp @@ -7,7 +7,7 @@ namespace CppUnit { std::ostream& -CppUnit::operator<< (std::ostream& stream, TextTestResult& result) +operator<< (std::ostream& stream, TextTestResult& result) { result.print (stream); return stream; } |
