summaryrefslogtreecommitdiffstats
path: root/src/site/apt/index.apt
blob: 2218ba5d4d7fd55383a32fe552759aaa92a0b33a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
~~ Licensed to the Ant-Contrib Project under one or more
~~ contributor license agreements.  See the NOTICE file distributed with
~~ this work for additional information regarding copyright ownership.
~~ The Ant-Contrib Project licenses this file to You under the Apache License, Version 2.0
~~ (the "License"); you may not use this file except in compliance with
~~ the License.  You may obtain a copy of the License at
~~
~~      http://www.apache.org/licenses/LICENSE-2.0
~~
~~ Unless required by applicable law or agreed to in writing, software
~~ distributed under the License is distributed on an "AS IS" BASIS,
~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~~ See the License for the specific language governing permissions and
~~ limitations under the License.
 ------
cpptasks for Apache Ant
 ------
 ------
 ------

cpptasks for Apache Ant

  The cc task can compile various source languages and produce executables,
  shared libraries (aka DLL's) and static libraries. Compiler adaptors are currently available
  for several C/C++ compilers, FORTRAN, MIDL and Windows Resource files.

  The task can be used with Apache Ant 1.5 and later.  This software is not a product
  of the Apache Software Foundation (ASF) and no endorsement by the ASF is implied.


  To use:
     * Place cpptasks.jar into Ant's classpath by placing in Ant's lib directory,
          adding to CLASSPATH environment variable or using the -lib command line option.

     * Add type and task definitions in build file:
       Ant 1.6 or later: add xmlns:cpptasks="antlib:sf.net.antcontrib.cpptasks" to <project> element.
       Ant 1.5 or later: Add <taskdef resource="cpptasks.tasks"/> and <typedef resource="cpptasks.types"/> to body of <project> element.

     * Add {{{antdocs/CCTask.html}cc}} element to some target in your build file.

     * Set path and environment variables to be able to run compiler from command line.

     * Build project.

   Trivial Sample:
   
+--
<project name="hello" default="compile">
    <taskdef resource="cpptasks.tasks"/>
    <target name="compile">
        <mkdir dir="target/main/obj"/>
        <cc outtype="executable" subsystem="console" outfile="target/hello" objdir="target/main/obj">
           <fileset dir="src/main/c" includes="*.c"/>
        </cc>
    </target>
</project>
+--

   More complex samples appear in src/samples.