Files
YYCCommonplace/script/linux_build.sh.jinja

18 lines
527 B
Plaintext
Raw Normal View History

#!/bin/bash
# Navigate to project root directory
cd {{ repo_root_dir }}
2025-08-20 14:26:52 +08:00
# Create build and install directory
mkdir build
mkdir install
2025-08-20 14:26:52 +08:00
# Build as release version
cd build
2025-08-20 14:26:52 +08:00
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD={{ cpp_version }} {{ '-DCMAKE_POSITION_INDEPENDENT_CODE=True' if pic }} {{ '-DYYCC_BUILD_DOC=ON' if build_doc }} {{ '-DYYCC_BUILD_TESTBENCH=ON' if build_testbench }} ../.. --fresh
cmake --build .
2025-08-20 14:26:52 +08:00
cmake --install . --prefix ../install
# Exit to original path
cd ..
2025-08-20 14:26:52 +08:00
echo "YYCC Linux CMake build done"