2024-07-22 22:41:10 +08:00
|
|
|
#!/bin/bash
|
2024-11-03 14:51:18 +08:00
|
|
|
# Navigate to project root directory
|
|
|
|
cd {{ repo_root_dir }}
|
2024-07-22 22:41:10 +08:00
|
|
|
|
2025-08-20 14:26:52 +08:00
|
|
|
# Create build and install directory
|
2024-07-22 22:41:10 +08:00
|
|
|
mkdir build
|
|
|
|
mkdir install
|
|
|
|
|
2025-08-20 14:26:52 +08:00
|
|
|
# Build as release version
|
2024-07-22 22:41:10 +08:00
|
|
|
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
|
2024-07-22 22:41:10 +08:00
|
|
|
cmake --build .
|
2025-08-20 14:26:52 +08:00
|
|
|
cmake --install . --prefix ../install
|
2024-07-22 22:41:10 +08:00
|
|
|
|
|
|
|
# Exit to original path
|
|
|
|
cd ..
|
2025-08-20 14:26:52 +08:00
|
|
|
echo "YYCC Linux CMake build done"
|