Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I use my own compiler with Nant?

Nant seems very compiler-centric - which is guess is because it's considered a .NET development system. But I know it can be done! I've seen it. The platform we're building on has its own compiler and doesn't use 'cl.exe' for c++. We're building a C++ app on a different platform and would like to override with our own compiler. Can anyone point me at a way to do that or at least how to set up a target of my own that will use our target platform's compiler?

like image 662
screenglow Avatar asked Feb 03 '26 21:02

screenglow


1 Answers

Here is one I did for Delphi. Each 'arg' is a separate param with a value defined elsewhere. The target is called with the params set up before calling it.

<target name="build.application">
    <exec program="dcc32" basedir="${Delphi.Bin}" workingdir="${Application.Folder}" verbose="true">
        <arg value="${Application.Compiler.Directive}" />
        <arg value="-Q" />
        <arg value="/B" />
        <arg value="/E${Application.Output.Folder}" />
        <arg value="/U${Application.Lib.Folder};${Application.Search.Folder}" />
        <arg value="${Application.Folder}\${Delphi.Project}" />
    </exec>
</target>
like image 114
Jeff Cuscutis Avatar answered Feb 06 '26 12:02

Jeff Cuscutis