From 0ca921f2f552072de575a5db738c8444bd8d571a Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Mon, 6 Apr 2026 09:19:26 +0100 Subject: Fix debug mode build for tests --- build.bat | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/build.bat b/build.bat index 6ec82f6..e87d3ac 100644 --- a/build.bat +++ b/build.bat @@ -1,11 +1,11 @@ @echo off +SET DEBUG=0 if "%1"=="/d" ( SET DEBUG=1 shift -) else ( - SET DEBUG=0 ) +if "%1"=="test" (SET DEBUG=1) :: Detect architecture, or use user-specified one if "%ARCH%"=="" goto :detect_arch @@ -62,8 +62,8 @@ exit /b 1 SET CC_NISSY=%CC% %CFLAGS% %ODFLAGS% /c src\nissy.c SET CC_SHELL=%CC% %CFLAGS% %ODFALGS% %LFLAGS% nissy.o shell\shell.c /Fe:run.exe SET CC_PYTHON=%CC% %CFLAGS% %LFLAGS% /I"%PYINCLUDE%" /LD /Fe:python\nissy.pyd python\nissy_module.c nissy.o /link /LIBPATH:"%PYLIBS%" python3.lib - SET CC_TEST=%CC% %CFLAGS% %ODFLAGS% %LFLAGS% nissy.o /Fe:runtest.exe - SET CC_TOOL=%CC% %CFLAGS% %ODFLAGS% %LFLAGS% nissy.o /Fe:runtool.exe + SET CC_TEST=%CC% %CFLAGS% %ODFLAGS% %LFLAGS% /Fe:runtest.exe nissy.o + SET CC_TOOL=%CC% %CFLAGS% %ODFLAGS% %LFLAGS% /Fe:runtool.exe nissy.o SET CC_CXX=%CXX% %ODFLAGS% /std:c++20 /Fe:runcpp.exe cpp\nissy.cpp nissy.o goto :compiler_done @@ -85,8 +85,8 @@ goto :compiler_done SET CC_NISSY=%CC% %CFLAGS% %ODFLAGS% -c src\nissy.c SET CC_SHELL=%CC% %CFLAGS% %ODFLAGS% %LFLAGS% nissy.o shell\shell.c -o run.exe SET CC_PYTHON=%CC% %CFLAGS% %LFLAGS% -I%PYINCLUDE% -L%PYLIBS% -shared -lpython3 python\nissy_module.c nissy.o -o python\nissy.pyd - SET CC_TEST=%CC% %CFLAGS% %ODFLAGS% %LFLAGS% nissy.o -o runtest.exe - SET CC_TOOL=%CC% %CFLAGS% %ODFLAGS% %LFLAGS% nissy.o -o runtool.exe + SET CC_TEST=%CC% %CFLAGS% %ODFLAGS% %LFLAGS% -o runtest.exe nissy.o + SET CC_TOOL=%CC% %CFLAGS% %ODFLAGS% %LFLAGS% -o runtool.exe nissy.o SET CC_CXX=%CXX% %ODFLAGS% -std=c++20 -o runcpp.exe cpp\nissy.cpp nissy.o :compiler_done @@ -164,7 +164,6 @@ exit /b exit /b :build_test - SET DEBUG=1 call:build_nissy || exit /b 1 if not defined EXPR ( SET WILDCARD=* -- cgit v1.3