From 04eec0dc03ef2b35e83716d0a901185e1f748515 Mon Sep 17 00:00:00 2001 From: yuansx Date: Sun, 9 Dec 2018 08:17:22 +0000 Subject: [PATCH] support parallel make --- CMakeLists.txt | 1 + build/README.md | 13 +++++++++++++ build/build.sh | 3 ++- tarscpp | 2 +- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 93cdd897..bdd98627 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,6 +40,7 @@ macro(complice_module MODULE) add_executable(${MODULE} ${DIR_SRCS}) add_dependencies(${MODULE} FRAMEWORK-PROTOCOL) + add_dependencies(${MODULE} tars2cpp) endmacro() diff --git a/build/README.md b/build/README.md index 67599697..437d112c 100644 --- a/build/README.md +++ b/build/README.md @@ -1,5 +1,18 @@ The scripts of buiding Tars framework project +If you need multi-threaded compilation, you need to make the following modifications: +before modify +``` + all) + cd $BASEPATH; cmake ..; make +``` +after: +``` + all) + cd $BASEPATH; cmake ..; make -j 4 +``` + + download all associated projects firstly ``` build.sh prepare diff --git a/build/build.sh b/build/build.sh index 6ff0e92d..a13188ae 100755 --- a/build/build.sh +++ b/build/build.sh @@ -13,7 +13,7 @@ case $ARGS in cd ..; git submodule update --init --recursive ;; all) - cd $BASEPATH; cmake ..; make + cd $BASEPATH; cmake ..; make ;; cleanall) cd $BASEPATH; make clean; ls | grep -v build.sh | grep -v README.md | xargs rm -rf @@ -24,6 +24,7 @@ case $ARGS in help|*) echo "Usage:" echo "$0 help: view help info." + echo "$0 prepare: download dependent project." echo "$0 all: build all target" echo "$0 install: install framework" echo "$0 cleanall: remove all temp file" diff --git a/tarscpp b/tarscpp index ad1575ba..8a8145e6 160000 --- a/tarscpp +++ b/tarscpp @@ -1 +1 @@ -Subproject commit ad1575baab175a24436eeba551c3a21989d93527 +Subproject commit 8a8145e63f8966d9fd2253368ab1967995509c3f