提交 8d04afdb 编写于 作者: X xj.lin

Merge branch 'support_install' into jinhai


Former-commit-id: 4cc9d1be04afc5f4e69db76454e4622a54162d29
...@@ -72,3 +72,15 @@ if (BUILD_UNIT_TEST) ...@@ -72,3 +72,15 @@ if (BUILD_UNIT_TEST)
endif(BUILD_UNIT_TEST) endif(BUILD_UNIT_TEST)
add_custom_target(Clean-All COMMAND ${CMAKE_BUILD_TOOL} clean) add_custom_target(Clean-All COMMAND ${CMAKE_BUILD_TOOL} clean)
#install
install(FILES
start_server.sh
stop_server.sh
DESTINATION
scripts)
install(FILES
conf/server_config.yaml
conf/vecwise_engine_log.conf
DESTINATION
conf)
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
BUILD_TYPE="Debug" BUILD_TYPE="Debug"
BUILD_UNITTEST="off" BUILD_UNITTEST="off"
INSTALL_PREFIX=$(pwd)/megasearch
while getopts "p:t:uh" arg while getopts "p:t:uh" arg
do do
...@@ -13,12 +14,16 @@ do ...@@ -13,12 +14,16 @@ do
echo "Build and run unittest cases" ; echo "Build and run unittest cases" ;
BUILD_UNITTEST="on"; BUILD_UNITTEST="on";
;; ;;
p)
INSTALL_PREFIX=$OPTARG
;;
h) # help h) # help
echo " echo "
parameter: parameter:
-t: build type -t: build type
-u: building unit test options -u: building unit test options
-p: install prefix
usage: usage:
./build.sh -t \${BUILD_TYPE} [-u] [-h] ./build.sh -t \${BUILD_TYPE} [-u] [-h]
...@@ -43,6 +48,7 @@ cd cmake_build ...@@ -43,6 +48,7 @@ cd cmake_build
CUDA_COMPILER=/usr/local/cuda/bin/nvcc CUDA_COMPILER=/usr/local/cuda/bin/nvcc
CMAKE_CMD="cmake -DBUILD_UNIT_TEST=${BUILD_UNITTEST} \ CMAKE_CMD="cmake -DBUILD_UNIT_TEST=${BUILD_UNITTEST} \
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DCMAKE_CUDA_COMPILER=${CUDA_COMPILER} \ -DCMAKE_CUDA_COMPILER=${CUDA_COMPILER} \
$@ ../" $@ ../"
...@@ -56,3 +62,5 @@ if [[ ${BUILD_TYPE} != "Debug" ]]; then ...@@ -56,3 +62,5 @@ if [[ ${BUILD_TYPE} != "Debug" ]]; then
strip src/vecwise_server strip src/vecwise_server
fi fi
make install
...@@ -79,3 +79,5 @@ set(license_generator_src ...@@ -79,3 +79,5 @@ set(license_generator_src
${CMAKE_CURRENT_SOURCE_DIR}/license/LicenseGenerator.cpp) ${CMAKE_CURRENT_SOURCE_DIR}/license/LicenseGenerator.cpp)
add_executable(license_generator ${license_generator_src}) add_executable(license_generator ${license_generator_src})
install(TARGETS vecwise_server DESTINATION bin)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册