4.5_demo/build.sh

36 lines
823 B
Bash
Raw Normal View History

2026-06-01 02:37:23 +00:00
#!/bin/bash
echo "========================================="
echo " Building Rotation Test Program"
echo "========================================="
# 清理旧的构建
rm -rf build-arm-Release
mkdir -p build-arm-Release
cd build-arm-Release
# 配置 CMake
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=../toolchain-arm.cmake
# 编译
make -j$(nproc)
if [ $? -eq 0 ]; then
echo ""
echo "========================================="
echo " ✓ Build Success!"
echo "========================================="
echo "Output: build-arm-Release/rotation_test"
echo ""
ls -lh rotation_test
echo ""
else
echo ""
echo "========================================="
echo " ✗ Build Failed!"
echo "========================================="
exit 1
fi