3 * Copyright 2002-2004 The Ant-Contrib project
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 package net
.sf
.antcontrib
.cpptasks
;
20 import net
.sf
.antcontrib
.cpptasks
.types
.ConditionalFileSet
;
22 import org
.apache
.tools
.ant
.BuildException
;
24 * Specifies files that should not be compiled using precompiled headers.
28 public final class PrecompileExceptDef
{
29 private ConditionalFileSet localSet
= null;
31 * Collection of <fileset>contained by definition
33 private PrecompileDef owner
;
38 public PrecompileExceptDef(PrecompileDef owner
) {
42 * Adds filesets that specify files that should not be processed using
43 * precompiled headers.
46 * FileSet specify files that should not be processed with
47 * precompiled headers enabled.
49 public void addFileset(ConditionalFileSet exceptSet
) {
50 owner
.appendExceptFileSet(exceptSet
);
52 public void execute() throws org
.apache
.tools
.ant
.BuildException
{
53 throw new org
.apache
.tools
.ant
.BuildException(
54 "Not an actual task, but looks like one for documentation purposes");
57 * Sets the base-directory
59 public void setDir(File dir
) throws BuildException
{
60 if (localSet
== null) {
61 localSet
= new ConditionalFileSet();
62 owner
.appendExceptFileSet(localSet
);
67 * Comma or space separated list of file patterns that should not be
68 * compiled using precompiled headers.
71 * the string containing the include patterns
73 public void setIncludes(String includes
) {
74 if (localSet
== null) {
75 localSet
= new ConditionalFileSet();
76 owner
.appendExceptFileSet(localSet
);
78 localSet
.setIncludes(includes
);