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
|
|
|
|
|
|
|
# Create main binary directory
|
|
|
|
mkdir bin
|
|
|
|
cd bin
|
|
|
|
# Create build directory
|
|
|
|
mkdir build
|
|
|
|
# Create install directory
|
|
|
|
mkdir install
|
|
|
|
cd install
|
|
|
|
mkdir Debug
|
|
|
|
mkdir Release
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
# Build current system debug and release version
|
|
|
|
cd build
|
2024-11-03 14:51:18 +08:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_STANDARD={{ cpp_version }} {{ '-DCMAKE_POSITION_INDEPENDENT_CODE=True' if pic else '' }} ../.. --fresh
|
2024-07-22 22:41:10 +08:00
|
|
|
cmake --build .
|
|
|
|
cmake --install . --prefix ../install/Debug
|
2024-11-03 14:51:18 +08:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD={{ cpp_version }} {{ '-DCMAKE_POSITION_INDEPENDENT_CODE=True' if pic else '' }} -DYYCC_BUILD_TESTBENCH=ON ../.. --fresh
|
2024-07-22 22:41:10 +08:00
|
|
|
cmake --build .
|
|
|
|
cmake --install . --prefix ../install/Release
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
# Exit to original path
|
|
|
|
cd ..
|
|
|
|
echo "Linux CMake Build Done"
|