etch-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vei...@apache.org
Subject svn commit: r1578855 - /etch/trunk/binding-cpp/runtime/build.xml
Date Tue, 18 Mar 2014 13:03:48 GMT
Author: veithm
Date: Tue Mar 18 13:03:47 2014
New Revision: 1578855

URL: http://svn.apache.org/r1578855
Log:
Adding additional argument for custom build options

Now it is possible to set additional compiler specific build options to
CMake via ant. This is e.g. needed if you would like to do parallel builds
by setting -j5.

Change-Id: Ibaa89841512a9ad087fed37618988f11d2a87565

Modified:
    etch/trunk/binding-cpp/runtime/build.xml

Modified: etch/trunk/binding-cpp/runtime/build.xml
URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/build.xml?rev=1578855&r1=1578854&r2=1578855&view=diff
==============================================================================
--- etch/trunk/binding-cpp/runtime/build.xml (original)
+++ etch/trunk/binding-cpp/runtime/build.xml Tue Mar 18 13:03:47 2014
@@ -1,25 +1,25 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
--->
-<project name="etch-cpp-runtime" basedir="." default="help">
-    <description>Etch-to-CPP runtime binding implementation</description>
-    <property name="Etch.basedir" location="${basedir}/../.." />
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+-->
+<project name="etch-cpp-runtime" basedir="." default="help">
+    <description>Etch-to-CPP runtime binding implementation</description>
+    <property name="Etch.basedir" location="${basedir}/../.." />
 
     <property file="build.properties"/>
 
@@ -27,31 +27,31 @@
     <import file="custom_rules.xml" optional="true" />
 
     <!-- import etch generics -->
-    <import file="${Etch.basedir}/build-support/etch.includes.xml" />
-
-    <!-- Static properties of the sub-project -->
-    <property name="proj"                 location="${Etch.basedir}/binding-cpp/runtime"
/>
-    <property name="target"               location="${proj}/target" />
-    <property name="testResultsDirectory" location="${target}/test-results" />
+    <import file="${Etch.basedir}/build-support/etch.includes.xml" />
+
+    <!-- Static properties of the sub-project -->
+    <property name="proj"                 location="${Etch.basedir}/binding-cpp/runtime"
/>
+    <property name="target"               location="${proj}/target" />
+    <property name="testResultsDirectory" location="${target}/test-results" />
 
     <property name="binaryDir"            location="${Etch.dist}/binding-cpp/bin"/>
     <property name="libaryDir"            location="${Etch.dist}/binding-cpp/lib"/>
     <property name="headerDir"            location="${Etch.dist}/binding-cpp/include"/>
 
-    <!-- INIT TARGET -->
-    <!-- Modify this target to define project specific properties that can only be set
at runtime -->
-    <target name="do-init" >
+    <!-- INIT TARGET -->
+    <!-- Modify this target to define project specific properties that can only be set
at runtime -->
+    <target name="do-init" >
         <property name="target_platform"                location="${target}/${platform}"/>
         <mkdir dir="${target_platform}" />
         <mkdir dir="${testResultsDirectory}" />
-    </target>
-
-    <!-- CLEAN TARGET -->
-    <target name="do-clean">
-        <delete dir="${target}" />
-    </target>
-
-    <!-- BUILD TARGET -->
+    </target>
+
+    <!-- CLEAN TARGET -->
+    <target name="do-clean">
+        <delete dir="${target}" />
+    </target>
+
+    <!-- BUILD TARGET -->
 
     <!-- overriding build target from etch.include.xml -->
     <target name="build" depends="">
@@ -96,25 +96,25 @@
 
     </target>
 
-    <target name="do-build-info" unless="USE.cmake">
-        <echo message="**********************************" />
-        <echo message="binding-cpp build will not be done." />
-        <echo message="**********************************" />
-    </target>
-    
-    <target name="do-build-generate-sources" if="USE.cmake">
-        <mkdir dir="${Etch.dist}/binding-cpp" />
-        <!-- package up etch-java-runtime src -->
-        <zip destfile="${Etch.dist}/binding-cpp/${etch-cpp-runtime-src.zip}">
-            <fileset dir="${proj}">
-                <exclude name="target/" />
-                <exclude name="doc/" />
-                <exclude name="**/.svn" />
-            </fileset>
-        </zip>
-    </target>
-
-    <target name="do-build-main" if="USE.cmake">
+    <target name="do-build-info" unless="USE.cmake">
+        <echo message="**********************************" />
+        <echo message="binding-cpp build will not be done." />
+        <echo message="**********************************" />
+    </target>
+
+    <target name="do-build-generate-sources" if="USE.cmake">
+        <mkdir dir="${Etch.dist}/binding-cpp" />
+        <!-- package up etch-java-runtime src -->
+        <zip destfile="${Etch.dist}/binding-cpp/${etch-cpp-runtime-src.zip}">
+            <fileset dir="${proj}">
+                <exclude name="target/" />
+                <exclude name="doc/" />
+                <exclude name="**/.svn" />
+            </fileset>
+        </zip>
+    </target>
+
+    <target name="do-build-main" if="USE.cmake">
         <property name="defaultCMakeToolchainDir" value="${basedir}/toolchains"/>
         <if>
             <isset property="target.platforms.${platform}.toolchainfile"/>
@@ -157,6 +157,16 @@
         </if>
 
         <if>
+            <isset property="CUSTOM_BUILD_OPTIONS"/>
+            <then>
+                <property name="use.custom.build.options" value="${CUSTOM_BUILD_OPTIONS}"/>
+            </then>
+            <else>
+                <property name="use.custom.build.options" value=""/>
+            </else>
+        </if>
+
+        <if>
             <isset property="target.platforms.${platform}.generator"/>
             <then>
                 <!-- use specified generator -->
@@ -184,7 +194,7 @@
 
                 <!-- run the build -->
                 <exec dir="${target}/${platform}/${Etch.build.target}" executable="cmake"
failonerror="true">
-                    <arg line="--build . --target install --config ${Etch.build.target}"/>
+                    <arg line="--build . --target install --config ${Etch.build.target}
-- ${use.custom.build.options}"/>
                 </exec>
 
             </then>
@@ -212,24 +222,22 @@
 
                 <!-- run the build -->
                 <exec dir="${target}/${platform}/${Etch.build.target}" executable="cmake"
failonerror="true">
-                    <arg line="--build . --target install --config ${Etch.build.target}"/>
+                    <arg line="--build . --target install --config ${Etch.build.target}
-- ${use.custom.build.options}"/>
                 </exec>
                 
             </else>
         </if>
-    </target>
-
-    <target name="do-build" depends="do-build-info,do-build-generate-sources,do-build-main"
if="USE.cmake">
-
-    </target>
-
-    <!-- TEST TARGET -->
+    </target>
+
+    <target name="do-build" depends="do-build-info,do-build-generate-sources,do-build-main"
if="USE.cmake">
+
+    </target>
+
+    <!-- TEST TARGET -->
     <target name="test" depends="postbuild">
-        
-    </target>
-
+    </target>
+
     <target name="postbuild" depends="build,do-postbuild">
-        
     </target>
   
     <target name="do-test" unless="build.skip.tests">
@@ -250,12 +258,12 @@
                 </exec>
             </else>
         </if>
-    </target>
-
-    <target name="do-publish" if="build.tests.fail">
-        <!-- Set flag file if any tests failed -->
-        <touch file="${Etch.runtime.tests.fail}"/>
-    </target>
-
-</project>
+    </target>
+
+    <target name="do-publish" if="build.tests.fail">
+        <!-- Set flag file if any tests failed -->
+        <touch file="${Etch.runtime.tests.fail}"/>
+    </target>
+
+</project>
 



Mime
View raw message