forked from mindspore-Ecosystem/mindspore
fix CMAKE_VERBOSE option
This commit is contained in:
parent
53a82fa6e0
commit
003ce3a8d7
12
build.sh
12
build.sh
|
@ -105,6 +105,7 @@ checkopts()
|
|||
ENABLE_IBVERBS="off"
|
||||
ENABLE_PYTHON="on"
|
||||
ENABLE_GPU="off"
|
||||
ENABLE_VERBOSE="off"
|
||||
|
||||
# Process the options
|
||||
while getopts 'drvj:c:t:hsb:a:g:p:ie:m:l:I:LRP:D:zM:V:K:swB:En:T:' opt
|
||||
|
@ -127,6 +128,7 @@ checkopts()
|
|||
DEBUG_MODE="off"
|
||||
;;
|
||||
v)
|
||||
ENABLE_VERBOSE="on"
|
||||
VERBOSE="VERBOSE=1"
|
||||
;;
|
||||
j)
|
||||
|
@ -654,7 +656,8 @@ build_lite()
|
|||
-DBUILD_DEVICE=on -DPLATFORM_ARM64=on -DBUILD_CONVERTER=off -DENABLE_NEON=on -DENABLE_FP16="off" \
|
||||
-DSUPPORT_GPU=${ENABLE_GPU} -DOFFLINE_COMPILE=${OPENCL_OFFLINE_COMPILE} -DBUILD_MINDDATA=${COMPILE_MINDDATA_LITE} \
|
||||
-DCMAKE_INSTALL_PREFIX=${BASEPATH}/output/tmp -DMS_VERSION_MAJOR=${VERSION_MAJOR} \
|
||||
-DMS_VERSION_MINOR=${VERSION_MINOR} -DMS_VERSION_REVISION=${VERSION_REVISION} "${BASEPATH}/mindspore/lite"
|
||||
-DMS_VERSION_MINOR=${VERSION_MINOR} -DMS_VERSION_REVISION=${VERSION_REVISION} -DENABLE_VERBOSE=${ENABLE_VERBOSE} \
|
||||
"${BASEPATH}/mindspore/lite"
|
||||
elif [[ "${LITE_PLATFORM}" == "arm32" ]]; then
|
||||
checkndk
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK}/build/cmake/android.toolchain.cmake" -DANDROID_NATIVE_API_LEVEL="19" \
|
||||
|
@ -663,15 +666,16 @@ build_lite()
|
|||
-DBUILD_DEVICE=on -DPLATFORM_ARM32=on -DENABLE_NEON=on -DSUPPORT_TRAIN=${SUPPORT_TRAIN} -DBUILD_CONVERTER=off \
|
||||
-DSUPPORT_GPU=${ENABLE_GPU} -DOFFLINE_COMPILE=${OPENCL_OFFLINE_COMPILE} -DBUILD_MINDDATA=${COMPILE_MINDDATA_LITE} \
|
||||
-DCMAKE_INSTALL_PREFIX=${BASEPATH}/output/tmp -DMS_VERSION_MAJOR=${VERSION_MAJOR} \
|
||||
-DMS_VERSION_MINOR=${VERSION_MINOR} -DMS_VERSION_REVISION=${VERSION_REVISION} "${BASEPATH}/mindspore/lite"
|
||||
-DMS_VERSION_MINOR=${VERSION_MINOR} -DMS_VERSION_REVISION=${VERSION_REVISION} -DENABLE_VERBOSE=${ENABLE_VERBOSE} \
|
||||
"${BASEPATH}/mindspore/lite"
|
||||
else
|
||||
cmake -DBUILD_DEVICE=on -DPLATFORM_ARM64=off -DBUILD_CONVERTER=${ENABLE_CONVERTER} -DSUPPORT_TRAIN=${SUPPORT_TRAIN} \
|
||||
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DSUPPORT_GPU=${ENABLE_GPU} -DBUILD_MINDDATA=${COMPILE_MINDDATA_LITE} \
|
||||
-DOFFLINE_COMPILE=${OPENCL_OFFLINE_COMPILE} -DCMAKE_INSTALL_PREFIX=${BASEPATH}/output/tmp \
|
||||
-DMS_VERSION_MAJOR=${VERSION_MAJOR} -DMS_VERSION_MINOR=${VERSION_MINOR} -DMS_VERSION_REVISION=${VERSION_REVISION} \
|
||||
"${BASEPATH}/mindspore/lite"
|
||||
-DENABLE_VERBOSE=${ENABLE_VERBOSE} "${BASEPATH}/mindspore/lite"
|
||||
fi
|
||||
VERBOSE=2 make -j$THREAD_NUM && make install && make package
|
||||
make -j$THREAD_NUM && make install && make package
|
||||
COMPILE_RET=$?
|
||||
|
||||
if [[ "${COMPILE_RET}" -ne 0 ]]; then
|
||||
|
|
|
@ -79,8 +79,7 @@ option(SUPPORT_GPU "if support gpu" off)
|
|||
option(OFFLINE_COMPILE "if offline compile OpenCL kernel" off)
|
||||
set(BUILD_MINDDATA "off" CACHE STRING "off, lite, lite_cv or full")
|
||||
option(BUILD_MINDDATA_EXAMPLE "" on)
|
||||
|
||||
set(CMAKE_VERBOSE_MAKEFILE on)
|
||||
option(ENABLE_VERBOSE "" off)
|
||||
add_compile_definitions(USE_ANDROID_LOG)
|
||||
add_compile_definitions(NO_DLIB)
|
||||
add_compile_options(-fPIC)
|
||||
|
@ -100,7 +99,9 @@ else ()
|
|||
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-z,relro,-z,now -Wl,-z,noexecstack ${CMAKE_EXE_LINKER_FLAGS}")
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if (ENABLE_VERBOSE)
|
||||
set(CMAKE_VERBOSE_MAKEFILE on)
|
||||
endif ()
|
||||
if (BUILD_DEVICE)
|
||||
add_compile_definitions(BUILD_DEVICE)
|
||||
endif ()
|
||||
|
|
Loading…
Reference in New Issue