CppTasks

To handle the variety of architectures, compilers and linkers, the NAR Plugin uses the cpptasks library available from ant-contrib. This library allows to specify compilers and linkers from ant (and thus from maven) and unifies most common options for those compilers and linkers.

The NAR Plugin uses cpptasks 1.0 beta 4 from sourceforge with some minor extensions:

** Misc.
- [src/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java] no more need for -prebind as of 10.4
- [src/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java] removed trailing space after "-framework" to avoid quoting
- [src/net/sf/antcontrib/cpptasks/gcc/GppLinker.java] added -shared-libgcc/-static-libgcc for linking gcc and c++. 
- [src/net/sf/antcontrib/cpptasks/gcc/GccLinker.java] added -dynamic as a valid option to GccLinker
- [src/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java] no -Bstatic for Darwin and no -Bdynamic for framework
- [src/net/sf/antcontrib/cpptasks/compaq/CompaqVisualFortranCompiler.java] removed addition of quotes.
- [src/net/sf/antcontrib/cpptasks/gcc/GccCompatibleCCompiler.java] added missing code for -fno-exceptions
- [src/net/sf/antcontrib/cpptasks/CCTask.java] added log statement to identify linker and compiler
- [src/net/sf/antcontrib/cpptasks/gcc/GppLinker.java] g++ linking now includes option -fexceptions
- [src/net/sf/antcontrib/cpptasks/CommandLineLinker] use absolute paths for filenames if they are shorter than relative paths to overcome windows file length limit.
- [src/net/sf/antcontrib/cpptasks/CCTask.java] added thread to keep progress

** -fno-rtti changes
- [src/net/sf/antcontrib/cpptasks/gcc/GccCompatibleCCompiler.java] removed -fno-rtti flag
- [src/net/sf/antcontrib/cpptasks/gcc/GccCCompiler.java] only add -fno-rtti for g++ and c++ 

** Launch process change
- [src/net/sf/antcontrib/cpptasks/compiler/CaptureStreamHandler.java] rewrote the launching of subprocesses (NARPLUGIN-71).
- [src/net/sf/antcontrib/cpptasks/compiler/CaptureStreamHandler.java] added protection against null return of run() method.

** libstdc++ linking
- [src/net/sf/antcontrib/cpptasks/CCTask.java] added method to link with CPP
- [src/net/sf/antcontrib/cpptasks/compiler/LinkType.java] added method to link with CPP
- [src/net/sf/antcontrib/cpptasks/compiler/gcc/GppLinker.java] link with or without CPP

** jni libraries (MacOS X)
- [src/net/sf/antcontrib/cpptasks/OutputTypeEnum.java] added jni
- [src/net/sf/antcontrib/cpptasks/compiler/LinkType] add jni as type
- [src/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker] added jni
- [src/net/sf/antcontrib/cpptasks/gcc/GccLinker.java] add jni as type and special linker for MacOS X to output jnilib files.
- [src/net/sf/antcontrib/cpptasks/gcc/GppLinker.java] add jni as type and special linker for MacOS X to output jnilib files.

** gfortran compiler
- [src/net/sf/antcontrib/cpptasks/gcc/GccCCompiler.java] added gfortran compiler
- [src/net/sf/antcontrib/cpptasks/CompilerEnum.java] added gfortran compiler

** intel compilers name change
- [src/net/sf/antcontrib/cpptasks/intel/IntelLinux32CLinker.java] added (icpc)
- [src/net/sf/antcontrib/cpptasks/intel/IntelLinux32Compiler.java] added (icpc)
- [src/net/sf/antcontrib/cpptasks/intel/IntelLinux64CLinker.java] added (ecpc)
- [src/net/sf/antcontrib/cpptasks/intel/IntelLinux64Compiler.java] added (ecpc)
- [src/net/sf/antcontrib/cpptasks/LinkerEnum.java] added and changed linkers 
- [src/net/sf/antcontrib/cpptasks/CompilerEnum.java] added and changed compilers.
- [src/net/sf/antcontrib/cpptasks/intel/IntelLinux32CCompiler.java] links to IntelLinux32CLinker.
- [src/net/sf/antcontrib/cpptasks/intel/IntelLinux64CCompiler.java] links to  IntelLinux64CLinker.
- [src/net/sf/antcontrib/cpptasks/intel/IntelLinux32Linker.java] changed linker name from icc to icpc for version 8.1 of Intel Compilers.
- [src/net/sf/antcontrib/cpptasks/intel/IntelLinux64Linker.java] changed linker name from ecc to ecpc for version 8.1 of Intel Compilers.

** sun c and fortran compiles
- [src/net/sf/antcontrib/cpptasks/sun/ForteCCompiler.java] added (suncc)
- [src/net/sf/antcontrib/cpptasks/sun/ForteF77Compiler.java] added (sunf77)
- [src/net/sf/antcontrib/cpptasks/CompilerEnum] Added the above (suncc, sunf77).

** bug [ 1109917 ] g++ linker does not add runtime w/o other libs referenced
- [src/net/sf/antcontrib/cpptasks/compiler/CommandLineLinker] always call addLibrarySets

** bug [ 795683 ] cpptasks speedup
- [src/net/sf/antcontrib/cpptasks/DependencyTable.java] cpptasks speedup
- [src/net/sf/antcontrib/cpptasks/DependencyInfo.java] cpptasks speedup

You can find the latest of our mods in our svn repository:

svn co svn://svn.freehep.org/svn/misc/trunk/cpptasks