This commit is contained in:
Zengtudor 2024-08-13 14:03:19 +08:00
parent 59de4fb901
commit 2a657bd1a9
5 changed files with 44 additions and 0 deletions

4
.gitignore vendored
View File

@ -1,3 +1,7 @@
/.vscode
/.xmake
/build
# ---> C++
# Prerequisites
*.d

25
build.bat Normal file
View File

@ -0,0 +1,25 @@
@echo off
setlocal
rem 设置文件夹路径
set "folderPath=.\build"
rem 检查文件夹是否存在
if not exist "%folderPath%" (
mkdir "%folderPath%"
echo Folder created: %folderPath%
) else (
echo Folder already exists: %folderPath%
)
rem 编译C++文件
g++ .\src\main.cpp -o "%folderPath%\tmake.exe" -I.\tomlplusplus -O3
rem 检查编译是否成功
if %errorlevel% equ 0 (
echo Compilation successful.
) else (
echo Compilation failed with error level %errorlevel%.
)
endlocal

7
config.yaml Normal file
View File

@ -0,0 +1,7 @@
CompileFlags:
Add:
- "-I./tomlplusplus"
- "-O3"
Output:
Directory: ./build
File: tmake.exe

5
src/main.cpp Normal file
View File

@ -0,0 +1,5 @@
#include "toml.hpp"
int main(int argc,char *argv[]){
}

3
xmake.lua Normal file
View File

@ -0,0 +1,3 @@
target("tmake")
add_files("./src/main.cpp")
add_includedirs("./tomlplusplus")