etch-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vei...@apache.org
Subject svn commit: r1550131 - in /etch/trunk: binding-cpp/runtime/ binding-cpp/runtime/src/main/ binding-cpp/runtime/src/main/common/ binding-cpp/runtime/src/test/ examples/helloworld/cpp/
Date Wed, 11 Dec 2013 13:20:43 GMT
Author: veithm
Date: Wed Dec 11 13:20:43 2013
New Revision: 1550131

URL: http://svn.apache.org/r1550131
Log:
Enabling build for 64bit architectures

The C++ runtime can now be build for 32 and 64 bit architectures.
Therefore the respective CMakefiles have been changed and the
getHashCode() method has been replaced by a real hash function instead
the usage of the this pointer.

Change-Id: Ifbe5565efd7d53c2bb21329e332b8df3133450a4

Modified:
    etch/trunk/binding-cpp/runtime/FindCapu.cmake
    etch/trunk/binding-cpp/runtime/src/main/CMakeLists.txt
    etch/trunk/binding-cpp/runtime/src/main/common/EtchObject.cpp
    etch/trunk/binding-cpp/runtime/src/main/common/EtchObjectType.cpp
    etch/trunk/binding-cpp/runtime/src/test/CMakeLists.txt
    etch/trunk/examples/helloworld/cpp/CMakeLists.txt

Modified: etch/trunk/binding-cpp/runtime/FindCapu.cmake
URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/FindCapu.cmake?rev=1550131&r1=1550130&r2=1550131&view=diff
==============================================================================
--- etch/trunk/binding-cpp/runtime/FindCapu.cmake (original)
+++ etch/trunk/binding-cpp/runtime/FindCapu.cmake Wed Dec 11 13:20:43 2013
@@ -33,7 +33,7 @@ IF ("${CAPU_INCLUDE_DIR}" STREQUAL "" AN
 
     IF ("${LOCAL_CAPU_SOURCE_DIR}" STREQUAL "")
         #download capu from foreign repository
-        SET(CAPU_PROJECT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/3rd/capu")
+        SET(CAPU_PROJECT_DIR "${CMAKE_BINARY_DIR}/3rd/capu")
         SET(CAPU_CMAKE_BUILD_DIR "${CMAKE_BINARY_DIR}/capu")
         
         ExternalProject_Add(

Modified: etch/trunk/binding-cpp/runtime/src/main/CMakeLists.txt
URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/src/main/CMakeLists.txt?rev=1550131&r1=1550130&r2=1550131&view=diff
==============================================================================
--- etch/trunk/binding-cpp/runtime/src/main/CMakeLists.txt (original)
+++ etch/trunk/binding-cpp/runtime/src/main/CMakeLists.txt Wed Dec 11 13:20:43 2013
@@ -240,10 +240,6 @@ add_library (etch-cpp STATIC
 )
 
 
-IF (TARGET_OS STREQUAL "Linux" AND TARGET_ARCH STREQUAL "X86_64") #build only 32 bit
-  set_target_properties (etch-cpp PROPERTIES COMPILE_FLAGS "-m32 -g" LINK_FLAGS "-m32")
-ENDIF ()
-
 set_target_properties (etch-cpp PROPERTIES OUTPUT_NAME "etch")
 
 add_dependencies (etch-cpp Capu)

Modified: etch/trunk/binding-cpp/runtime/src/main/common/EtchObject.cpp
URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/src/main/common/EtchObject.cpp?rev=1550131&r1=1550130&r2=1550131&view=diff
==============================================================================
--- etch/trunk/binding-cpp/runtime/src/main/common/EtchObject.cpp (original)
+++ etch/trunk/binding-cpp/runtime/src/main/common/EtchObject.cpp Wed Dec 11 13:20:43 2013
@@ -17,6 +17,7 @@
  */
 
 #include "common/EtchObject.h"
+#include "capu/container/Hash.h"
 
 const EtchObjectType* EtchObject::TYPE() {
   const static EtchObjectType TYPE(EOTID_OBJECT, NULL);
@@ -52,7 +53,7 @@ capu::bool_t EtchObject::isInstanceOf(co
 }
 
 capu::uint32_t EtchObject::getHashCode() const{
-  return (capu::uint32_t) this;
+  return capu::CapuDefaultHashFunction::Digest(this);
 }
 
 capu::bool_t EtchObject::equals(const EtchObject* other) const{

Modified: etch/trunk/binding-cpp/runtime/src/main/common/EtchObjectType.cpp
URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/src/main/common/EtchObjectType.cpp?rev=1550131&r1=1550130&r2=1550131&view=diff
==============================================================================
--- etch/trunk/binding-cpp/runtime/src/main/common/EtchObjectType.cpp (original)
+++ etch/trunk/binding-cpp/runtime/src/main/common/EtchObjectType.cpp Wed Dec 11 13:20:43
2013
@@ -18,6 +18,7 @@
  * under the License.
  */
 #include "common/EtchObjectType.h"
+#include "capu/container/Hash.h"
 
 const EtchObjectType& EtchObjectType::NATIVE_INT8() {
   static const EtchObjectType type(EOTID_BYTE, NULL);
@@ -75,7 +76,7 @@ capu::int32_t EtchObjectType::getTypeId(
 }
 
 capu::uint32_t EtchObjectType::getHashCode() const {
-  return (capu::uint32_t) this;
+  return capu::CapuDefaultHashFunction::Digest(this);
 }
 
 capu::bool_t EtchObjectType::equals(const EtchObjectType* type) const {

Modified: etch/trunk/binding-cpp/runtime/src/test/CMakeLists.txt
URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/src/test/CMakeLists.txt?rev=1550131&r1=1550130&r2=1550131&view=diff
==============================================================================
--- etch/trunk/binding-cpp/runtime/src/test/CMakeLists.txt (original)
+++ etch/trunk/binding-cpp/runtime/src/test/CMakeLists.txt Wed Dec 11 13:20:43 2013
@@ -120,9 +120,6 @@ IF (TARGET_OS STREQUAL "Windows" AND BUI
   target_link_libraries (etch-cpp-test ${VLD}/lib/vld.lib)
 ENDIF ()
 
-IF (TARGET_OS STREQUAL "Linux" AND TARGET_ARCH STREQUAL "X86_64")
-  set_target_properties (etch-cpp-test PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")
-ENDIF ()
 
 add_dependencies (etch-cpp-test etch-cpp Capu)
 

Modified: etch/trunk/examples/helloworld/cpp/CMakeLists.txt
URL: http://svn.apache.org/viewvc/etch/trunk/examples/helloworld/cpp/CMakeLists.txt?rev=1550131&r1=1550130&r2=1550131&view=diff
==============================================================================
--- etch/trunk/examples/helloworld/cpp/CMakeLists.txt (original)
+++ etch/trunk/examples/helloworld/cpp/CMakeLists.txt Wed Dec 11 13:20:43 2013
@@ -80,9 +80,6 @@ add_executable(etch-cpp-helloworld-serve
 
 IF (TARGET_OS STREQUAL "Linux")
   target_link_libraries(etch-cpp-helloworld-server etch capu pthread rt)
-  IF (TARGET_ARCH STREQUAL "X86_64")
-    set_target_properties(etch-cpp-helloworld-server PROPERTIES COMPILE_FLAGS "-m32 -g" LINK_FLAGS
"-m32")
-  ENDIF()
 ELSEIF(TARGET_OS STREQUAL "Windows")
   target_link_libraries(etch-cpp-helloworld-server etch capu)
   IF (BUILD_CHECK_MEMORY)
@@ -121,9 +118,6 @@ add_executable(etch-cpp-helloworld-clien
 
 IF (TARGET_OS STREQUAL "Linux")
   target_link_libraries(etch-cpp-helloworld-client etch capu pthread rt)
-  IF (TARGET_ARCH STREQUAL "X86_64")
-    set_target_properties(etch-cpp-helloworld-client PROPERTIES COMPILE_FLAGS "-m32 -g" LINK_FLAGS
"-m32")
-  ENDIF()
 ELSEIF(TARGET_OS STREQUAL "Windows")
   target_link_libraries(etch-cpp-helloworld-client etch capu )
   IF (BUILD_CHECK_MEMORY)



Mime
View raw message