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