Author: veithm Date: Fri May 15 15:05:38 2015 New Revision: 1679585 URL: http://svn.apache.org/r1679585 Log: Update to CAPU v0.19.0
CAPU 0.19.0 provides bug fixes and improvements listed here: https://github.com/bmwcarit/capu/releases Change-Id: I28ccc1e5549337aa81946db20a6847d9fbbd0a8b Modified: etch/trunk/binding-cpp/runtime/CMakeLists.txt etch/trunk/binding-cpp/runtime/FindCapu.cmake etch/trunk/binding-cpp/runtime/include/common/EtchHashNative.h etch/trunk/binding-cpp/runtime/include/common/EtchSocket.h 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/main/common/EtchSocket.cpp etch/trunk/binding-cpp/runtime/src/test/CMakeLists.txt etch/trunk/binding-cpp/runtime/src/test/support/EtchRuntimeTest.cpp etch/trunk/examples/helloworld/cpp/CMakeLists.txt Modified: etch/trunk/binding-cpp/runtime/CMakeLists.txt URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/CMakeLists.txt?rev=1679585&r1=1679584&r2=1679585&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/CMakeLists.txt (original) +++ etch/trunk/binding-cpp/runtime/CMakeLists.txt Fri May 15 15:05:38 2015 @@ -75,8 +75,8 @@ ENDIF() #install capu headers and library INSTALL(DIRECTORY ${LIBCAPU_INCLUDE_DIR}/capu DESTINATION "${ETCH_INSTALL_DIR}/include") -INSTALL(DIRECTORY ${LIBCAPU_LIBRARY_DIR}/ DESTINATION "${ETCH_INSTALL_DIR}/lib/${ETCH_TARGET_PLATFORM}/${CMAKE_BUILD_TYPE}" FILES_MATCHING PATTERN "*capu*" PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ) +INSTALL(DIRECTORY ${LIBCAPU_LIBRARY_DIR}/ DESTINATION "${ETCH_INSTALL_DIR}/lib/${ETCH_TARGET_PLATFORM}/${CMAKE_BUILD_TYPE}" FILES_MATCHING PATTERN "*Capu*" PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ) IF (NOT ${LIBCAPU_BINARY_DIR} STREQUAL "") - INSTALL(DIRECTORY ${LIBCAPU_BINARY_DIR} DESTINATION "${ETCH_INSTALL_DIR}/bin/${ETCH_TARGET_PLATFORM}/${CMAKE_BUILD_TYPE}" FILES_MATCHING PATTERN "capuTest*" PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ) + INSTALL(DIRECTORY ${LIBCAPU_BINARY_DIR} DESTINATION "${ETCH_INSTALL_DIR}/bin/${ETCH_TARGET_PLATFORM}/${CMAKE_BUILD_TYPE}" FILES_MATCHING PATTERN "CapuTest*" PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ) ENDIF() Modified: etch/trunk/binding-cpp/runtime/FindCapu.cmake URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/FindCapu.cmake?rev=1679585&r1=1679584&r2=1679585&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/FindCapu.cmake (original) +++ etch/trunk/binding-cpp/runtime/FindCapu.cmake Fri May 15 15:05:38 2015 @@ -28,25 +28,23 @@ ENDIF() IF ("${CAPU_INCLUDE_DIR}" STREQUAL "" AND "${CAPU_LIBRARY_DIR}" STREQUAL "") include(ExternalProject) - MESSAGE(STATUS "using ${CAPU_INCLUDE_DIR} as CAPU include directory") - MESSAGE(STATUS "using ${CAPU_LIBRARY_DIR} as CAPU library directory") - IF ("${LOCAL_CAPU_SOURCE_DIR}" STREQUAL "") #download capu from foreign repository + MESSAGE("Download capu from github repository") SET(CAPU_PROJECT_DIR "${CMAKE_BINARY_DIR}/3rd/capu") SET(CAPU_CMAKE_BUILD_DIR "${CAPU_BUILD_DIR}/${TARGET_OS}_${TARGET_ARCH}") - + SET(CAPU_INSTALL_DIR ${CAPU_BUILD_DIR}/deliverable) ExternalProject_Add( - Capu - URL https://github.com/bmwcarit/capu/archive/v0.14.0.zip + Capu_external + URL https://github.com/bmwcarit/capu/archive/v0.19.0.zip SOURCE_DIR "${CAPU_PROJECT_DIR}" BINARY_DIR "${CAPU_CMAKE_BUILD_DIR}" - INSTALL_DIR "${CAPU_BUILD_DIR}/deliverable" + INSTALL_DIR "${CAPU_INSTALL_DIR}" UPDATE_COMMAND "" CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE:PATH=${CMAKE_TOOLCHAIN_FILE} - -DCMAKE_INSTALL_PREFIX:STRING=${CAPU_BUILD_DIR}/deliverable/${TARGET_OS}_${TARGET_ARCH}/${CMAKE_BUILD_TYPE} -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} - -DCONFIG_BUILD_UNITTESTS:BOOLEAN=${CONFIG_BUILD_UNITTESTS} + -DCapu_BUILD_TESTS:BOOLEAN=${CONFIG_BUILD_UNITTESTS} + -DCMAKE_INSTALL_PREFIX:PATH=${CAPU_INSTALL_DIR} INSTALL 1 ) ELSE() @@ -54,25 +52,23 @@ IF ("${CAPU_INCLUDE_DIR}" STREQUAL "" AN SET(CAPU_CMAKE_BUILD_DIR "${CAPU_BUILD_DIR}/${TARGET_OS}_${TARGET_ARCH}") ExternalProject_Add( - Capu + Capu_external SOURCE_DIR "${CAPU_PROJECT_DIR}" BINARY_DIR "${CAPU_CMAKE_BUILD_DIR}" DOWNLOAD_COMMAND "" UPDATE_COMMAND "" - INSTALL_DIR "${CAPU_BUILD_DIR}/deliverable" + INSTALL_DIR "${CAPU_INSTALL_DIR}" CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE:PATH=${CMAKE_TOOLCHAIN_FILE} - -DCMAKE_INSTALL_PREFIX:STRING=${CAPU_BUILD_DIR}/deliverable/${TARGET_OS}_${TARGET_ARCH}/${CMAKE_BUILD_TYPE} -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} - -DCONFIG_BUILD_UNITTESTS:BOOL=${CONFIG_BUILD_UNITTESTS} + -DCapu_BUILD_TESTS:BOOL=${CONFIG_BUILD_UNITTESTS} + -DCMAKE_INSTALL_PREFIX:PATH=${CAPU_INSTALL_DIR} INSTALL 1 ) ENDIF() - SET(CAPU_DELIVERABLE_DIR ${CAPU_BUILD_DIR}/deliverable/${TARGET_OS}_${TARGET_ARCH}/${CMAKE_BUILD_TYPE}) - - SET(LIBCAPU_INCLUDE_DIR ${CAPU_DELIVERABLE_DIR}/include) - SET(LIBCAPU_LIBRARY_DIR ${CAPU_DELIVERABLE_DIR}/lib) - SET(LIBCAPU_BINARY_DIR ${CAPU_DELIVERABLE_DIR}/bin) + SET(LIBCAPU_INCLUDE_DIR ${CAPU_INSTALL_DIR}/include) + SET(LIBCAPU_LIBRARY_DIR ${CAPU_INSTALL_DIR}/lib) + SET(LIBCAPU_BINARY_DIR ${CAPU_INSTALL_DIR}/bin) ELSE() SET(LIBCAPU_INCLUDE_DIR ${CAPU_INCLUDE_DIR}) SET(LIBCAPU_LIBRARY_DIR ${CAPU_LIBRARY_DIR}) Modified: etch/trunk/binding-cpp/runtime/include/common/EtchHashNative.h URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/include/common/EtchHashNative.h?rev=1679585&r1=1679584&r2=1679585&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/include/common/EtchHashNative.h (original) +++ etch/trunk/binding-cpp/runtime/include/common/EtchHashNative.h Fri May 15 15:05:38 2015 @@ -27,15 +27,15 @@ public: template<class T> static capu::uint_t Digest(T &key, const capu::uint8_t bitSize) { - return capu::CapuDefaultHashFunction::Digest<T>(key, bitSize); + return capu::CapuDefaultHashFunction<sizeof(capu::uint_t)*8>::Digest<T>(key, bitSize); } static capu::uint_t Digest(char* key, const capu::uint8_t bitSize) { - return capu::CapuDefaultHashFunction::Digest(key, bitSize); + return capu::CapuDefaultHashFunction<sizeof(capu::uint_t)*8>::Digest(key, bitSize); } static capu::uint_t Digest(const char* key, const capu::uint8_t bitSize) { - return capu::CapuDefaultHashFunction::Digest(key, bitSize); + return capu::CapuDefaultHashFunction<sizeof(capu::uint_t)*8>::Digest(key, bitSize); } }; Modified: etch/trunk/binding-cpp/runtime/include/common/EtchSocket.h URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/include/common/EtchSocket.h?rev=1679585&r1=1679584&r2=1679585&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/include/common/EtchSocket.h (original) +++ etch/trunk/binding-cpp/runtime/include/common/EtchSocket.h Fri May 15 15:05:38 2015 @@ -151,7 +151,7 @@ public: * ETCH_SOCKET_ESOCKET if the socket is not created * ETCH_ERROR otherwise */ - status_t getLingerOption(capu::bool_t& isLinger, capu::int32_t& linger); + status_t getLingerOption(capu::bool_t& isLinger, capu::uint16_t& linger); /** * Get no delay option 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=1679585&r1=1679584&r2=1679585&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/src/main/CMakeLists.txt (original) +++ etch/trunk/binding-cpp/runtime/src/main/CMakeLists.txt Fri May 15 15:05:38 2015 @@ -242,7 +242,7 @@ add_library (etch-cpp STATIC set_target_properties (etch-cpp PROPERTIES OUTPUT_NAME "etch") -add_dependencies (etch-cpp Capu) +add_dependencies (etch-cpp Capu_external) #install etch headers and library INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/include DESTINATION "${ETCH_INSTALL_DIR}") 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=1679585&r1=1679584&r2=1679585&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/src/main/common/EtchObject.cpp (original) +++ etch/trunk/binding-cpp/runtime/src/main/common/EtchObject.cpp Fri May 15 15:05:38 2015 @@ -53,7 +53,7 @@ capu::bool_t EtchObject::isInstanceOf(co } capu::uint32_t EtchObject::getHashCode() const{ - return capu::CapuDefaultHashFunction::Digest(this); + return capu::CapuDefaultHashFunction<sizeof(capu::uint_t)*8>::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=1679585&r1=1679584&r2=1679585&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/src/main/common/EtchObjectType.cpp (original) +++ etch/trunk/binding-cpp/runtime/src/main/common/EtchObjectType.cpp Fri May 15 15:05:38 2015 @@ -76,7 +76,7 @@ capu::int32_t EtchObjectType::getTypeId( } capu::uint32_t EtchObjectType::getHashCode() const { - return capu::CapuDefaultHashFunction::Digest(this); + return capu::CapuDefaultHashFunction<sizeof(capu::uint_t)*8>::Digest(this); } capu::bool_t EtchObjectType::equals(const EtchObjectType* type) const { Modified: etch/trunk/binding-cpp/runtime/src/main/common/EtchSocket.cpp URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/src/main/common/EtchSocket.cpp?rev=1679585&r1=1679584&r2=1679585&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/src/main/common/EtchSocket.cpp (original) +++ etch/trunk/binding-cpp/runtime/src/main/common/EtchSocket.cpp Fri May 15 15:05:38 2015 @@ -89,7 +89,7 @@ status_t EtchSocket::getKeepAlive(capu:: return mSocket->getKeepAlive(keepAlive); } -status_t EtchSocket::getLingerOption(capu::bool_t& isLinger, capu::int32_t& linger) { +status_t EtchSocket::getLingerOption(capu::bool_t& isLinger, capu::uint16_t& linger) { return mSocket->getLingerOption(isLinger, linger); } 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=1679585&r1=1679584&r2=1679585&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/src/test/CMakeLists.txt (original) +++ etch/trunk/binding-cpp/runtime/src/test/CMakeLists.txt Fri May 15 15:05:38 2015 @@ -105,15 +105,15 @@ add_executable (etch-cpp-test ) IF (TARGET_OS STREQUAL "Linux") - target_link_libraries (etch-cpp-test etch-cpp capu pthread rt) + target_link_libraries (etch-cpp-test etch-cpp Capu pthread rt) ELSEIF(TARGET_OS STREQUAL "Windows") - target_link_libraries (etch-cpp-test etch-cpp capu) + target_link_libraries (etch-cpp-test etch-cpp Capu) ELSEIF(TARGET_OS STREQUAL "QNX") - target_link_libraries (etch-cpp-test etch-cpp capu c socket) + target_link_libraries (etch-cpp-test etch-cpp Capu c socket) ELSEIF(TARGET_OS STREQUAL "MacOSX") - target_link_libraries (etch-cpp-test etch-cpp capu) + target_link_libraries (etch-cpp-test etch-cpp Capu) ELSEIF(TARGET_OS STREQUAL "iPhoneSimulatorOS") - target_link_libraries (etch-cpp-test etch-cpp capu) + target_link_libraries (etch-cpp-test etch-cpp Capu) ENDIF() IF (TARGET_OS STREQUAL "Windows" AND BUILD_CHECK_MEMORY) @@ -125,7 +125,7 @@ IF (TARGET_OS STREQUAL "Windows" AND BUI ENDIF () -add_dependencies (etch-cpp-test etch-cpp Capu) +add_dependencies (etch-cpp-test etch-cpp Capu_external) #install test executables INSTALL(TARGETS etch-cpp-test DESTINATION "${ETCH_INSTALL_DIR}/bin/${ETCH_TARGET_PLATFORM}/Release" CONFIGURATIONS Release) Modified: etch/trunk/binding-cpp/runtime/src/test/support/EtchRuntimeTest.cpp URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/src/test/support/EtchRuntimeTest.cpp?rev=1679585&r1=1679584&r2=1679585&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/src/test/support/EtchRuntimeTest.cpp (original) +++ etch/trunk/binding-cpp/runtime/src/test/support/EtchRuntimeTest.cpp Fri May 15 15:05:38 2015 @@ -25,6 +25,8 @@ public: virtual ~MockLogAppender() {}; MOCK_METHOD1(log, void(const capu::LogMessage& message)); + MOCK_METHOD0(getLogLevel, capu::ELogLevel()); + MOCK_METHOD1(setLogLevel, void(const capu::ELogLevel level)); }; Modified: etch/trunk/examples/helloworld/cpp/CMakeLists.txt URL: http://svn.apache.org/viewvc/etch/trunk/examples/helloworld/cpp/CMakeLists.txt?rev=1679585&r1=1679584&r2=1679585&view=diff ============================================================================== --- etch/trunk/examples/helloworld/cpp/CMakeLists.txt (original) +++ etch/trunk/examples/helloworld/cpp/CMakeLists.txt Fri May 15 15:05:38 2015 @@ -81,9 +81,9 @@ add_executable(etch-cpp-helloworld-serve IF (TARGET_OS STREQUAL "Linux") - target_link_libraries(etch-cpp-helloworld-server etch capu pthread rt) + target_link_libraries(etch-cpp-helloworld-server etch Capu pthread rt) ELSEIF(TARGET_OS STREQUAL "Windows") - target_link_libraries(etch-cpp-helloworld-server etch capu) + target_link_libraries(etch-cpp-helloworld-server etch Capu) IF (BUILD_CHECK_MEMORY) add_definitions(-DBUILD_CHECK_MEMORY) include_directories (${VLD}/include) @@ -94,7 +94,7 @@ ELSEIF(TARGET_OS STREQUAL "Windows") target_link_libraries (etch-cpp-helloworld-server ${VLD}/lib/Win32/vld.lib) ENDIF (BUILD_CHECK_MEMORY) ELSEIF(TARGET_OS STREQUAL "QNX") - target_link_libraries (etch-cpp-helloworld-server etch capu c socket) + target_link_libraries (etch-cpp-helloworld-server etch Capu c socket) ENDIF() set_target_properties(etch-cpp-helloworld-server PROPERTIES OUTPUT_NAME "helloworld-server") @@ -122,9 +122,9 @@ add_executable(etch-cpp-helloworld-clien ) IF (TARGET_OS STREQUAL "Linux") - target_link_libraries(etch-cpp-helloworld-client etch capu pthread rt) + target_link_libraries(etch-cpp-helloworld-client etch Capu pthread rt) ELSEIF(TARGET_OS STREQUAL "Windows") - target_link_libraries(etch-cpp-helloworld-client etch capu ) + target_link_libraries(etch-cpp-helloworld-client etch Capu ) IF (BUILD_CHECK_MEMORY) add_definitions(-DBUILD_CHECK_MEMORY) include_directories (${VLD}/include) @@ -135,7 +135,7 @@ ELSEIF(TARGET_OS STREQUAL "Windows") target_link_libraries (etch-cpp-helloworld-client ${VLD}/lib/Win32/vld.lib) ENDIF (BUILD_CHECK_MEMORY) ELSEIF(TARGET_OS STREQUAL "QNX") - target_link_libraries (etch-cpp-helloworld-client etch capu c socket) + target_link_libraries (etch-cpp-helloworld-client etch Capu c socket) ENDIF() set_target_properties(etch-cpp-helloworld-client PROPERTIES OUTPUT_NAME "helloworld-client")
