7.6. Compiling the BCVTB

To compile the BCVTB and to run unit tests, the Apache Ant build tool is used.

To compile the BCVTB, change to the BCVTB root directory and proceed as follows:

  1. On Windows, double-click the file bcvtb/bin/setDevelopmentEnvironment.bat, or Linux and Mac, type source bin/setDevelopmentEnvironment.sh. This will detect your system configuration, set some environment variables, write the file bcvtb/build.properties and open a console.
  2. To see a list with available targets, type

    ant -p

  3. To delete old binary files and recompile the BCVTB, run
    ant clean all

    Note that this command can be run from any directory in bcvtb/lib or in bcvtb/examples. This allows a recursive compilation of an individual directory and any of its subdirectories.

  4. To run unit tests, run
    ant unitTest

If there are problems, more output can be obtained by typing

ant diagnostics

and by adding the flag -v to any ant command.

Ant reads two configuration files: build.properties which is generated by bcvtb/bin/setDevelopmentEnvironment.bat (on Windows) and bcvtb/bin/setDevelopmentEnvironment.sh (on Mac OS X and Linux), and user.properties which is not changed by any program. Any settings in user.properties will overwrite the settings in build.properties.

For example, when executing bcvtb/bin/setDevelopmentEnvironment.bat, the following line may be added to build.properties if MATLAB is installed:

haveMatlab=true

To overwrite this setting, specify in user.properties a line of the form

haveMatlab=false

This will tell the Ant build system that MATLAB is not installed on this computer.