提交 146bb9e6 编写于 作者: X xj.lin

support install prefix and default install


Former-commit-id: cada287cbf3b4ef2e32e8039aa7836bb76a6adb1
上级 77f86fde
......@@ -72,3 +72,15 @@ if (BUILD_UNIT_TEST)
endif(BUILD_UNIT_TEST)
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 @@
BUILD_TYPE="Debug"
BUILD_UNITTEST="off"
INSTALL_PREFIX=$(pwd)/megasearch
while getopts "p:t:uh" arg
do
......@@ -13,12 +14,16 @@ do
echo "Build and run unittest cases" ;
BUILD_UNITTEST="on";
;;
p)
INSTALL_PREFIX=$OPTARG
;;
h) # help
echo "
parameter:
-t: build type
-u: building unit test options
-p: install prefix
usage:
./build.sh -t \${BUILD_TYPE} [-u] [-h]
......@@ -43,6 +48,7 @@ cd cmake_build
CUDA_COMPILER=/usr/local/cuda/bin/nvcc
CMAKE_CMD="cmake -DBUILD_UNIT_TEST=${BUILD_UNITTEST} \
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DCMAKE_CUDA_COMPILER=${CUDA_COMPILER} \
$@ ../"
......@@ -56,3 +62,5 @@ if [[ ${BUILD_TYPE} != "Debug" ]]; then
strip src/vecwise_server
fi
make install
......@@ -79,3 +79,5 @@ set(license_generator_src
${CMAKE_CURRENT_SOURCE_DIR}/license/LicenseGenerator.cpp)
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.
先完成此消息的编辑!
想要评论请 注册