diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2026-04-06 09:19:26 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2026-04-06 09:19:26 +0100 |
| commit | 0ca921f2f552072de575a5db738c8444bd8d571a (patch) | |
| tree | 845159d405222172bb26171b1e08aa66ce0286df /build.bat | |
| parent | c9dca07b0389957238ce6177cc482e26561124dc (diff) | |
| download | nissy-core-0ca921f2f552072de575a5db738c8444bd8d571a.tar.gz nissy-core-0ca921f2f552072de575a5db738c8444bd8d571a.zip | |
Fix debug mode build for tests
Diffstat (limited to 'build.bat')
| -rw-r--r-- | build.bat | 13 |
1 files changed, 6 insertions, 7 deletions
| @@ -1,11 +1,11 @@ | |||
| 1 | @echo off | 1 | @echo off |
| 2 | 2 | ||
| 3 | SET DEBUG=0 | ||
| 3 | if "%1"=="/d" ( | 4 | if "%1"=="/d" ( |
| 4 | SET DEBUG=1 | 5 | SET DEBUG=1 |
| 5 | shift | 6 | shift |
| 6 | ) else ( | ||
| 7 | SET DEBUG=0 | ||
| 8 | ) | 7 | ) |
| 8 | if "%1"=="test" (SET DEBUG=1) | ||
| 9 | 9 | ||
| 10 | :: Detect architecture, or use user-specified one | 10 | :: Detect architecture, or use user-specified one |
| 11 | if "%ARCH%"=="" goto :detect_arch | 11 | if "%ARCH%"=="" goto :detect_arch |
| @@ -62,8 +62,8 @@ exit /b 1 | |||
| 62 | SET CC_NISSY=%CC% %CFLAGS% %ODFLAGS% /c src\nissy.c | 62 | SET CC_NISSY=%CC% %CFLAGS% %ODFLAGS% /c src\nissy.c |
| 63 | SET CC_SHELL=%CC% %CFLAGS% %ODFALGS% %LFLAGS% nissy.o shell\shell.c /Fe:run.exe | 63 | SET CC_SHELL=%CC% %CFLAGS% %ODFALGS% %LFLAGS% nissy.o shell\shell.c /Fe:run.exe |
| 64 | SET CC_PYTHON=%CC% %CFLAGS% %LFLAGS% /I"%PYINCLUDE%" /LD /Fe:python\nissy.pyd python\nissy_module.c nissy.o /link /LIBPATH:"%PYLIBS%" python3.lib | 64 | SET CC_PYTHON=%CC% %CFLAGS% %LFLAGS% /I"%PYINCLUDE%" /LD /Fe:python\nissy.pyd python\nissy_module.c nissy.o /link /LIBPATH:"%PYLIBS%" python3.lib |
| 65 | SET CC_TEST=%CC% %CFLAGS% %ODFLAGS% %LFLAGS% nissy.o /Fe:runtest.exe | 65 | SET CC_TEST=%CC% %CFLAGS% %ODFLAGS% %LFLAGS% /Fe:runtest.exe nissy.o |
| 66 | SET CC_TOOL=%CC% %CFLAGS% %ODFLAGS% %LFLAGS% nissy.o /Fe:runtool.exe | 66 | SET CC_TOOL=%CC% %CFLAGS% %ODFLAGS% %LFLAGS% /Fe:runtool.exe nissy.o |
| 67 | SET CC_CXX=%CXX% %ODFLAGS% /std:c++20 /Fe:runcpp.exe cpp\nissy.cpp nissy.o | 67 | SET CC_CXX=%CXX% %ODFLAGS% /std:c++20 /Fe:runcpp.exe cpp\nissy.cpp nissy.o |
| 68 | goto :compiler_done | 68 | goto :compiler_done |
| 69 | 69 | ||
| @@ -85,8 +85,8 @@ goto :compiler_done | |||
| 85 | SET CC_NISSY=%CC% %CFLAGS% %ODFLAGS% -c src\nissy.c | 85 | SET CC_NISSY=%CC% %CFLAGS% %ODFLAGS% -c src\nissy.c |
| 86 | SET CC_SHELL=%CC% %CFLAGS% %ODFLAGS% %LFLAGS% nissy.o shell\shell.c -o run.exe | 86 | SET CC_SHELL=%CC% %CFLAGS% %ODFLAGS% %LFLAGS% nissy.o shell\shell.c -o run.exe |
| 87 | SET CC_PYTHON=%CC% %CFLAGS% %LFLAGS% -I%PYINCLUDE% -L%PYLIBS% -shared -lpython3 python\nissy_module.c nissy.o -o python\nissy.pyd | 87 | SET CC_PYTHON=%CC% %CFLAGS% %LFLAGS% -I%PYINCLUDE% -L%PYLIBS% -shared -lpython3 python\nissy_module.c nissy.o -o python\nissy.pyd |
| 88 | SET CC_TEST=%CC% %CFLAGS% %ODFLAGS% %LFLAGS% nissy.o -o runtest.exe | 88 | SET CC_TEST=%CC% %CFLAGS% %ODFLAGS% %LFLAGS% -o runtest.exe nissy.o |
| 89 | SET CC_TOOL=%CC% %CFLAGS% %ODFLAGS% %LFLAGS% nissy.o -o runtool.exe | 89 | SET CC_TOOL=%CC% %CFLAGS% %ODFLAGS% %LFLAGS% -o runtool.exe nissy.o |
| 90 | SET CC_CXX=%CXX% %ODFLAGS% -std=c++20 -o runcpp.exe cpp\nissy.cpp nissy.o | 90 | SET CC_CXX=%CXX% %ODFLAGS% -std=c++20 -o runcpp.exe cpp\nissy.cpp nissy.o |
| 91 | :compiler_done | 91 | :compiler_done |
| 92 | 92 | ||
| @@ -164,7 +164,6 @@ exit /b | |||
| 164 | exit /b | 164 | exit /b |
| 165 | 165 | ||
| 166 | :build_test | 166 | :build_test |
| 167 | SET DEBUG=1 | ||
| 168 | call:build_nissy || exit /b 1 | 167 | call:build_nissy || exit /b 1 |
| 169 | if not defined EXPR ( | 168 | if not defined EXPR ( |
| 170 | SET WILDCARD=* | 169 | SET WILDCARD=* |
