etch-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vei...@apache.org
Subject svn commit: r1518247 - in /etch/trunk: binding-c/runtime/build.xml examples/example_mixin/build.xml examples/helloworld/c/build.xml examples/helloworld/c/dist-build.xml examples/helloworld/cpp/build.xml
Date Wed, 28 Aug 2013 15:07:11 GMT
Author: veithm
Date: Wed Aug 28 15:07:10 2013
New Revision: 1518247

URL: http://svn.apache.org/r1518247
Log:
MINOR Replacing cmake ant plugin with cmake executable

The CMake ant plugin is not working together with CMake 2.8.10
or higher. Therefore the change to the exec task together
with the CMake exectuable located in the Path was necessary.

Change-Id: Ic8bbb90615f1aa6fbb047e8c59a824b4e37e52e0

Modified:
    etch/trunk/binding-c/runtime/build.xml
    etch/trunk/examples/example_mixin/build.xml
    etch/trunk/examples/helloworld/c/build.xml
    etch/trunk/examples/helloworld/c/dist-build.xml
    etch/trunk/examples/helloworld/cpp/build.xml

Modified: etch/trunk/binding-c/runtime/build.xml
URL: http://svn.apache.org/viewvc/etch/trunk/binding-c/runtime/build.xml?rev=1518247&r1=1518246&r2=1518247&view=diff
==============================================================================
--- etch/trunk/binding-c/runtime/build.xml (original)
+++ etch/trunk/binding-c/runtime/build.xml Wed Aug 28 15:07:10 2013
@@ -59,9 +59,17 @@
     </target>
 
     <target name="do-build-main" if="USE.cmake">
-        <cmake srcdir="${basedir}/c" bindir="${basedir}/c/target" buildtype="Debug" >
-            <variable name="ETCH_EXTERNAL_DEPENDS" type="PATH" value="${env.ETCH_EXTERNAL_DEPENDS}"
/>
-        </cmake>
+
+        <!-- CMake configuration -->
+        <exec dir="${basedir}/c/target" executable="cmake" failonerror="true">
+            <arg value="-DETCH_EXTERNAL_DEPENDS:PATH=${env.ETCH_EXTERNAL_DEPENDS}"/>
+            <arg value="${basedir}/c"/>
+        </exec>
+        
+        <!-- run the build -->
+        <exec dir="${basedir}/c/target" executable="cmake" failonerror="true">
+            <arg line="--build . --config Debug"/>
+        </exec>
     </target>
 
     <target name="do-build" depends="do-build-info,do-build-generate-sources,do-build-main"
if="USE.cmake">

Modified: etch/trunk/examples/example_mixin/build.xml
URL: http://svn.apache.org/viewvc/etch/trunk/examples/example_mixin/build.xml?rev=1518247&r1=1518246&r2=1518247&view=diff
==============================================================================
--- etch/trunk/examples/example_mixin/build.xml (original)
+++ etch/trunk/examples/example_mixin/build.xml Wed Aug 28 15:07:10 2013
@@ -215,9 +215,17 @@
     <target name="build-csharp" depends="build-csharp-with-mono,build-csharp-with-dotnet"
/>
 
     <target name="build-c" depends="generate-sources" if="USE.cmake">
-        <cmake srcdir="${basedir}" bindir="${basedir}/target" buildtype="Debug" >
-            <variable name="ETCH_HOME" type="PATH" value="${build.ETCH_HOME}" />
-        </cmake>
+        <!-- CMake configuration -->
+        <exec dir="${basedir}/target" executable="cmake" failonerror="true">
+            <arg value="-DETCH_HOME:PATH=${etch.home}"/>
+            <arg value="${basedir}"/>
+        </exec>
+
+        <!-- run the build -->
+        <exec dir="${basedir}/target" executable="cmake" failonerror="true">
+            <arg line="--build . --config ${build.target}"/>
+        </exec>
+
         <copy todir="${bin}" flatten="true">
             <fileset dir="${basedir}/target/" >
                 <include name="example-client" />

Modified: etch/trunk/examples/helloworld/c/build.xml
URL: http://svn.apache.org/viewvc/etch/trunk/examples/helloworld/c/build.xml?rev=1518247&r1=1518246&r2=1518247&view=diff
==============================================================================
--- etch/trunk/examples/helloworld/c/build.xml (original)
+++ etch/trunk/examples/helloworld/c/build.xml Wed Aug 28 15:07:10 2013
@@ -94,28 +94,35 @@
    </target>
 
    <target name="build-c" depends="generate-sources" if="USE.cmake">
-     <cmake srcdir="${basedir}" bindir="${basedir}/target" buildtype="Debug" >
-      <variable name="ETCH_INCLUDE_CAPU_DIR" type="PATH" value="${Etch.basedir}/binding-c/runtime/lib/capu/deliverable/capu/include/capu"
/>
-      <variable name="ETCH_HOME" type="PATH" value="${etch.home}" />
-     </cmake>
-     <copy todir="${bin}" flatten="true">
-        <fileset dir="${target}" >
-           <include name="helloworld-client" />
-           <include name="helloworld-server" />
-           <include name="debug/helloworld-client.exe" />
-           <include name="debug/helloworld-server.exe" />
-        </fileset>
-     </copy>
-     <delete file="${target}/helloworld-client" quiet="true" />
-     <delete file="${target}/helloworld-server" quiet="true" />
-     <delete file="${target}/debug/helloworld-client.exe" quiet="true" />
-     <delete file="${target}/debug/helloworld-server.exe" quiet="true" />
-     <chmod perm="+x">
-        <fileset dir="${bin}">
-           <include name="helloworld-client" />
-           <include name="helloworld-server" />
-        </fileset>
-     </chmod>
+        <!-- CMake configuration -->
+        <exec dir="${basedir}/target" executable="cmake" failonerror="true">
+            <arg value="-DETCH_HOME:PATH=${etch.home}"/>
+            <arg value="${basedir}"/>
+        </exec>
+
+        <!-- run the build -->
+        <exec dir="${basedir}/target" executable="cmake" failonerror="true">
+            <arg line="--build . --config ${build.target}"/>
+        </exec>
+
+        <copy todir="${bin}" flatten="true">
+            <fileset dir="${target}" >
+                <include name="helloworld-client" />
+                <include name="helloworld-server" />
+                <include name="debug/helloworld-client.exe" />
+                <include name="debug/helloworld-server.exe" />
+            </fileset>
+         </copy>
+         <delete file="${target}/helloworld-client" quiet="true" />
+         <delete file="${target}/helloworld-server" quiet="true" />
+         <delete file="${target}/debug/helloworld-client.exe" quiet="true" />
+         <delete file="${target}/debug/helloworld-server.exe" quiet="true" />
+         <chmod perm="+x">
+            <fileset dir="${bin}">
+                <include name="helloworld-client" />
+                <include name="helloworld-server" />
+            </fileset>
+         </chmod>
    </target>
 
     <target name="build" depends="build-c" />

Modified: etch/trunk/examples/helloworld/c/dist-build.xml
URL: http://svn.apache.org/viewvc/etch/trunk/examples/helloworld/c/dist-build.xml?rev=1518247&r1=1518246&r2=1518247&view=diff
==============================================================================
--- etch/trunk/examples/helloworld/c/dist-build.xml (original)
+++ etch/trunk/examples/helloworld/c/dist-build.xml Wed Aug 28 15:07:10 2013
@@ -41,22 +41,29 @@
         classpath="${etch-ant-plugin.jar}"/>
 
     <target name="build-c" depends="gensrc-c" if="USE.cmake">
-     <cmake srcdir="${basedir}" bindir="${basedir}/target" buildtype="Debug" >
-      <variable name="ETCH_INCLUDE_CAPU_DIR" type="PATH" value="${Etch.basedir}/binding-c/runtime/lib/capu/deliverable/capu/include/capu"
/>
-      <variable name="ETCH_HOME" type="PATH" value="${etch.home}" />
-     </cmake>
-     <copy todir="${bin}" flatten="true">
-        <fileset dir="${basedir}/target/" >
-           <include name="helloworld-client" />
-           <include name="helloworld-server" />
-           <include name="debug/helloworld-client.exe" />
-           <include name="debug/helloworld-server.exe" />
-        </fileset>
-     </copy>
-     <delete file="helloworld-client" quiet="true" />
-     <delete file="helloworld-server" quiet="true" />
-     <delete file="debug/helloworld-client.exe" quiet="true" />
-     <delete file="debug/helloworld-server.exe" quiet="true" />
+     <!-- CMake configuration -->
+        <exec dir="${basedir}/target" executable="cmake" failonerror="true">
+            <arg value="-DETCH_HOME:PATH=${etch.home}"/>
+            <arg value="${basedir}"/>
+        </exec>
+
+        <!-- run the build -->
+        <exec dir="${basedir}/target" executable="cmake" failonerror="true">
+            <arg line="--build . --config ${build.target}"/>
+        </exec>
+
+        <copy todir="${bin}" flatten="true">
+            <fileset dir="${basedir}/target/" >
+                <include name="helloworld-client" />
+                <include name="helloworld-server" />
+                <include name="debug/helloworld-client.exe" />
+                <include name="debug/helloworld-server.exe" />
+            </fileset>
+         </copy>
+         <delete file="helloworld-client" quiet="true" />
+         <delete file="helloworld-server" quiet="true" />
+         <delete file="debug/helloworld-client.exe" quiet="true" />
+         <delete file="debug/helloworld-server.exe" quiet="true" />
    </target>
 
     <target name="done">

Modified: etch/trunk/examples/helloworld/cpp/build.xml
URL: http://svn.apache.org/viewvc/etch/trunk/examples/helloworld/cpp/build.xml?rev=1518247&r1=1518246&r2=1518247&view=diff
==============================================================================
--- etch/trunk/examples/helloworld/cpp/build.xml (original)
+++ etch/trunk/examples/helloworld/cpp/build.xml Wed Aug 28 15:07:10 2013
@@ -140,15 +140,22 @@
                 <echo>Configuring CMake build</echo>
                 <echo>Using generator: ${cmake.generator}</echo>
                 <echo>Using toolchain file: ${cmake.toolchainfile}</echo>
-                
-                <!-- CMake configuration -->
-                <cmake srcdir="${basedir}" bindir="${basedir}/target/${platform}/${Etch.build.target}"
buildtype="${Etch.build.target}" >
-                    <generator name="${cmake.generator}" />
-                    <variable name="ETCH_HOME" type="PATH" value="${etch.home}" />
-                    <variable name="ETCH_BUILD_TARGET" type="STRING" value="${Etch.build.target}"
/>
-                    <variable name="CMAKE_TOOLCHAIN_FILE" type="FILEPATH" value="${cmake.toolchainfile}"
/>
-                </cmake>
 
+                <mkdir dir="${basedir}/target/${platform}/${build.target}"/>
+
+                <!-- CMake configuration -->
+                <exec dir="${target}/${platform}/${build.target}" executable="cmake" failonerror="true">
+                    <arg value="-G${cmake.generator}"/>
+                    <arg value="-DETCH_HOME:PATH=${etch.home}"/>
+                    <arg value="-DCMAKE_BUILD_TYPE:STRING=${build.target}"/>
+                    <arg value="-DCMAKE_TOOLCHAIN_FILE:FILEPATH=${cmake.toolchainfile}"/>
+                    <arg value="${basedir}"/>
+                </exec>
+
+                <!-- run the build -->
+                <exec dir="${basedir}/target/${platform}/${build.target}" executable="cmake"
failonerror="true">
+                    <arg line="--build . --config ${build.target}"/>
+                </exec>
             </then>
             <else>
                 <!-- try default generator -->
@@ -156,12 +163,20 @@
                 <echo>Using default generator</echo>
                 <echo>Using toolchain file: ${cmake.toolchainfile}</echo>
                 
+                <mkdir dir="${basedir}/target/${platform}/${build.target}"/>
+
                 <!-- CMake configuration -->
-                <cmake srcdir="${basedir}" bindir="${basedir}/target/${platform}/${Etch.build.target}"
buildtype="${Etch.build.target}" >
-                    <variable name="ETCH_INCLUDE_CAPU_DIR" type="PATH" value="${Etch.basedir}/binding-cpp/runtime/lib/capu/deliverable/capu/include/capu"
/>
-                    <variable name="CMAKE_TOOLCHAIN_FILE" type="FILEPATH" value="${cmake.toolchainfile}"
/>
-                    <variable name="ETCH_HOME" type="PATH" value="${etch.home}" />
-                </cmake>
+                <exec dir="${target}/${platform}/${build.target}" executable="cmake" failonerror="true">
+                    <arg value="-DETCH_HOME:PATH=${etch.home}"/>
+                    <arg value="-DCMAKE_BUILD_TYPE:STRING=${build.target}"/>
+                    <arg value="-DCMAKE_TOOLCHAIN_FILE:FILEPATH=${cmake.toolchainfile}"/>
+                    <arg value="${basedir}"/>
+                </exec>
+
+                <!-- run the build -->
+                <exec dir="${basedir}/target/${platform}/${build.target}" executable="cmake"
failonerror="true">
+                    <arg line="--build . --config ${build.target}"/>
+                </exec>
             </else>
         </if>
         
@@ -185,7 +200,7 @@
      ======================
      To run cpp example:
 
-     > cd cpp\target\$Platform\$BuildTarget>
+     > cd cpp\target\${target.platforms}\${build.target}
      > ./helloworld-server.exe
      > ./helloworld-client.exe
 
@@ -195,7 +210,7 @@
 
     <!-- build everything -->
     <target name="init-debug" >
-        <property name="Etch.build.target" value="Debug" />
+        <property name="build.target" value="Debug" />
     </target>
 
     <target name="init-release" >



Mime
View raw message