From bd46875b2f237ed2e5738ba820f96f1b7b4c3187 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 15 May 2019 11:22:51 +0800 Subject: [PATCH] add master_mode --- server/wsproxy/CMakeLists.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/server/wsproxy/CMakeLists.txt b/server/wsproxy/CMakeLists.txt index 1a88675..bf8ac61 100644 --- a/server/wsproxy/CMakeLists.txt +++ b/server/wsproxy/CMakeLists.txt @@ -8,10 +8,17 @@ else() message(GAME_ID: ${GAME_ID}) endif() +if (${MASTER_MODE}) + message(MASTER_MODE: 1) +else() + set(MASTER_MODE 0) + message(MASTER_MODE: 0) +endif() + set(CMAKE_BUILD_TYPE "Debug") set(CMAKE_CXX_FLAGS_RELEASE "-std=gnu++11 -fsanitize=address -fno-omit-frame-pointer") set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=gnu++11") -set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=gnu++11 -DGAME_ID=${GAME_ID}") +set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=gnu++11 -DGAME_ID=${GAME_ID} -DMASTER_MODE=${MASTER_MODE}") include_directories( AFTER @@ -53,10 +60,7 @@ add_executable( add_custom_target(script_pb_protocol ALL) add_custom_command(TARGET script_pb_protocol PRE_BUILD -# COMMAND python ../../tools/script/construct/build_script.py COMMAND python ../tools/scripts/construct/build_pb.py -# COMMAND python ../../tools/script/construct/build_protocol.py -# COMMAND python ../../tools/script/construct/build_version_file.py ) add_dependencies(wsproxy script_pb_protocol)