From: Curt A. <ca...@us...> - 2004-08-24 23:46:18
|
Update of /cvsroot/ant-contrib/cpptasks/samples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29457/samples Modified Files: cppunit.ant Log Message: Bug 980130: IDE project generation CBuilderX improvements Index: cppunit.ant =================================================================== RCS file: /cvsroot/ant-contrib/cpptasks/samples/cppunit.ant,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** cppunit.ant 13 Jul 2004 04:30:31 -0000 1.9 --- cppunit.ant 24 Aug 2004 23:46:09 -0000 1.10 *************** *** 51,60 **** </target> ! <!-- sample versioninfo, targetplatform and distributer to check if definitions are processed, not functional at this time ! --> ! <versioninfo id="cppunit-version" ! fileversion="1.9.14" productversion="1.9.14" compatibilityversion="1" --- 51,60 ---- </target> ! <!-- sample versioninfo, targetplatform and distributer to check if definitions are processed, not functional at this time ! --> ! <versioninfo id="cppunit-version" ! fileversion="1.9.14" productversion="1.9.14" compatibilityversion="1" *************** *** 63,67 **** companyname="Cppunit project <http://cppunit.sourceforge.net>" /> ! <targetplatform id="winbox" arch="pentium4" osfamily="windows"/> --- 63,67 ---- companyname="Cppunit project <http://cppunit.sourceforge.net>" /> ! <targetplatform id="winbox" arch="pentium4" osfamily="windows"/> *************** *** 71,77 **** <target name="check-config" depends="init"> ! <available property="configure-available" file="${base.dir}/configure"/> ! <available property="config-auto-available" file="${include.dir}/cppunit/config-auto.h"/> <condition property="do-autogen"> --- 71,77 ---- <target name="check-config" depends="init"> ! <available property="configure-available" file="${base.dir}/configure"/> ! <available property="config-auto-available" file="${include.dir}/cppunit/config-auto.h"/> <condition property="do-autogen"> *************** *** 96,101 **** </target> ! <target name="run-autogen" ! depends="check-config" if="do-autogen"> <exec dir="${base.dir}" executable="bash"> --- 96,101 ---- </target> ! <target name="run-autogen" ! depends="check-config" if="do-autogen"> <exec dir="${base.dir}" executable="bash"> *************** *** 105,110 **** ! <target name="run-configure" ! depends="run-autogen" if="do-configure"> <exec dir="${base.dir}" executable="bash"> --- 105,110 ---- ! <target name="run-configure" ! depends="run-autogen" if="do-configure"> <exec dir="${base.dir}" executable="bash"> *************** *** 151,158 **** <mkdir dir="${obj.dir}/cppunit_shared"/> <mkdir dir="${build.dir}/lib"/> ! <cc subsystem="console" objdir="${obj.dir}/cppunit_shared" ! debug="${debug}" ! outtype="shared" name="${compiler}" exceptions="true" --- 151,158 ---- <mkdir dir="${obj.dir}/cppunit_shared"/> <mkdir dir="${build.dir}/lib"/> ! <cc subsystem="console" objdir="${obj.dir}/cppunit_shared" ! debug="${debug}" ! outtype="shared" name="${compiler}" exceptions="true" *************** *** 164,168 **** <fileset dir="${src.dir}/cppunit" includes="*.cpp" excludes="DllMain.cpp"/> ! <fileset dir="${src.dir}/cppunit" includes="DllMain.cpp" if="is-windows"/> --- 164,168 ---- <fileset dir="${src.dir}/cppunit" includes="*.cpp" excludes="DllMain.cpp"/> ! <fileset dir="${src.dir}/cppunit" includes="DllMain.cpp" if="is-windows"/> *************** *** 173,178 **** <defineset define="WIN32" if="is-win32"/> <versioninfo extends="cppunit-version" filedescription="Cppunit shared library"/> ! <!-- writes cppunit.cbx --> ! <project outfile="${base.dir}/cppunit" type="cbuilderx" name="cppunit"/> <!-- writes cppunit.dsp --> <project outfile="${base.dir}/cppunit" type="msvc5" name="cppunit"/> --- 173,178 ---- <defineset define="WIN32" if="is-win32"/> <versioninfo extends="cppunit-version" filedescription="Cppunit shared library"/> ! <!-- writes shared-lib.cbx --> ! <project outfile="${base.dir}/shared-lib" type="cbuilderx" name="shared-lib"/> <!-- writes cppunit.dsp --> <project outfile="${base.dir}/cppunit" type="msvc5" name="cppunit"/> *************** *** 186,193 **** <target name="static-lib" depends="run-configure"> <mkdir dir="${obj.dir}/cppunit_static"/> ! <cc subsystem="console" outfile="${build.dir}/cppunit" ! objdir="${obj.dir}/cppunit_static" ! outtype="static" debug="${debug}" exceptions="true" --- 186,193 ---- <target name="static-lib" depends="run-configure"> <mkdir dir="${obj.dir}/cppunit_static"/> ! <cc subsystem="console" outfile="${build.dir}/cppunit" ! objdir="${obj.dir}/cppunit_static" ! outtype="static" debug="${debug}" exceptions="true" *************** *** 203,207 **** <libset libs="stdc++" if="is-gcc"/> <versioninfo extends="cppunit-version" filedescription="Cppunit static library"/> ! <!-- writes cppunit.dsp --> <project outfile="${base.dir}/cppunit_static" type="msvc5" name="cppunit"/> </cc> --- 203,208 ---- <libset libs="stdc++" if="is-gcc"/> <versioninfo extends="cppunit-version" filedescription="Cppunit static library"/> ! <!-- writes static-lib.cbx --> ! <project outfile="${base.dir}/static-lib" type="cbuilderx" name="static-lib"/> <project outfile="${base.dir}/cppunit_static" type="msvc5" name="cppunit"/> </cc> *************** *** 210,217 **** <target name="compile-static-test" depends="static-lib"> <mkdir dir="${obj.dir}/cppunittestmain_static"/> ! <cc outfile="${build.dir}/cppunittestmain" ! outtype="executable" ! subsystem="console" ! objdir="${obj.dir}/cppunittestmain_static" debug="${debug}" exceptions="true" --- 211,218 ---- <target name="compile-static-test" depends="static-lib"> <mkdir dir="${obj.dir}/cppunittestmain_static"/> ! <cc outfile="${build.dir}/cppunittestmain_static" ! outtype="executable" ! subsystem="console" ! objdir="${obj.dir}/cppunittestmain_static" debug="${debug}" exceptions="true" *************** *** 219,223 **** optimize="speed" name="${compiler}" ! outputfileproperty="test.exe"> <compiler name="brc" if="use-brc"/> <compiler name="msrc"/> --- 220,224 ---- optimize="speed" name="${compiler}" ! outputfileproperty="test-static.exe"> <compiler name="brc" if="use-brc"/> <compiler name="msrc"/> *************** *** 229,232 **** --- 230,234 ---- <libset libs="stdc++" if="is-gcc"/> <versioninfo extends="cppunit-version" filedescription="Self tests using static library"/> + <project outfile="${base.dir}/static-test" type="cbuilderx" name="static-test"/> <project outfile="${base.dir}/static_test" type="msvc5" name="cppunittestmain"/> </cc> *************** *** 234,242 **** <target name="compile-shared-test" depends="shared-lib"> ! <mkdir dir="${obj.dir}/cppunittestmain_shared"/> ! <cc outfile="${build.dir}/lib/cppunittestmain" ! outtype="executable" ! subsystem="console" ! objdir="${obj.dir}/cppunittestmain_shared" debug="${debug}" name="${compiler}" --- 236,244 ---- <target name="compile-shared-test" depends="shared-lib"> ! <mkdir dir="${obj.dir}/cppunittestmain_shared_shared"/> ! <cc outfile="${build.dir}/lib/cppunittestmain_shared" ! outtype="executable" ! subsystem="console" ! objdir="${obj.dir}/cppunittestmain_shared" debug="${debug}" name="${compiler}" *************** *** 255,278 **** <libset libs="stdc++" if="is-gcc"/> <versioninfo extends="cppunit-version" filedescription="Self tests using shared library"/> </cc> </target> <target name="test-static" depends="compile-static-test"> ! <!-- return value (or Ant's treatment of it) is inconsistent on Linux --> ! <exec dir="${build.dir}" ! executable="${build.dir}/cppunittestmain" ! failonerror="true"/> </target> <target name="test-shared" depends="compile-shared-test"> ! <!-- return value (or Ant's treatment of it) is inconsistent on Linux --> <exec dir="${build.dir}" ! executable="${build.dir}/lib/cppunittestmain" failonerror="true"> <env key="LD_LIBRARY_PATH" value="${build.dir}/lib:${env.LD_LIBRARY_PATH}"/> ! </exec> </target> --- 257,316 ---- <libset libs="stdc++" if="is-gcc"/> <versioninfo extends="cppunit-version" filedescription="Self tests using shared library"/> + <project outfile="${base.dir}/shared-test" type="cbuilderx" name="shared-test"/> </cc> </target> + <!-- + compile CPPUnit implementation and unit tests into a single executable + --> + <target name="compile-mono-test" depends="run-configure"> + <mkdir dir="${obj.dir}/cppunittestmain_mono"/> + <cc outfile="${build.dir}/lib/cppunittestmain" + outtype="executable" + subsystem="console" + objdir="${obj.dir}/cppunittestmain_mono" + debug="${debug}" + name="${compiler}" + exceptions="true" + rtti="true" + optimize="speed" + outputfileproperty="test.exe"> + <compiler name="brc" if="use-brc"/> + <compiler name="msrc"/> + <fileset dir="${src.dir}/cppunit" + includes="*.cpp" excludes="DllMain.cpp"/> + <libset libs="dl" unless="is-win32"/> + <fileset dir="${examples.dir}/cppunittest" + includes="*.cpp" excludes="CppUnitTestPlugIn.cpp"/> + <includepath path="${include.dir}"/> + <defineset define="WIN32" if="is-win32"/> + <libset libs="stdc++" if="is-gcc"/> + <versioninfo extends="cppunit-version" filedescription="Combined unit tests and implementation"/> + <project outfile="${base.dir}/mono-test" type="cbuilderx" name="cppunittestmain_mono"/> + </cc> + </target> <target name="test-static" depends="compile-static-test"> ! <!-- return value (or Ant's treatment of it) is inconsistent on Linux --> ! <exec dir="${build.dir}" ! executable="${test-static.exe}" ! failonerror="true"/> </target> <target name="test-shared" depends="compile-shared-test"> ! <!-- return value (or Ant's treatment of it) is inconsistent on Linux --> <exec dir="${build.dir}" ! executable="${build.dir}/lib/cppunittestmain_shared" failonerror="true"> <env key="LD_LIBRARY_PATH" value="${build.dir}/lib:${env.LD_LIBRARY_PATH}"/> ! </exec> ! </target> ! ! <target name="test-mono" depends="compile-mono-test"> ! <exec dir="${build.dir}" ! executable="${build.dir}/cppunittestmain" ! failonerror="true"/> </target> *************** *** 280,287 **** <mkdir dir="${obj.dir}/qttestrunner"/> <mkdir dir="${build.dir}/qttestrunner"/> ! <cc outfile="${build.dir}/qttestrunner" ! outtype="shared" ! subsystem="console" ! objdir="${obj.dir}/qttestrunner" exceptions="true" name="${compiler}" --- 318,325 ---- <mkdir dir="${obj.dir}/qttestrunner"/> <mkdir dir="${build.dir}/qttestrunner"/> ! <cc outfile="${build.dir}/qttestrunner" ! outtype="shared" ! subsystem="console" ! objdir="${obj.dir}/qttestrunner" exceptions="true" name="${compiler}" *************** *** 305,317 **** <versioninfo extends="cppunit-version" filedescription="Qt test runner"/> </cc> ! </target> <target name="plugintester" depends="static-lib"> <mkdir dir="${obj.dir}/DllPlugInTester"/> ! <cc outfile="${build.dir}/DllPlugInTester" ! outtype="executable" ! subsystem="console" ! objdir="${obj.dir}/DllPlugInTester" exceptions="true" rtti="true" --- 343,355 ---- <versioninfo extends="cppunit-version" filedescription="Qt test runner"/> </cc> ! </target> <target name="plugintester" depends="static-lib"> <mkdir dir="${obj.dir}/DllPlugInTester"/> ! <cc outfile="${build.dir}/DllPlugInTester" ! outtype="executable" ! subsystem="console" ! objdir="${obj.dir}/DllPlugInTester" exceptions="true" rtti="true" *************** *** 321,325 **** <compiler name="brc" if="use-brc"/> <compiler name="msrc"/> ! <fileset dir="${src.dir}/DllPlugInTester" includes="*.cpp" excludes="DllPlugInTesterTest.cpp"/> --- 359,363 ---- <compiler name="brc" if="use-brc"/> <compiler name="msrc"/> ! <fileset dir="${src.dir}/DllPlugInTester" includes="*.cpp" excludes="DllPlugInTesterTest.cpp"/> *************** *** 336,343 **** <target name="plugintestertest" depends="plugintester"> <mkdir dir="${obj.dir}/DllPlugInTester"/> ! <cc outfile="${build.dir}/DllPlugInTesterTest" ! outtype="executable" ! subsystem="console" ! objdir="${obj.dir}/DllPlugInTester" name="${compiler}" exceptions="true" --- 374,381 ---- <target name="plugintestertest" depends="plugintester"> <mkdir dir="${obj.dir}/DllPlugInTester"/> ! <cc outfile="${build.dir}/DllPlugInTesterTest" ! outtype="executable" ! subsystem="console" ! objdir="${obj.dir}/DllPlugInTester" name="${compiler}" exceptions="true" *************** *** 345,349 **** rtti="true" debug="${debug}"> ! <fileset dir="${src.dir}/DllPlugInTester" includes="*.cpp" excludes="DllPlugInTester.cpp"/> --- 383,387 ---- rtti="true" debug="${debug}"> ! <fileset dir="${src.dir}/DllPlugInTester" includes="*.cpp" excludes="DllPlugInTester.cpp"/> *************** *** 364,373 **** <target name="money" depends="static-lib"> ! <mkdir dir="${obj.dir}/money"/> ! <cc outfile="${build.dir}/MoneyApp" ! outtype="executable" ! subsystem="console" name="${compiler}" ! objdir="${obj.dir}/money" exceptions="true" rtti="true" --- 402,411 ---- <target name="money" depends="static-lib"> ! <mkdir dir="${obj.dir}/money"/> ! <cc outfile="${build.dir}/MoneyApp" ! outtype="executable" ! subsystem="console" name="${compiler}" ! objdir="${obj.dir}/money" exceptions="true" rtti="true" *************** *** 376,380 **** <compiler name="brc" if="use-brc"/> <compiler name="msrc"/> ! <fileset dir="${examples.dir}/money" includes="*.cpp"/> <includepath path="${include.dir}"/> --- 414,418 ---- <compiler name="brc" if="use-brc"/> <compiler name="msrc"/> ! <fileset dir="${examples.dir}/money" includes="*.cpp"/> <includepath path="${include.dir}"/> *************** *** 388,402 **** <target name="test-money" depends="money"> ! <exec executable="${build.dir}/MoneyApp" failonerror="true"/> </target> <target name="hierarchy" depends="static-lib"> ! <mkdir dir="${obj.dir}/hierarchy"/> ! <cc outfile="${build.dir}/hierarchy" ! outtype="executable" ! subsystem="console" name="${compiler}" ! objdir="${obj.dir}/hierarchy" exceptions="true" rtti="true" --- 426,440 ---- <target name="test-money" depends="money"> ! <exec executable="${build.dir}/MoneyApp" failonerror="true"/> </target> <target name="hierarchy" depends="static-lib"> ! <mkdir dir="${obj.dir}/hierarchy"/> ! <cc outfile="${build.dir}/hierarchy" ! outtype="executable" ! subsystem="console" name="${compiler}" ! objdir="${obj.dir}/hierarchy" exceptions="true" rtti="true" *************** *** 405,409 **** <compiler name="brc" if="use-brc"/> <compiler name="msrc"/> ! <fileset dir="${examples.dir}/hierarchy" includes="*.cpp"/> <includepath path="${include.dir}"/> --- 443,447 ---- <compiler name="brc" if="use-brc"/> <compiler name="msrc"/> ! <fileset dir="${examples.dir}/hierarchy" includes="*.cpp"/> <includepath path="${include.dir}"/> *************** *** 418,444 **** <target name="test-hierarchy" depends="hierarchy"> <!-- some tests intentionally fail --> ! <exec executable="${build.dir}/hierarchy" resultproperty="hierarchy-result"/> <condition property="hierarchy-pass"> <equals arg1="${hierarchy-result}" arg2="0"/> </condition> ! <fail unless="hierarchy-pass" message="hierarchy erroneously passed all tests"/> </target> <target name="simple" depends="static-lib"> ! <mkdir dir="${obj.dir}/simple"/> ! <cc outfile="${build.dir}/simple" ! outtype="executable" ! subsystem="console" name="${compiler}" exceptions="true" optimize="speed" rtti="true" ! objdir="${obj.dir}/simple" debug="${debug}"> <compiler name="brc" if="use-brc"/> <compiler name="msrc"/> ! <fileset dir="${examples.dir}/simple" includes="*.cpp" excludes="SimplePlugIn.cpp"/> <includepath path="${include.dir}"/> --- 456,482 ---- <target name="test-hierarchy" depends="hierarchy"> <!-- some tests intentionally fail --> ! <exec executable="${build.dir}/hierarchy" resultproperty="hierarchy-result"/> <condition property="hierarchy-pass"> <equals arg1="${hierarchy-result}" arg2="0"/> </condition> ! <fail unless="hierarchy-pass" message="hierarchy erroneously passed all tests"/> </target> <target name="simple" depends="static-lib"> ! <mkdir dir="${obj.dir}/simple"/> ! <cc outfile="${build.dir}/simple" ! outtype="executable" ! subsystem="console" name="${compiler}" exceptions="true" optimize="speed" rtti="true" ! objdir="${obj.dir}/simple" debug="${debug}"> <compiler name="brc" if="use-brc"/> <compiler name="msrc"/> ! <fileset dir="${examples.dir}/simple" includes="*.cpp" excludes="SimplePlugIn.cpp"/> <includepath path="${include.dir}"/> *************** *** 455,464 **** <target name="test-simple" depends="simple"> <!-- some tests intentionally fail --> ! <exec executable="${build.dir}/simple" resultproperty="simple-result"/> <condition property="simple-pass"> <equals arg1="${simple-result}" arg2="0"/> </condition> ! <!-- fail unless="simple-pass" message="simple erroneously passed all tests"/ --> </target> --- 493,502 ---- <target name="test-simple" depends="simple"> <!-- some tests intentionally fail --> ! <exec executable="${build.dir}/simple" resultproperty="simple-result"/> <condition property="simple-pass"> <equals arg1="${simple-result}" arg2="0"/> </condition> ! <!-- fail unless="simple-pass" message="simple erroneously passed all tests"/ --> </target> *************** *** 471,478 **** <fileset dir="${src.dir}/msvc6/DSPlugIn" includes="*.idl"/> </cc> ! <cc outfile="${build.dir}/TestRunnerDSPlugIn" ! outtype="shared" ! subsystem="gui" ! objdir="${obj.dir}/DSPlugIn" exceptions="true" name="${compiler}" --- 509,516 ---- <fileset dir="${src.dir}/msvc6/DSPlugIn" includes="*.idl"/> </cc> ! <cc outfile="${build.dir}/TestRunnerDSPlugIn" ! outtype="shared" ! subsystem="gui" ! objdir="${obj.dir}/DSPlugIn" exceptions="true" name="${compiler}" *************** *** 482,486 **** <compiler name="brc" if="use-brc"/> <compiler name="msrc"/> ! <fileset dir="${src.dir}/msvc6/DSPlugIn" includes="*.cpp *.rc"/> <compiler name="msrc"/> --- 520,524 ---- <compiler name="brc" if="use-brc"/> <compiler name="msrc"/> ! <fileset dir="${src.dir}/msvc6/DSPlugIn" includes="*.cpp *.rc"/> <compiler name="msrc"/> *************** *** 514,521 **** <target name="test-all-qt" depends="qttestrunner"/> ! <target name="all" depends="all-but-qt, all-qt"/> <target name="test-all" depends="test-all-but-qt, test-all-qt"/> ! ! </project> \ No newline at end of file --- 552,559 ---- <target name="test-all-qt" depends="qttestrunner"/> ! <target name="all" depends="all-but-qt, all-qt"/> <target name="test-all" depends="test-all-but-qt, test-all-qt"/> ! ! </project> |