提交 c9cd2e02 编写于 作者: Z zhaojiaying01

fix compile bug in debug mode

上级 99d3ba51
...@@ -17,8 +17,10 @@ elseif(FPGA) ...@@ -17,8 +17,10 @@ elseif(FPGA)
add_definitions(-DPADDLE_MOBILE_FPGA) add_definitions(-DPADDLE_MOBILE_FPGA)
endif() endif()
set(CMAKE_CXX_FLAGS "-std=c++14 -O3 -s ${CMAKE_CXX_FLAGS}")
if (DEBUGING) if (DEBUGING)
set(CMAKE_BUILD_TYPE Debug) set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS}")
else() else()
set(CMAKE_BUILD_TYPE Release) set(CMAKE_BUILD_TYPE Release)
endif () endif ()
...@@ -55,7 +57,6 @@ else () ...@@ -55,7 +57,6 @@ else ()
add_definitions(-DX86) add_definitions(-DX86)
endif() endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
set(CMAKE_VERBOSE_MAKEFILE ON) set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY build) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY build)
......
...@@ -15,7 +15,6 @@ build_for_mac() { ...@@ -15,7 +15,6 @@ build_for_mac() {
fi fi
PLATFORM="x86" PLATFORM="x86"
MODE="Release" MODE="Release"
CXX_FLAGS="-std=c++11 -O3 -s"
BUILD_DIR=../build/release/"${PLATFORM}" BUILD_DIR=../build/release/"${PLATFORM}"
mkdir -p ${BUILD_DIR}/build mkdir -p ${BUILD_DIR}/build
...@@ -25,7 +24,6 @@ build_for_mac() { ...@@ -25,7 +24,6 @@ build_for_mac() {
cmake .. \ cmake .. \
-B"${BUILD_DIR}" \ -B"${BUILD_DIR}" \
-DCMAKE_BUILD_TYPE="${MODE}" \ -DCMAKE_BUILD_TYPE="${MODE}" \
-DCMAKE_CXX_FLAGS="${CXX_FLAGS}" \
-DIS_MAC=true -DIS_MAC=true
cd ${BUILD_DIR} cd ${BUILD_DIR}
...@@ -46,11 +44,11 @@ build_for_android() { ...@@ -46,11 +44,11 @@ build_for_android() {
if [ "${PLATFORM}" = "arm-v7a" ]; then if [ "${PLATFORM}" = "arm-v7a" ]; then
ABI="armeabi-v7a with NEON" ABI="armeabi-v7a with NEON"
ARM_PLATFORM="V7" ARM_PLATFORM="V7"
CXX_FLAGS="-O3 -std=c++11 -s -march=armv7-a -mfpu=neon -mfloat-abi=softfp -pie -fPIE -w -Wno-error=format-security" CXX_FLAGS="-march=armv7-a -mfpu=neon -mfloat-abi=softfp -pie -fPIE -w -Wno-error=format-security"
elif [ "${PLATFORM}" = "arm-v8a" ]; then elif [ "${PLATFORM}" = "arm-v8a" ]; then
ABI="arm64-v8a" ABI="arm64-v8a"
ARM_PLATFORM="V8" ARM_PLATFORM="V8"
CXX_FLAGS="-O3 -std=c++11 -s -march=armv8-a -pie -fPIE -w -Wno-error=format-security -llog" CXX_FLAGS="-march=armv8-a -pie -fPIE -w -Wno-error=format-security -llog"
else else
echo "unknown platform!" echo "unknown platform!"
exit -1 exit -1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册