Jesper Evertsson
Jesper Evertsson

Reputation: 613

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.

Upvotes: 1

Views: 3936

Answers (2)

aunsbjerg
aunsbjerg

Reputation: 21

I made a mini guide for internal use at my company, have been working fine for us so far. It goes something like this:

Install cygwin, default and development packages.

Download and extract Cpputest to c:\cpputest-x.x

Configure and install cpputest: Start cygwin and input the following shell commands

cd c:\cpputest-x.x
./configure
make
make check

Install helper scripts (optional step)

cd scripts
./InstallScripts.sh

Add CPPUTEST_HOME as an environment variable: in c:\cygwin64\home\your_user_name.bash_profile add

< export CPPUTEST_HOME=/cygdrive/c/cpputest-x.x >

You should now be good to go. If not, write to the CppUTest google group, theres always friendly people willing to help.

Upvotes: 2

ollo
ollo

Reputation: 25370

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

Upvotes: 1

Related Questions