mirror of
https://github.com/fanlumaster/googlepinyinime-rev.git
synced 2025-07-18 08:57:54 +08:00
24 lines
539 B
Bash
24 lines
539 B
Bash
#!/bin/bash
|
|
currentDirectory=$(pwd)
|
|
cmakeListsPath="${currentDirectory}/CMakeLists.txt"
|
|
|
|
if [ ! -f "$cmakeListsPath" ]; then
|
|
echo "No CMakeLists.txt in current directory, please check."
|
|
exit 1
|
|
fi
|
|
|
|
echo "Start generating and compiling..."
|
|
|
|
buildFolderPath="./build"
|
|
|
|
if [ ! -d "$buildFolderPath" ]; then
|
|
mkdir -p "$buildFolderPath"
|
|
echo "build folder created."
|
|
fi
|
|
|
|
cmake -G "Unix Makefiles" -D CMAKE_CXX_COMPILER=/usr/bin/g++ -S . -B ./build/
|
|
|
|
if [ $? -eq 0 ]; then
|
|
cmake --build ./build/ --config DEBUG
|
|
fi
|