An ANSI C99 Preprocessor Macros Header Library for CppUMock
- Build CppUMock with Memory Leak Detection disabled.
- Clone CppUTest:
git clone git@github.com:cpputest/cpputest.git
- Enter Build Directory:
cd cpputest/build
- Generate
configure
:autoreconf .. -i
- Configure:
../configure --disable-memory-leak-detection
- Build:
make
- Libraries:
ls cpputest/build/lib
libCppUTest.a
libCppUTestExt.a
- Clone CppUTest:
- Include
moxie.h
. - Link
CppUTestExt
with-lm
(Math) and-lstdc++
(C++ Standard Library). - Annotate mockable functions with
#define M_EXPORT_MOCK __attribute__((weak))
. - (Linux) Compile the Test executable with
ld --wrap
s. - (macOS) Compile the Test executable with DYLD Interposing.