tmake/build.bat

26 lines
509 B
Batchfile
Raw Permalink Normal View History

2024-08-13 06:03:19 +00:00
@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