cygwincpputest

How to compile CppUTest in cygwin?


I've taken over a programming project from another programmer. This project uses a lot of unit tests to verify the code which I intend to continue using. I have no prior experience with unit testing (apart from some theoretical knowledge) so he wrote a very small guide for how to get it working before he left the company. That guide looks like this.

  1. Install cygwin with support for gcc/g++
  2. Download CppUTest
  3. Compile CppUTest in cygwin

I think I've completed the two first steps, but I have no idea how to compile CppUTest in cygwin (I 've never used cygwin before). I tried some quick googling on the Title of this question but I couldn't find something useful.


Solution

  • You can use either CMake or autoconf.

    CMake

    Open a cygwin terminal and:

    cd cpputest_build
    cmake ..
    make
    

    (Or use the CMake GUI)

    Btw. you can enable CppuTest C++11 by using this call: cmake -DC++11=ON ... Cmake will print this line then:

    Using C++11 library:                ON
    

    autoconf

    With a cygwin terminal:

    cd cpputest_build
    autoreconf .. -i
    ../configure
    make