add readme

Former-commit-id: f19468d07eea35f9f7a9ffbf8462458842754d36
This commit is contained in:
groot 2019-04-14 20:21:07 +08:00
parent 22e71a4d10
commit cf67ac8b09
2 changed files with 85 additions and 0 deletions

View File

@ -0,0 +1,34 @@
# vecwise_engine_server
### Build and Install
Firstly download zdb_server to under same parent folder with zdb_build
git clone git@192.168.1.105:jinhai/vecwise_engine.git
Install necessery tools
centos7 : yum install gfortran
ubunut : sudo apt-install install gfortran
Build third-parties
cd [sourcecode path]/cpp/thid_party
./build.sh
Then run build.sh scripts under cpp folder:
cd [sourcecode path]/cpp
./build.sh -t Debug
./build.sh -t Release
To run unittest:
./build.sh -u
or
./build.sh --unittest
### Luanch server
Set config in cpp/conf/server_config.yaml
Then luanch server with config:
vecwise_engine_server -c [sourcecode path]/cpp/conf/server_config.yaml

51
cpp/build.sh Executable file
View File

@ -0,0 +1,51 @@
#!/bin/bash
BUILD_TYPE="Debug"
BUILD_UNITTEST="off"
while getopts "p:t:uh" arg
do
case $arg in
t)
BUILD_TYPE=$OPTARG # BUILD_TYPE
;;
u)
echo "Build and run unittest cases" ;
BUILD_UNITTEST="on";
;;
h) # help
echo "
parameter:
-t: build type
-u: building unit test options
usage:
./build.sh -t \${BUILD_TYPE} [-u] [-h]
"
exit 0
;;
?)
echo "unkonw argument"
exit 1
;;
esac
done
if [[ -d cmake_build ]]; then
rm cmake_build -r
fi
rm -rf ./cmake_build
mkdir cmake_build
cd cmake_build
CMAKE_CMD="cmake -DBUILD_UNIT_TEST=${BUILD_UNITTEST} \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
$@ ../"
echo ${CMAKE_CMD}
${CMAKE_CMD}
make clean && make -j || exit 1