summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMark Donszelmann <Mark.Donszelmann@gmail.com>2009-11-30 09:12:58 +0100
committerMark Donszelmann <Mark.Donszelmann@gmail.com>2009-11-30 09:12:58 +0100
commite96b0aa25ee1c30f5f00f7066095433512f2fee2 (patch)
treef261c1efb86daf914440b9bfec31de3b1aaa6982 /src
parentb4e4a008ccd1c7a2cda9d1991a1c1f94a60caa80 (diff)
downloadmaven-nar-plugin-e96b0aa25ee1c30f5f00f7066095433512f2fee2.tar.gz
maven-nar-plugin-e96b0aa25ee1c30f5f00f7066095433512f2fee2.tar.bz2
maven-nar-plugin-e96b0aa25ee1c30f5f00f7066095433512f2fee2.tar.xz
maven-nar-plugin-e96b0aa25ee1c30f5f00f7066095433512f2fee2.zip
Fixed NAR-112
Diffstat (limited to 'src')
-rw-r--r--src/it/it0018-fortran/pom.xml1
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/Library.java12
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/NarCompileMojo.java1
-rw-r--r--src/site/apt/configuration.apt1
4 files changed, 15 insertions, 0 deletions
diff --git a/src/it/it0018-fortran/pom.xml b/src/it/it0018-fortran/pom.xml
index ed20f5c..88d3d91 100644
--- a/src/it/it0018-fortran/pom.xml
+++ b/src/it/it0018-fortran/pom.xml
@@ -63,6 +63,7 @@ under the License.
<library>
<type>executable</type>
<linkFortran>true</linkFortran>
+ <linkFortranMain>true</linkFortranMain>
</library>
</libraries>
</configuration>
diff --git a/src/main/java/org/apache/maven/plugin/nar/Library.java b/src/main/java/org/apache/maven/plugin/nar/Library.java
index fbcf6dd..3f5588a 100644
--- a/src/main/java/org/apache/maven/plugin/nar/Library.java
+++ b/src/main/java/org/apache/maven/plugin/nar/Library.java
@@ -66,6 +66,13 @@ public class Library
private boolean linkFortran = false;
/**
+ * Link with fortran startup, so that the gcc linker can find the "main" of fortran. Defaults to false.
+ *
+ * @parameter expression=""
+ */
+ private boolean linkFortranMain = false;
+
+ /**
* If specified will create the NarSystem class with methods to load a JNI library.
*
* @parameter expression=""
@@ -118,6 +125,11 @@ public class Library
return linkFortran;
}
+ public final boolean linkFortranMain()
+ {
+ return linkFortranMain;
+ }
+
public final String getNarSystemPackage()
{
return narSystemPackage;
diff --git a/src/main/java/org/apache/maven/plugin/nar/NarCompileMojo.java b/src/main/java/org/apache/maven/plugin/nar/NarCompileMojo.java
index b67f0dd..e447b59 100644
--- a/src/main/java/org/apache/maven/plugin/nar/NarCompileMojo.java
+++ b/src/main/java/org/apache/maven/plugin/nar/NarCompileMojo.java
@@ -140,6 +140,7 @@ public class NarCompileMojo
// fortran
task.setLinkFortran( library.linkFortran() );
+ task.setLinkFortranMain( library.linkFortranMain() );
// outDir
File outDir;
diff --git a/src/site/apt/configuration.apt b/src/site/apt/configuration.apt
index 9c5306c..0c52546 100644
--- a/src/site/apt/configuration.apt
+++ b/src/site/apt/configuration.apt
@@ -32,6 +32,7 @@ NAR Configuration
<type/>
<linkCPP/>
<linkFortran/>
+ <linkFortranMain/>
<run/>
<args>
<arg/>