From bdc2534e0ae2974b6a16318152f36ab53895a448 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 31 May 2019 10:28:22 +0800 Subject: [PATCH] 1 --- server/tools/scripts/construct/build_pb.py | 2 +- server/wsproxy/CMakeLists.txt | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/server/tools/scripts/construct/build_pb.py b/server/tools/scripts/construct/build_pb.py index 466f960..dbb591e 100644 --- a/server/tools/scripts/construct/build_pb.py +++ b/server/tools/scripts/construct/build_pb.py @@ -36,7 +36,7 @@ def need_rebuild(): return True s1 = os.stat(proto_name + '.pb.cc') s2 = os.stat('../tools/protobuild/' + proto_name + '.proto') - if s1.st_mtime < s2.st_mtime: + if s1.st_size <= 0 or s1.st_mtime < s2.st_mtime: return True return False diff --git a/server/wsproxy/CMakeLists.txt b/server/wsproxy/CMakeLists.txt index 456f7c8..07fe17f 100644 --- a/server/wsproxy/CMakeLists.txt +++ b/server/wsproxy/CMakeLists.txt @@ -43,6 +43,12 @@ aux_source_directory(../../third_party/framework/cpp SRC_LIST ) +execute_process( + COMMAND touch -a ss_proto.pb.h + COMMAND touch -a ss_proto.pb.cc + COMMAND touch -a ss_msgid.pb.h + COMMAND touch -a ss_msgid.pb.cc + ) aux_source_directory(. SRC_LIST )