1.2. Compilation and Installation

1.2.1. Installing on systems using autoconf and friends

In order to compile and install mockpp on your system, type the following in the base directory of the mockpp distribution:

 % ./configure
 % make
 % make install

There are some options for configure you might be interested in:
--enable-unicode

By default mockpp uses standard 8bit wide strings (std::string and const char* to be more precise). If you need basic support for Unicode and it's 16bit or 32bit wide characters you must add this parameter when invoking configure.

--enable-doxygen

This option generates and installs the api documentation. doxygen must be installed in this case.

--enable-docbook

If you what to generate and install the handbook, you must provide this parameter. docbook must be installed in this case.

--disable-RTTI

Some environments don't use runtime type information to reduce the size of the footprint of the binaries. In this case the according debugging information is omitted.

--disable-exceptions

Some environments don't use exceptions for similar reasons. All features based on try and catch statements don't work in this case and you must provide your own way to collect the test results.

--enable-builtin-stl

By default mockpp is compiled with the C++ Standard Template Libray that comes with your compiler. Unfortunately the current implementations consume rather much resources. For that reason a built-in minimalistic STL can be used.

--disable-builtin-cxxtest

By default mockpp uses a built-in version of CxxTest as test framework. If you want to use another framework you should disable it to remove all internal dependencies. Please understand that in this case the unit tests won't run if you don't enable another supported framework instead.

--disable-namespace

Older compilers may not support namespaces properly. If you need such a compiler for a given environment you might try to disable namespaces for all built-in parts and maybe get enough of the files compile to build a basic test library. A lot of the files probably won't compile on such compilers due to the lack of template support.

In this case mockpp resides in the global namespace. Additionally the built-in components ministl and CxxTest are in the global namespace as well. This may lead to problems when using other libraries which contain classes like Exception or String. There are also workarounds for certain elements in the std namespace.

--enable-cppunit

This option enables CppUnit as test framework.

--enable-boosttest

This option enables Boost.Test as test framework.

--boost-dir

Normaly configure searches /usr/include and /usr/local/include. In case there are multiple versions the first directory is taken. If you have a non-standard include directory or need as special version you will want to use this option.

Since mockpp uses autoconf and automake you should have no trouble compiling it. Should you run into problems please report them to the Bug Tracker.

Once you have compiled the sources you should run the built-in checks to verify the correct behaviour on your platform:

 % make check