1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-07-30 13:05:50 +03:00

Add option -d to enable Debug mode instead of custom script variable

This commit is contained in:
oan 2023-06-14 00:17:10 +01:00
parent 25b32bc9b5
commit d1cce26f56
2 changed files with 26 additions and 17 deletions

View File

@ -26,6 +26,12 @@ set "toDebug=0"
set "toBuildSample=0" set "toBuildSample=0"
set "sourceMapBase=" set "sourceMapBase="
set "aBuildType=Release"
if /I ["%1"] == ["-d"] (
set "toDebug=1"
set "aBuildType=Debug"
)
rem OCCT Modules to build rem OCCT Modules to build
set "BUILD_ModelingData=ON" set "BUILD_ModelingData=ON"
set "BUILD_ModelingAlgorithms=ON" set "BUILD_ModelingAlgorithms=ON"
@ -44,7 +50,19 @@ rem Archive tool
set "THE_7Z_PARAMS=-t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on" set "THE_7Z_PARAMS=-t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on"
set "THE_7Z_PATH=%ProgramW6432%\7-Zip\7z.exe" set "THE_7Z_PATH=%ProgramW6432%\7-Zip\7z.exe"
set "aBuildType=Release" set "aPlatformAndCompiler="
set "aWorkDir="
set "aDestDir="
set "aLogFile="
set "aSrcRootSmpl=%aCasSrc%\samples\webgl"
set "aWorkDirSmpl="
set "aDestDirSmpl="
set "aLogFileSmpl="
rem Configuration file
if exist "%~dp0wasm_custom.bat" call "%~dp0wasm_custom.bat"
set "aBuildTypePrefix=" set "aBuildTypePrefix="
set "anExtraCxxFlags=" set "anExtraCxxFlags="
if /I ["%USE_PTHREADS%"] == ["ON"] ( if /I ["%USE_PTHREADS%"] == ["ON"] (
@ -52,22 +70,17 @@ if /I ["%USE_PTHREADS%"] == ["ON"] (
set "aBuildTypePrefix=%aBuildTypePrefix%-pthread" set "aBuildTypePrefix=%aBuildTypePrefix%-pthread"
) )
if ["%toDebug%"] == ["1"] ( if ["%toDebug%"] == ["1"] (
set "aBuildType=Debug"
set "aBuildTypePrefix=%aBuildTypePrefix%-debug" set "aBuildTypePrefix=%aBuildTypePrefix%-debug"
) )
set "aPlatformAndCompiler=wasm32%aBuildTypePrefix%" if ["%aPlatformAndCompiler%"] == [""] ( set "aPlatformAndCompiler=wasm32%aBuildTypePrefix%" )
set "aWorkDir=%aBuildRoot%\occt-%aPlatformAndCompiler%-make" if ["%aWorkDir%"] == [""] ( set "aWorkDir=%aBuildRoot%\occt-%aPlatformAndCompiler%-make" )
set "aDestDir=%aBuildRoot%\occt-%aPlatformAndCompiler%" if ["%aDestDir%"] == [""] ( set "aDestDir=%aBuildRoot%\occt-%aPlatformAndCompiler%" )
set "aLogFile=%aBuildRoot%\occt-%aPlatformAndCompiler%-build.log" if ["%aLogFile%"] == [""] ( set "aLogFile=%aBuildRoot%\occt-%aPlatformAndCompiler%-build.log" )
set "aSrcRootSmpl=%aCasSrc%\samples\webgl" if ["%aWorkDirSmpl%"] == [""] ( set "aWorkDirSmpl=%aBuildRoot%\sample-%aPlatformAndCompiler%-make" )
set "aWorkDirSmpl=%aBuildRoot%\sample-%aPlatformAndCompiler%-make" if ["%aDestDirSmpl%"] == [""] ( set "aDestDirSmpl=%aBuildRoot%\sample-%aPlatformAndCompiler%" )
set "aDestDirSmpl=%aBuildRoot%\sample-%aPlatformAndCompiler%" if ["%aLogFileSmpl%"] == [""] ( set "aLogFileSmpl=%aBuildRoot%\sample-%aPlatformAndCompiler%-build.log" )
set "aLogFileSmpl=%aBuildRoot%\sample-%aPlatformAndCompiler%-build.log"
rem Configuration file
if exist "%~dp0wasm_custom.bat" call "%~dp0wasm_custom.bat"
call "%EMSDK_ROOT%\emsdk_env.bat" call "%EMSDK_ROOT%\emsdk_env.bat"
set "aToolchain=%EMSDK%/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake" set "aToolchain=%EMSDK%/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake"
@ -82,9 +95,6 @@ for /f %%i in ('git symbolic-ref --short HEAD') do ( set "aGitBranch=%%i" )
call :cmakeGenerate call :cmakeGenerate
if errorlevel 1 ( if errorlevel 1 (
if not ["%1"] == ["-nopause"] (
pause
)
exit /B 1 exit /B 1
goto :eof goto :eof
) )

View File

@ -14,7 +14,6 @@ rem set "toClean=0"
rem set "toMake=1" rem set "toMake=1"
rem set "toInstall=1" rem set "toInstall=1"
set "toPack=0" set "toPack=0"
set "toDebug=0"
set "toBuildSample=0" set "toBuildSample=0"
rem Source map base (should point to server where C++ sources will be copied) rem Source map base (should point to server where C++ sources will be copied)
rem enables -g4 debug building option for WebGL sample and allows navigating C++ source code within JavaScript debugger. rem enables -g4 debug building option for WebGL sample and allows navigating C++ source code within JavaScript debugger.