[Cppunit-devel] Ant build script for cppunit 1.9.14
Brought to you by:
blep
From: Curt A. <ca...@ho...> - 2004-04-19 05:32:27
|
I've just committed a Ant build script for cppunit to the ant-contrib project. I'm intended to do this for a while to use cppunit as a sanity check for the cpp compilation tasks for Ant. To use this script: If necessary, install Ant 1.5 or later. Can be downloaded from http://ant.apache.org and is included in many Linux distributions. Download cpptasks 1.0 b2 from http://sourceforge.net/project/showfiles.php?group_id=36177 Copy cpptasks.jar to the lib directory of Ant or place cpptasks.jar in the classpath. Download cppunit.ant from the ant-contrib CVS (http://cvs.sourceforge.net/viewcvs.py/ant-contrib/cpptasks/samples). Since it hasn't been reflected in the CVS mirror yet, it is also available at http://home.houston.rr.com/curta/ cppunit.ant. The simplest way to use it is to rename it to build.xml and place it in the cppunit-1.9.14 directory of the cppunit 1.9.14 development or CVS snapshot. If that is done, then cd cppunit-1.9.14 ant test-all will create a build subdirectory and build shared and static libraries, Qt runner (use test-all-but-qt to skip Qt build) build and run cppunittestmain, simple, money and hierarchy. If not used placed within the cppunit-1.9.14 directory, then -Dbase.dir=path can be used to specify the path to the cppunit-1.9.14 directory. By default, gcc will be used. Other compilers can be specified by using -Dcompiler=[gcc | g++ | msvc | icc | bcc | icl ....]. gcc appeared to work on Linux and Mac OS, icc on Linux, and msvc on Windows XP. gcc on Cygwin and bcc locked up. I tried to reproduce the Qt build, but am not sure how you run it. I'm currently producing libqttestrunner.so which I think it what the build file is doing, but I'm not sure how to run it. I'm attempting to build the VC6 plug in, but have not tested it. The current build file runs on the last released version of cpptasks. I anticipate that future iterations will require changes to cpptasks to the following enhancements: An rtti attribute to enable or disable run-time type information (currently done with a compiler specific compilerarg) Compiler adapters for Qt's uic and moc tools A major, minor, level and patch attribute to provide shared libraries names. An optimization attribute The cppunit task expects a WIN32 macro to be defined, _WIN32 is defined by the compiler automatically and it would be helpful if uses of WIN32 would be switched to _WIN32 so that the script doesn't have to guess what API is the target. |