1# Copyright 2022 Meta 2# SPDX-License-Identifier: Apache-2.0 3 4if(CONFIG_THRIFT) 5 6zephyr_library() 7 8zephyr_library_include_directories( 9 src 10 include 11 ${ZEPHYR_THRIFT_MODULE_DIR}/lib/cpp/src 12) 13 14zephyr_library_sources( 15 src/thrift/server/TFDServer.cpp 16 ${ZEPHYR_THRIFT_MODULE_DIR}/lib/cpp/src/thrift/protocol/TProtocol.cpp 17 ${ZEPHYR_THRIFT_MODULE_DIR}/lib/cpp/src/thrift/server/TConnectedClient.cpp 18 ${ZEPHYR_THRIFT_MODULE_DIR}/lib/cpp/src/thrift/server/TSimpleServer.cpp 19 ${ZEPHYR_THRIFT_MODULE_DIR}/lib/cpp/src/thrift/transport/SocketCommon.cpp 20 ${ZEPHYR_THRIFT_MODULE_DIR}/lib/cpp/src/thrift/transport/TBufferTransports.cpp 21 ${ZEPHYR_THRIFT_MODULE_DIR}/lib/cpp/src/thrift/transport/TFDTransport.cpp 22 ${ZEPHYR_THRIFT_MODULE_DIR}/lib/cpp/src/thrift/transport/TTransportException.cpp 23 ${ZEPHYR_THRIFT_MODULE_DIR}/lib/cpp/src/thrift/transport/TServerSocket.cpp 24 ${ZEPHYR_THRIFT_MODULE_DIR}/lib/cpp/src/thrift/transport/TSocket.cpp 25 ${ZEPHYR_THRIFT_MODULE_DIR}/lib/cpp/src/thrift/TApplicationException.cpp 26 ${ZEPHYR_THRIFT_MODULE_DIR}/lib/cpp/src/thrift/TOutput.cpp 27 28 # Replace with upstream equivalents when Zephyr's std::thread, etc, are fixed 29 src/thrift/concurrency/Mutex.cpp 30 src/thrift/server/TServerFramework.cpp 31) 32 33zephyr_library_sources_ifdef(CONFIG_THRIFT_SSL_SOCKET 34 # Replace with upstream equivalents when Zephyr's std::thread, etc, are fixed 35 src/thrift/transport/TSSLSocket.cpp 36 src/thrift/transport/TSSLServerSocket.cpp 37) 38 39# needed because std::iterator was deprecated with -std=c++17 40zephyr_library_compile_options(-Wno-deprecated-declarations) 41 42# needed for ctime_r 43zephyr_library_compile_definitions(_POSIX_C_SOURCE=200809L) 44 45endif(CONFIG_THRIFT) 46