2021-12-21 10:41:33 +08:00
|
|
|
@echo off
|
2021-12-21 10:46:28 +08:00
|
|
|
rem !!!Don't move this file
|
2021-12-21 10:41:33 +08:00
|
|
|
rem usage: run.bat <BUILD_CFG>
|
|
|
|
rem BUILD_CFG could be Debug,Release,MinSizeRel,RelWithDebInfo
|
2022-02-07 20:36:44 +08:00
|
|
|
|
|
|
|
set myDir=%~dp0
|
|
|
|
set cacheFile=%myDir%run.bat.txt
|
|
|
|
|
2022-02-09 11:50:06 +08:00
|
|
|
echo Entering run.bat directory: %myDir%
|
|
|
|
|
2022-02-07 20:36:44 +08:00
|
|
|
cd /d %myDir%
|
2021-12-21 10:41:33 +08:00
|
|
|
|
|
|
|
set APP_NAME=@APP_NAME@
|
2022-02-09 11:50:06 +08:00
|
|
|
set BUILD_DIR=@CMAKE_BUILD_RELATIVE_DIR@
|
2021-12-21 10:41:33 +08:00
|
|
|
set BUILD_CFG=%1
|
|
|
|
|
|
|
|
rem Determine which build config to run
|
2022-02-07 20:36:44 +08:00
|
|
|
if not defined BUILD_CFG if exist %cacheFile% set /p BUILD_CFG=< %cacheFile%
|
2021-12-21 10:41:33 +08:00
|
|
|
if not defined BUILD_CFG set /p BUILD_CFG=Please input Build config(Debug,Release,MinSizeRel,RelWithDebInfo):
|
|
|
|
if not defined BUILD_CFG set BUILD_CFG=Debug
|
|
|
|
|
|
|
|
rem Save run config to run.bat.txt
|
2022-02-07 20:36:44 +08:00
|
|
|
echo %BUILD_CFG%>%cacheFile%
|
2021-12-21 10:41:33 +08:00
|
|
|
|
2022-02-09 11:50:06 +08:00
|
|
|
start /D . %BUILD_DIR%/bin/%APP_NAME%/%BUILD_CFG%/%APP_NAME%.exe
|