Skip to content

Commit

Permalink
Merge branch 'master' of github.com:TarsCloud/TarsCpp
Browse files Browse the repository at this point in the history
  • Loading branch information
edisenwangK committed Nov 8, 2023
2 parents 70e84ab + d41c825 commit 5f4b7ad
Show file tree
Hide file tree
Showing 78 changed files with 6,002 additions and 4,885 deletions.
14 changes: 6 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,15 @@ if("${TARS_CPP_COMMON}" STREQUAL "")

endif()

# set(major "")
# set(minor "")
# set(patch "")
# get_version(major minor patch)

# set(TARS_VERSION ${major}.${minor}.${patch})

add_definitions(-DTARS_VERSION="${TARS_VERSION}")

message("TARS_VERSION: ${TARS_VERSION}")

# if(WIN32)
# option(ENABLE_MT "option for /MT" ON)
# include(${PROJECT_SOURCE_DIR}/cmake/compiler_flags_overrides.cmake)
# message("ENABLE_MT: ${ENABLE_MT}")
# endif(WIN32)

set(CLEAR_INCLUDE "clear-install.cmake")
FILE(WRITE ${CLEAR_INCLUDE} "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_INSTALL_PREFIX}/include)\n")
install(SCRIPT ${CLEAR_INCLUDE})
Expand Down
83 changes: 83 additions & 0 deletions Changelist-3.x.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,86 @@
# v3.0.18 20231106
### en
- fix: udp ipv6 bug
- fix: unit-test get fd counts in mac
- fix: udp send/recv bug when multi net threads in communicator
- fix: servanthandle only keep one servant
- fix: cmake /SAFESEH:NO
- fix: cmake -fsigned-char only in unix
- fix: epoll server fd leak in co mode
- fix: tc_logger snprintf compiler warning
- fix: epoll server queue mode in co mode
- fix: cmake CMAKE_INSTALL_PREFIX
- update NotifyF.tars, delete some interface not used
- Optimize the initialization process of Current to improve performance
- feat: Application add: getBindAdapter by obj
- not compiler gtest mock(mac latest gcc gtest can not compiler)
- support arm32 compiler
- support cpu(i686) compiler
- support arm cross compiler(CMAKE_TOOLCHAIN_FILE)

### cn
- 修复: udp ipv6的bug
- 修复: mac下unit-test中fd的计算
- 修复: 多线程的通信器模式下, udp收发包的bug
- 修复: ServantHandle只保留一个Servant, 提高性能
- 修复: cmake /SAFESEH:NO
- 修复: cmake 默认打开-fsigned-char, 避免arm下编译的问题
- 修复: epollserver 在协程模式下句柄的泄露(不影响业务)
- 修复: tc_logger snprintf 中的编译警告
- 修复: epoll server队列模式在协程模式下的bug
- 修复: cmake CMAKE_INSTALL_PREFIX
- 更新NotifyF.tars, 删除了不再使用的接口
- 优化了Current初始化过程, 提高性能
- Application添加根据obj获取BindAdapter的函数: getBindAdapter
- 不再编译gtest mock
- 支持arm32的编译
- 支持cpu为i686的编译
- 支持了arm交叉编译, 支持CMAKE_TOOLCHAIN_FILE
-
# v3.0.17 20231007
### en
- fix remote logger, set _logStatReport default value
- fix time logger crash bug when comm not initialize
- fix cmake clear install
- fix tc_json double bug
- fix commumicator ssl ctx init bug
- fix tc_socket sizeof duplicate bug
- fix push callbak onClose(ep)
- fix http_call request use const
- fix ServantProxy::invoke crash on QiLin OS
- tc_autoptr add staticCast
- open /MT in windows by default
- push callback add onConnected
- tarsregistry update self ip list
- ServantProxy add tars_close, close fd of prx
- hash code type use size_t
- set max tars package size 100M
- add tc_timeout_queue_map(key value cache+queue)
- add tc_socket_async
- Update Contributing.md

### cn
- 修复: 远程日志未设置_logStatReport缺省值的问题
- 修复: 通信器未初始化时, 按天日志可能会crash的问题
- 修复: cmake清除installde问题
- 修复: tc_json double类型解析的bug
- 修复: 通信器ssl ctx初始化的问题
- 修复: tc_socket中使用sizeof有误的问题
- 修复: push callbak中onClose(ep)没有被回调的问题
- 修复: http_call请求参数使用const
- 修复: 在麒麟OS上, ServantProxy::invoke 的 crash
- tc_autoptr 添加 staticCast
- windows编译默认开启/MT
- push callback 添加 onConnected回调
- tarsregistry更新自己的ip list
- ServantProxy 添加了tars_close, 关闭自己的句柄
- hash code 类型统一修改为 size_t
- 最大网络包调整为100M
-
- 添加工具类: tc_timeout_queue_map(key value cache+queue)
- 添加工具类: tc_socket_async
- 修改Contributing.md

# v3.0.16 20230810
### en
- please notice!!!! default value of bool in tars struct set to false
Expand Down
2 changes: 2 additions & 0 deletions Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ If you contributed but cannot find your ID here, please submit PR and add your G
- viest
- YMChenLiye
- zhanleewo
- BeyondWUXF
-
6 changes: 3 additions & 3 deletions cmake/BuildTarsCpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ macro(build_tars_server MODULE DEPS)
target_link_libraries(${MODULE} ${LIB_HTTP2} ${LIB_PROTOBUF})
endif()

if(TARS_GPERF)
target_link_libraries(${MODULE} ${LIB_GPERF})
endif(TARS_GPERF)
# if(TARS_GPERF)
# target_link_libraries(${MODULE} ${LIB_GPERF})
# endif(TARS_GPERF)

SET(MODULE-TGZ "${CMAKE_BINARY_DIR}/${MODULE}.tgz")
SET(RUN_DEPLOY_COMMAND_FILE "${PROJECT_BINARY_DIR}/run-deploy-${MODULE}.cmake")
Expand Down
32 changes: 24 additions & 8 deletions cmake/Common.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


set(TARS_VERSION "3.0.16")
set(TARS_VERSION "3.0.18")
add_definitions(-DTARS_VERSION="${TARS_VERSION}")

set(CMAKE_VERBOSE_MAKEFILE off)
Expand Down Expand Up @@ -40,11 +40,16 @@ option(ONLY_LIB "option for only lib" ON)
#-------------------------------------------------------------

IF (UNIX)
set(CMAKE_INSTALL_PREFIX "/usr/local/tars/cpp" CACHE STRING "set install path" FORCE)
set(INSTALL_PREFIX "/usr/local/tars/cpp" CACHE STRING "set install path" )
ELSE()
set(CMAKE_INSTALL_PREFIX "c:\\tars\\cpp" CACHE STRING "set install path" FORCE)
set(INSTALL_PREFIX "c:/tars/cpp" CACHE STRING "set install path")
ENDIF()

#工程INSTALL目录
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${INSTALL_PREFIX}" CACHE STRING "set install path" FORCE)
endif()

#-------------------------------------------------------------
IF (APPLE)
link_libraries(iconv)
Expand All @@ -60,8 +65,8 @@ ENDIF()

set(PLATFORM)
IF (UNIX)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -std=c++11 -Wno-deprecated -fno-strict-aliasing -Wno-overloaded-virtual")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -fsigned-char")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -fsigned-char -std=c++11 -Wno-deprecated -fno-strict-aliasing -Wno-overloaded-virtual")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-builtin-macro-redefined -D__FILE__='\"$(notdir $(abspath $<))\"'")

set(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -Wall -g")
Expand All @@ -78,19 +83,30 @@ IF (UNIX)

ELSEIF (WIN32)
set(PLATFORM "window")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4101 /wd4244 /wd4996 /wd4091 /wd4503 /wd4819 /wd4200 /wd4800 /wd4267 /wd4834 /wd4267")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /bigobj " )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8 /wd4101 /wd4244 /wd4996 /wd4091 /wd4503 /wd4819 /wd4200 /wd4800 /wd4267 /wd4251 /wd4275")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /bigobj" )

SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
SET (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO")

#Release生成PDB
SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /OPT:ICF /OPT:REF /DEBUG")
SET(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} /DEBUG")
SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /OPT:ICF /OPT:REF /DEBUG")

ELSE ()
MESSAGE(STATUS "================ ERROR: This platform is unsupported!!! ================")
ENDIF (UNIX)

#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char")

IF (WIN32)
add_definitions(-DNOMINMAX)
ENDIF ()

#-------------------------------------------------------------
set(TARS2CPP "${CMAKE_BINARY_DIR}/bin/tars2cpp")
set(TARS2CPP "${CMAKE_BINARY_DIR}/bin/tars2cpp" CACHE STRING "set tars2cpp")

message("----------------------------------------------------")
message("CMAKE_SOURCE_DIR: ${CMAKE_SOURCE_DIR}")
Expand Down
2 changes: 2 additions & 0 deletions cmake/ParseAsm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ set(CPU_STR "combined")

if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i386")
set(CPU_STR "i386")
elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i686")
set(CPU_STR "i386")
elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
set(CPU_STR "x86_64")
elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64")
Expand Down
Loading

0 comments on commit 5f4b7ad

Please sign in to comment.