summaryrefslogtreecommitdiff
path: root/src/main/java/net/sf/antcontrib/cpptasks/ProcessorDef.java
diff options
context:
space:
mode:
authorMark Donszelmann <Mark.Donszelmann@gmail.com>2009-11-06 15:30:37 +0100
committerMark Donszelmann <Mark.Donszelmann@gmail.com>2009-11-06 15:30:37 +0100
commitfa6eb468613603bfa2571f2e456468878bfe0b95 (patch)
treeaab6fbeae127acd5b49b88cb0be70bce1d433fa9 /src/main/java/net/sf/antcontrib/cpptasks/ProcessorDef.java
parent7ea719da26b29976e7227b4846953d24ced709d8 (diff)
parent683d490074d93baa8a47db7ec43b7bd31145a12a (diff)
downloadcpptasks-parallel-fa6eb468613603bfa2571f2e456468878bfe0b95.tar.gz
cpptasks-parallel-fa6eb468613603bfa2571f2e456468878bfe0b95.tar.bz2
cpptasks-parallel-fa6eb468613603bfa2571f2e456468878bfe0b95.tar.xz
cpptasks-parallel-fa6eb468613603bfa2571f2e456468878bfe0b95.zip
Merged with cpptasks-1.0b5
Diffstat (limited to 'src/main/java/net/sf/antcontrib/cpptasks/ProcessorDef.java')
-rw-r--r--src/main/java/net/sf/antcontrib/cpptasks/ProcessorDef.java27
1 files changed, 19 insertions, 8 deletions
diff --git a/src/main/java/net/sf/antcontrib/cpptasks/ProcessorDef.java b/src/main/java/net/sf/antcontrib/cpptasks/ProcessorDef.java
index 24c1a1f..54a3406 100644
--- a/src/main/java/net/sf/antcontrib/cpptasks/ProcessorDef.java
+++ b/src/main/java/net/sf/antcontrib/cpptasks/ProcessorDef.java
@@ -65,7 +65,7 @@ public abstract class ProcessorDef extends DataType {
*/
private String ifProp;
/**
- * if true, processor definition inherits values from containing <cc>
+ * if true, processor definition inherits values from containing cc
* element
*/
private boolean inherit;
@@ -126,7 +126,7 @@ public abstract class ProcessorDef extends DataType {
/**
* Adds a <compilerarg>or <linkerarg>
*
- * @param arg
+ * @param param
* command line argument, must not be null
* @throws NullPointerException
* if arg is null
@@ -175,7 +175,7 @@ public abstract class ProcessorDef extends DataType {
* Creates a configuration
*
* @param baseDef
- * reference to def from containing <cc>element, may be null
+ * reference to def from containing cc element, may be null
* @return configuration
*
*/
@@ -188,11 +188,11 @@ public abstract class ProcessorDef extends DataType {
baseDef, targetPlatform, versionInfo);
}
ProcessorDef[] defaultProviders = getDefaultProviders(baseDef);
- Processor proc = getProcessor();
+ Processor proc = getProcessor(linkType);
return proc.createConfiguration(task, linkType, defaultProviders, this, targetPlatform, versionInfo);
}
/**
- * Prepares list of processor arguments ( <compilerarg>, <linkerarg>) that
+ * Prepares list of processor arguments ( compilerarg, linkerarg ) that
* are active for the current project settings.
*
* @return active compiler arguments
@@ -219,7 +219,7 @@ public abstract class ProcessorDef extends DataType {
return array;
}
/**
- * Prepares list of processor arguments ( <compilerarg>, <linkerarg>) that
+ * Prepares list of processor arguments ( compilerarg, linkerarg) that
* are active for the current project settings.
*
* @return active compiler arguments
@@ -315,7 +315,7 @@ public abstract class ProcessorDef extends DataType {
}
/**
* Gets the inherit attribute. If the inherit value is true, this processor
- * definition will inherit default values from the containing <cc>element.
+ * definition will inherit default values from the containing cc element.
*
* @return if true then properties from the containing <cc>element are
* used.
@@ -358,6 +358,17 @@ public abstract class ProcessorDef extends DataType {
}
return processor;
}
+
+ /**
+ * Obtains the appropriate processor (compiler, linker) based on the
+ * LinkType.
+ *
+ * @return processor
+ */
+ protected Processor getProcessor(LinkType linkType) {
+ // by default ignore the linkType.
+ return getProcessor();
+ }
/**
* Gets a boolean value indicating whether all targets must be rebuilt
* regardless of dependency analysis.
@@ -523,7 +534,7 @@ public abstract class ProcessorDef extends DataType {
}
/**
* If inherit has the default value of true, defines, includes and other
- * settings from the containing <cc>element will be inherited.
+ * settings from the containing cc element will be inherited.
*
* @param inherit
* new value