fix: fix linux build issue

- fix linux build bug
- add linux build script
- order linux shell file eol be LF.
This commit is contained in:
yyc12345 2024-07-22 22:41:10 +08:00
parent 052fa7f4d1
commit 805ffe70d6
3 changed files with 35 additions and 1 deletions

3
.gitattributes vendored
View File

@ -1,2 +1,3 @@
Doxyfile.in eol=lf
*.bat eol=crlf
*.bat eol=crlf
*.sh eol=lf

32
script/linux_build.sh Normal file
View File

@ -0,0 +1,32 @@
#!/bin/bash
README_PATH=$(pwd)/README.md
if [ ! -f "$README_PATH" ]; then
echo "Error: You must run this script at the root folder of this project!"
exit
fi
# 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
cmake -DCMAKE_BUILD_TYPE=Debug ../.. --fresh
cmake --build .
cmake --install . --prefix ../install/Debug
cmake -DCMAKE_BUILD_TYPE=Release -DYYCC_BUILD_TESTBENCH=ON ../.. --fresh
cmake --build .
cmake --install . --prefix ../install/Release
cd ..
# Exit to original path
cd ..
echo "Linux CMake Build Done"

View File

@ -9,6 +9,7 @@
#include <algorithm>
#include <functional>
#include <stdexcept>
#include <cstring>
namespace YYCC::ConfigManager {