diff options
Diffstat (limited to 'src/3rd_party')
5 files changed, 51 insertions, 46 deletions
diff --git a/src/3rd_party/CMakeLists.txt b/src/3rd_party/CMakeLists.txt index b97c05f7f9..bdb96de417 100644 --- a/src/3rd_party/CMakeLists.txt +++ b/src/3rd_party/CMakeLists.txt @@ -30,8 +30,8 @@ include("./set_3rd_party_paths.cmake") -set(3RD_PARTY_SOURCE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) -set(3RD_PARTY_BINARY_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +set(3RD_PARTY_SOURCE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) +set(3RD_PARTY_BINARY_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) set (install-3rd_party_logger_var "") @@ -44,17 +44,14 @@ if(FORCE_3RD_PARTY) message(FATAL_ERROR "Please don't turn on both FORCE_3RD_PARTY and NO_REBUILD_3RD_PARTY at the same time.") else() set(FORCE_3RD_PARTY_LOGGER ON) - set(FORCE_3RD_PARTY_DBUS ON) endif() endif() -if(ENABLE_LOG OR HMI_DBUS_API) +if(ENABLE_LOG) # --- libexpat add_subdirectory(expat-2.1.0) set(EXPAT_LIBS_DIRECTORY ${3RD_PARTY_INSTALL_PREFIX_ARCH}/lib PARENT_SCOPE) -endif() -if(ENABLE_LOG) if(NO_REBUILD_3RD_PARTY_LOGGER) message(STATUS "Not rebuilding logger.") else() @@ -205,36 +202,41 @@ else() get_filename_component(EMHASHMAP_LIBS_DIRECTORY ${EMHASHMAP_LIB} DIRECTORY) set(BSON_LIBS_DIRECTORY ${BSON_LIBS_DIRECTORY} CACHE INTERNAL "Installation path of bson libraries" FORCE) set(EMHASHMAP_LIBS_DIRECTORY ${BSON_LIBS_DIRECTORY} CACHE INTERNAL "Installation path of emashmap libraries" FORCE) + add_custom_target( + libbson + DEPENDS ${BSON_LIBS_DIRECTORY} + DEPENDS ${EMHASHMAP_LIBS_DIRECTORY} + ) endif() -if (HMIADAPTER STREQUAL "messagebroker") - find_package(Boost 1.66.0 COMPONENTS system) - set(BOOST_LIB_SOURCE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/boost_src) - set(BOOST_LIBS_DIRECTORY ${3RD_PARTY_INSTALL_PREFIX}/lib) - SET_PROPERTY(GLOBAL PROPERTY GLOBAL_BOOST_LIBS ${BOOST_LIBS_DIRECTORY}) - set(BOOST_INCLUDE_DIRECTORY ${3RD_PARTY_INSTALL_PREFIX}/include ) - if (NOT ${Boost_FOUND}) - message(STATUS "Did not find boost. Downloading and installing boost 1.66") - set(BOOST_INSTALL_COMMAND ./b2 install) - if (${3RD_PARTY_INSTALL_PREFIX} MATCHES "/usr/local") - set(BOOST_INSTALL_COMMAND sudo ./b2 install) - endif() - include(ExternalProject) - ExternalProject_Add( - Boost - URL https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz - DOWNLOAD_DIR ${BOOST_LIB_SOURCE_DIRECTORY} - SOURCE_DIR ${BOOST_LIB_SOURCE_DIRECTORY} - CONFIGURE_COMMAND ./bootstrap.sh --with-libraries=system --prefix=${3RD_PARTY_INSTALL_PREFIX} - BUILD_COMMAND ./b2 - INSTALL_COMMAND ${BOOST_INSTALL_COMMAND} --with-system --prefix=${3RD_PARTY_INSTALL_PREFIX} - INSTALL_DIR ${3RD_PARTY_INSTALL_PREFIX} - BUILD_IN_SOURCE true - ) - - set(BOOST_INCLUDE_DIR ${BOOST_ROOT_DIR}/Boost-prefix/src/Boost) - set(BOOST_LIB_DIR ${BOOST_ROOT_DIR}/Boost-prefix/src/Boost/stage/lib/) +find_package(Boost 1.66.0 COMPONENTS system thread date_time filesystem) +set(BOOST_LIB_SOURCE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/boost_src) +set(BOOST_LIBS_DIRECTORY ${3RD_PARTY_INSTALL_PREFIX}/lib) +SET_PROPERTY(GLOBAL PROPERTY GLOBAL_BOOST_LIBS ${BOOST_LIBS_DIRECTORY}) +set(BOOST_INCLUDE_DIRECTORY ${3RD_PARTY_INSTALL_PREFIX}/include ) +if (NOT ${Boost_FOUND}) + message(STATUS "Did not find boost. Downloading and installing boost 1.66") + set(BOOST_INSTALL_COMMAND ./b2 install) + if (${3RD_PARTY_INSTALL_PREFIX} MATCHES "/usr/local") + set(BOOST_INSTALL_COMMAND sudo ./b2 install) endif() + include(ExternalProject) + ExternalProject_Add( + Boost + URL https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz + DOWNLOAD_DIR ${BOOST_LIB_SOURCE_DIRECTORY} + SOURCE_DIR ${BOOST_LIB_SOURCE_DIRECTORY} + CONFIGURE_COMMAND ./bootstrap.sh --with-libraries=system,thread,date_time,filesystem --prefix=${3RD_PARTY_INSTALL_PREFIX} + BUILD_COMMAND ./b2 + INSTALL_COMMAND ${BOOST_INSTALL_COMMAND} --with-system --with-thread --with-date_time --with-filesystem --prefix=${3RD_PARTY_INSTALL_PREFIX} > boost_install.log + INSTALL_DIR ${3RD_PARTY_INSTALL_PREFIX} + BUILD_IN_SOURCE true + ) + + set(BOOST_INCLUDE_DIR ${BOOST_ROOT_DIR}/Boost-prefix/src/Boost) + set(BOOST_LIB_DIR ${BOOST_ROOT_DIR}/Boost-prefix/src/Boost/stage/lib/) +else() +add_custom_target(Boost) # empty target, Boost is already installed endif() add_custom_target(install-3rd_party @@ -243,4 +245,3 @@ add_custom_target(install-3rd_party DEPENDS Boost WORKING_DIRECTORY ${3RD_PARTY_BINARY_DIRECTORY} ) - diff --git a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/locationinfo.cpp b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/locationinfo.cpp index db058d27bd..654f9b0eb8 100644 --- a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/locationinfo.cpp +++ b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/locationinfo.cpp @@ -150,7 +150,7 @@ void LocationInfo::write(ObjectOutputStream& os, Pool& p) const { if (lineNumber == -1 && fileName == NA && methodName == NA_METHOD) { os.writeNull(p); } else { - char prolog[] = { + unsigned char prolog[] = { 0x72, 0x00, 0x21, 0x6F, 0x72, 0x67, 0x2E, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2E, 0x6C, 0x6F, 0x67, 0x34, 0x6A, 0x2E, 0x73, 0x70, 0x69, @@ -163,7 +163,7 @@ void LocationInfo::write(ObjectOutputStream& os, Pool& p) const { 0x61, 0x76, 0x61, 0x2F, 0x6C, 0x61, 0x6E, 0x67, 0x2F, 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x3B, 0x78, 0x70 }; - os.writeProlog("org.apache.log4j.spi.LocationInfo", 2, prolog, sizeof(prolog), p); + os.writeProlog("org.apache.log4j.spi.LocationInfo", 2, reinterpret_cast<char *>(prolog), sizeof(prolog), p); char* line = p.itoa(lineNumber); // // construct Java-like fullInfo (replace "::" with ".") diff --git a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/loggingevent.cpp b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/loggingevent.cpp index 58b2004216..f9730792cf 100644 --- a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/loggingevent.cpp +++ b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/loggingevent.cpp @@ -256,7 +256,7 @@ void LoggingEvent::setProperty(const LogString& key, const LogString& value) void LoggingEvent::writeProlog(ObjectOutputStream& os, Pool& p) { - char classDesc[] = { + unsigned char classDesc[] = { 0x72, 0x00, 0x21, 0x6F, 0x72, 0x67, 0x2E, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2E, 0x6C, 0x6F, 0x67, 0x34, 0x6A, @@ -312,7 +312,7 @@ void LoggingEvent::writeProlog(ObjectOutputStream& os, Pool& p) { 0x3B, 0x78, 0x70 }; os.writeProlog("org.apache.log4j.spi.LoggingEvent", - 8, classDesc, sizeof(classDesc), p); + 8, reinterpret_cast<char *>(classDesc), sizeof(classDesc), p); } void LoggingEvent::write(helpers::ObjectOutputStream& os, Pool& p) const { diff --git a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/objectoutputstream.cpp b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/objectoutputstream.cpp index 7cd696b842..29412c1a67 100644 --- a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/objectoutputstream.cpp +++ b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/objectoutputstream.cpp @@ -13,6 +13,8 @@ * 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. + * + * Note: This file has been modified from its original form. */ #if defined(_MSC_VER) #pragma warning ( disable: 4231 4251 4275 4786 ) @@ -36,8 +38,8 @@ ObjectOutputStream::ObjectOutputStream(OutputStreamPtr outputStream, Pool& p) objectHandle(0x7E0000), classDescriptions(new ClassDescriptionMap()) { - char start[] = { 0xAC, 0xED, 0x00, 0x05 }; - ByteBuffer buf(start, sizeof(start)); + unsigned char start[] = { 0xAC, 0xED, 0x00, 0x05 }; + ByteBuffer buf(reinterpret_cast<char *>(start), sizeof(start)); os->write(buf, p); } @@ -81,7 +83,7 @@ void ObjectOutputStream::writeObject(const MDC::Map& val, Pool& p) { // // TC_OBJECT and the classDesc for java.util.Hashtable // - char prolog[] = { + unsigned char prolog[] = { 0x72, 0x00, 0x13, 0x6A, 0x61, 0x76, 0x61, 0x2E, 0x75, 0x74, 0x69, 0x6C, 0x2E, 0x48, 0x61, 0x73, 0x68, 0x74, 0x61, 0x62, 0x6C, 0x65, 0x13, @@ -90,7 +92,7 @@ void ObjectOutputStream::writeObject(const MDC::Map& val, Pool& p) { 0x64, 0x46, 0x61, 0x63, 0x74, 0x6F, 0x72, 0x49, 0x00, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6F, 0x6C, 0x64, 0x78, 0x70 }; - writeProlog("java.util.Hashtable", 1, prolog, sizeof(prolog), p); + writeProlog("java.util.Hashtable", 1, reinterpret_cast<char *>(prolog), sizeof(prolog), p); // // loadFactor = 0.75, threshold = 5, blockdata start, buckets.size = 7 char data[] = { 0x3F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, diff --git a/src/3rd_party/apache-log4cxx-0.10.0/src/test/cpp/xml/domtestcase.cpp b/src/3rd_party/apache-log4cxx-0.10.0/src/test/cpp/xml/domtestcase.cpp index a500628180..903646048f 100644 --- a/src/3rd_party/apache-log4cxx-0.10.0/src/test/cpp/xml/domtestcase.cpp +++ b/src/3rd_party/apache-log4cxx-0.10.0/src/test/cpp/xml/domtestcase.cpp @@ -13,6 +13,8 @@ * 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. + * + * Note: This file has been modified from its original form. */ @@ -190,9 +192,9 @@ public: DOMConfigurator::configure(LOG4CXX_TEST_STR("input/xml/DOMTestCase3.xml")); LOG4CXX_INFO(logger, "File name is expected to end with a superscript 3"); #if LOG4CXX_LOGCHAR_IS_UTF8 - const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xC2, 0xB3, 0 }; + const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, static_cast<logchar>(0xC2), static_cast<logchar>(0xB3), 0 }; #else - const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xB3, 0 }; + const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, static_cast<logchar>(0xB3), 0 }; #endif File file; file.setPath(fname); @@ -209,9 +211,9 @@ public: DOMConfigurator::configure(LOG4CXX_TEST_STR("input/xml/DOMTestCase4.xml")); LOG4CXX_INFO(logger, "File name is expected to end with an ideographic 4"); #if LOG4CXX_LOGCHAR_IS_UTF8 - const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xE3, 0x86, 0x95, 0 }; + const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, static_cast<logchar>(0xE3), static_cast<logchar>(0x86), static_cast<logchar>(0x95), 0 }; #else - const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0x3195, 0 }; + const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, static_cast<logchar>(0x3195), 0 }; #endif File file; file.setPath(fname); |