allow different arguments to cl
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@125473 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -47,7 +47,17 @@
|
|||||||
<ant:available property="jniFilesPresent" file="${maven.build.dir}/native/jni"/>
|
<ant:available property="jniFilesPresent" file="${maven.build.dir}/native/jni"/>
|
||||||
|
|
||||||
<!-- for some reason '.' aren't allow as parameter for outfile-->
|
<!-- for some reason '.' aren't allow as parameter for outfile-->
|
||||||
<cc outfile="${maven.build.dir}/native/_" link="${maven.native.link}" debug="${maven.native.debug}">
|
|
||||||
|
<!-- 17 Dec 2004 - baleineca
|
||||||
|
Checking for runtime property and adding it. Default to "dynamic" if not present.
|
||||||
|
Seems like this is the only way at time of writing to get ccTask to pass something else than the default /MD arg to cl.
|
||||||
|
-->
|
||||||
|
<j:set var="runtime" value="${maven.native.runtime}"/>
|
||||||
|
<j:if test="${runtime} == ''">
|
||||||
|
<j:set var="runtime" value="dynamic"/>
|
||||||
|
</j:if>
|
||||||
|
|
||||||
|
<cc outfile="${maven.build.dir}/native/_" link="${maven.native.link}" debug="${maven.native.debug}" runtime="${runtime}" rtti="${rtti}">
|
||||||
<compiler name="${maven.native.compiler.name}">
|
<compiler name="${maven.native.compiler.name}">
|
||||||
<compilerparam name="target" value="${maven.native.compiler.target}"/>
|
<compilerparam name="target" value="${maven.native.compiler.target}"/>
|
||||||
|
|
||||||
@@ -152,6 +162,14 @@
|
|||||||
<ant:copy file="${maven.build.dir}/native/_.dll"
|
<ant:copy file="${maven.build.dir}/native/_.dll"
|
||||||
tofile="${maven.build.dir}/native/${pom.artifactId}-${pom.currentVersion}.dll" overwrite="true"/>
|
tofile="${maven.build.dir}/native/${pom.artifactId}-${pom.currentVersion}.dll" overwrite="true"/>
|
||||||
</j:if>
|
</j:if>
|
||||||
|
|
||||||
|
<!-- dylib -->
|
||||||
|
<ant:available property="outputPresentDylib" file="${maven.build.dir}/native/lib_.dylib"/>
|
||||||
|
<j:if test="${outputPresentDylib == 'true'}">
|
||||||
|
<ant:copy file="${maven.build.dir}/native/lib_.dylib"
|
||||||
|
tofile="${maven.build.dir}/native/lib${pom.artifactId}-${pom.currentVersion}.jnilib" overwrite="true"/>
|
||||||
|
</j:if>
|
||||||
|
|
||||||
</goal>
|
</goal>
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
@@ -180,6 +198,14 @@
|
|||||||
<ant:mkdir dir="${libdir__}"/>
|
<ant:mkdir dir="${libdir__}"/>
|
||||||
<ant:copy file="${maven.build.dir}/native/${pom.artifactId}-${pom.currentVersion}.dll" tofile="${libdir__}/${pom.artifactId}-${pom.currentVersion}.dll" overwrite="true"/>
|
<ant:copy file="${maven.build.dir}/native/${pom.artifactId}-${pom.currentVersion}.dll" tofile="${libdir__}/${pom.artifactId}-${pom.currentVersion}.dll" overwrite="true"/>
|
||||||
</j:if>
|
</j:if>
|
||||||
|
|
||||||
|
<!-- jnilib -->
|
||||||
|
<ant:available property="libPresentJnilib" file="${maven.build.dir}/native/lib${pom.artifactId}-${pom.currentVersion}.jnilib"/>
|
||||||
|
<j:if test="${libPresentJnilib == 'true'}">
|
||||||
|
<ant:property name="libdir__" value="${maven.repo.local}/${pom.artifactDirectory}/jnilibs"/>
|
||||||
|
<ant:mkdir dir="${libdir__}"/>
|
||||||
|
<ant:copy file="${maven.build.dir}/native/lib${pom.artifactId}-${pom.currentVersion}.jnilib" tofile="${libdir__}/lib${pom.artifactId}-${pom.currentVersion}.jnilib" overwrite="true"/>
|
||||||
|
</j:if>
|
||||||
</goal>
|
</goal>
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
</properties>
|
</properties>
|
||||||
<body>
|
<body>
|
||||||
<release version="1.2-SNAPSHOT" date="in CVS">
|
<release version="1.2-SNAPSHOT" date="in CVS">
|
||||||
|
<action dev="brett" type="add" due-to="baleineca">Checking for runtime property and adding it. Default to "dynamic" if not present.</action>
|
||||||
<action dev="brett" type="fix" issue="MPNATIVE-10" due-to="Joachim Bader">Add DLL support to the plugin</action>
|
<action dev="brett" type="fix" issue="MPNATIVE-10" due-to="Joachim Bader">Add DLL support to the plugin</action>
|
||||||
<action dev="brett" type="fix" issue="MPNATIVE-7" due-to="Joachim Bader">Changed repository location of libraries from <code>so</code> to <code>sos</code> so Maven can handle them as dependencies</action>
|
<action dev="brett" type="fix" issue="MPNATIVE-7" due-to="Joachim Bader">Changed repository location of libraries from <code>so</code> to <code>sos</code> so Maven can handle them as dependencies</action>
|
||||||
<action dev="brett" type="add" issue="MPNATIVE-7" due-to="Joachim Bader">Add support for native dependencies (libset/syslibset)</action>
|
<action dev="brett" type="add" issue="MPNATIVE-7" due-to="Joachim Bader">Add support for native dependencies (libset/syslibset)</action>
|
||||||
|
|||||||
@@ -7,12 +7,41 @@
|
|||||||
<faq id="cygwin">
|
<faq id="cygwin">
|
||||||
<question>How to run the gcc under cygwin?</question>
|
<question>How to run the gcc under cygwin?</question>
|
||||||
<answer>
|
<answer>
|
||||||
Set the follwing properties in your <code>project.properties</code>:
|
<p>
|
||||||
|
Set the following properties in your <code>project.properties</code>:
|
||||||
|
</p>
|
||||||
<source>
|
<source>
|
||||||
maven.native.include.os=win32
|
maven.native.include.os=win32
|
||||||
maven.native.compiler.arg.start=-mno-cygwin
|
maven.native.compiler.arg.start=-mno-cygwin
|
||||||
maven.native.linker.arg.start=-mno-cygwin -Wl,--add-stdcall-alias
|
maven.native.linker.arg.start=-mno-cygwin -Wl,--add-stdcall-alias</source>
|
||||||
</source>
|
</answer>
|
||||||
|
</faq>
|
||||||
|
<faq id="msvc">
|
||||||
|
<question>How to run cl on Windows?</question>
|
||||||
|
<answer>
|
||||||
|
<p>
|
||||||
|
Set the following properties in your <code>project.properties</code>:
|
||||||
|
</p>
|
||||||
|
<source>
|
||||||
|
maven.native.include.os=win32
|
||||||
|
maven.native.compiler.name=msvc</source>
|
||||||
|
<p>
|
||||||
|
Optionally, you can set the following property if you don't want the
|
||||||
|
default argument /MD (or /MDd if in debug mode) to be passed to cl.
|
||||||
|
At time of writing, this always gets set by CCTask so even if you
|
||||||
|
pass a different argument with maven.native.compiler.arg.start
|
||||||
|
property, it won't be unset. You will simply end up with 2
|
||||||
|
arguments...
|
||||||
|
</p>
|
||||||
|
<source>
|
||||||
|
maven.native.runtime=static</source>
|
||||||
|
<p>
|
||||||
|
Other arguments for cl can be passed in by setting the following
|
||||||
|
property (with values you *really* want, of course, this is just an
|
||||||
|
example). Multiple values are separated by a space.
|
||||||
|
</p>
|
||||||
|
<source>
|
||||||
|
maven.native.compiler.arg.start=/GR /GX</source>
|
||||||
</answer>
|
</answer>
|
||||||
</faq>
|
</faq>
|
||||||
</part>
|
</part>
|
||||||
|
|||||||
Reference in New Issue
Block a user