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 )