Skip to content

Commit

Permalink
add py_version for python compiling (#3657)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhupengyang committed May 18, 2020
1 parent 9827cb8 commit 6b8bf87
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lite/tools/build_linux.sh
Expand Up @@ -12,6 +12,7 @@ TOOLCHAIN=gcc
WITH_EXTRA=OFF
# controls whether to compile python lib, default is OFF.
WITH_PYTHON=OFF
PY_VERSION=""
# controls whether to compile cv functions into lib, default is OFF.
WITH_CV=OFF
# controls whether to print log information, default is ON.
Expand Down Expand Up @@ -52,11 +53,11 @@ readonly CMAKE_COMMON_OPTIONS="-DWITH_LITE=ON \
-DWITH_TESTING=OFF"
# mutable options for linux compiling.
function init_cmake_mutable_options {

cmake_mutable_options="-DARM_TARGET_ARCH_ABI=$ARCH \
-DARM_TARGET_LANG=$TOOLCHAIN \
-DLITE_BUILD_EXTRA=$WITH_EXTRA \
-DLITE_WITH_PYTHON=$WITH_PYTHON \
-DPY_VERSION=$PY_VERSION \
-DLITE_WITH_CV=$WITH_CV \
-DLITE_WITH_LOG=$WITH_LOG \
-DLITE_BUILD_TAILOR=$WITH_STRIP \
Expand Down Expand Up @@ -206,6 +207,7 @@ function print_usage {
echo -e "| --toolchain: (gcc|clang), defalut is gcc |"
echo -e "| --with_extra: (OFF|ON); controls whether to publish extra operators and kernels for (sequence-related model such as OCR or NLP), default is OFF |"
echo -e "| --with_python: (OFF|ON); controls whether to build python lib or whl, default is OFF |"
echo -e "| --python_version: (2.7|3.5|3.7); controls python version to compile whl, default is None |"
echo -e "| --with_cv: (OFF|ON); controls whether to compile cv functions into lib, default is OFF |"
echo -e "| --with_log: (OFF|ON); controls whether to print log information, default is ON |"
echo -e "| |"
Expand Down Expand Up @@ -262,6 +264,11 @@ function main {
WITH_PYTHON="${i#*=}"
shift
;;
# 2.7 or 3.5 or 3.7, default is None
--python_version=*)
PY_VERSION="${i#*=}"
shift
;;
# ON or OFF, default OFF
--with_cv=*)
WITH_CV="${i#*=}"
Expand Down

0 comments on commit 6b8bf87

Please sign in to comment.