Skip to content

Commit

Permalink
compiler add -fsigned-char
Browse files Browse the repository at this point in the history
  • Loading branch information
ruanshudong committed Oct 12, 2023
1 parent 88cf550 commit 04f433c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cmake/Common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,12 @@ 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")

Expand Down
2 changes: 1 addition & 1 deletion servant/makefile/makefile.tars
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ TARS_PATH :=/usr/local/tars/cpp

CC = gcc
CXX = g++
CFLAGS += -std=c++11 -g -O2 -Wno-deprecated -Wall
CFLAGS += -std=c++11 -g -O2 -Wno-deprecated -Wall -fsigned-char

#-------------------------------------------------------------------------------

Expand Down
2 changes: 2 additions & 0 deletions servant/makefile/tars-tools.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ ELSE ()
MESSAGE(STATUS "================ ERROR: This platform is unsupported!!! ================")
ENDIF (UNIX)

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

set(TARS_RELEASE "${PROJECT_BINARY_DIR}/run-release.cmake")
FILE(WRITE ${TARS_RELEASE} "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E echo release all)\n")

Expand Down
6 changes: 6 additions & 0 deletions unit-test/rpc/test_proxy_timeout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,28 @@ TEST_F(HelloTest, proxyInvokeTimeout)
checkSyncTimeout(comm);
}, c.get());

LOG_CONSOLE_DEBUG << endl;

transInCoroutineGlobalCommunicator([&](Communicator *comm){
checkSyncTimeout(comm);
}, c.get());

LOG_CONSOLE_DEBUG << endl;
transServerCommunicator([&](Communicator *comm){
checkSyncTimeout(comm);
});

LOG_CONSOLE_DEBUG << endl;
transInCoroutineServerCommunicator([&](Communicator *comm){
checkSyncTimeout(comm);
});

LOG_CONSOLE_DEBUG << endl;
transAllocCommunicator([&](Communicator *comm){
checkSyncTimeout(comm);
});

LOG_CONSOLE_DEBUG << endl;
transInCoroutineAllocCommunicator([&](Communicator *comm){
checkSyncTimeout(comm);
});
Expand Down

0 comments on commit 04f433c

Please sign in to comment.