From e96b0aa25ee1c30f5f00f7066095433512f2fee2 Mon Sep 17 00:00:00 2001 From: Mark Donszelmann Date: Mon, 30 Nov 2009 09:12:58 +0100 Subject: Fixed NAR-112 --- src/it/it0018-fortran/pom.xml | 1 + src/main/java/org/apache/maven/plugin/nar/Library.java | 12 ++++++++++++ .../java/org/apache/maven/plugin/nar/NarCompileMojo.java | 1 + src/site/apt/configuration.apt | 1 + 4 files changed, 15 insertions(+) (limited to 'src') 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. executable true + true 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 @@ -65,6 +65,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. * @@ -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 + -- cgit v1.2.3