4coder/buildsuper_x64.bat

37 lines
1.1 KiB
Batchfile
Raw Normal View History

2016-02-22 02:45:41 +00:00
@echo off
set code_home=%~dp0
if %code_home:~-1%==\ (set code_home=%code_home:~0,-1%)
if NOT "%Platform%" == "X64" IF NOT "%Platform%" == "x64" (call "%code_home%\windows_scripts\setup_cl_x64.bat")
2016-02-22 02:45:41 +00:00
2018-06-15 20:10:49 +00:00
set src=%1
if "%src%" == "" set src=4coder_default_bindings.cpp
2016-04-22 02:23:32 +00:00
2018-06-15 20:10:49 +00:00
set opts=/W4 /wd4310 /wd4100 /wd4201 /wd4505 /wd4996 /wd4127 /wd4510 /wd4512 /wd4610 /wd4457 /WX
set opts=%opts% /GR- /nologo /FC
set debug=/Zi
set release=/O2 /Zi
2019-01-25 21:03:52 +00:00
set build_dll=/LD /link /INCREMENTAL:NO /OPT:REF /RELEASE /PDBALTPATH:%%%%_PDB%%%%
2018-06-15 20:10:49 +00:00
set exports=/EXPORT:get_bindings /EXPORT:get_alpha_4coder_version
2016-04-22 02:23:32 +00:00
2019-03-30 22:10:17 +00:00
set mode=%debug%
if "%2" == "release" (set mode=%release%)
2018-06-15 20:10:49 +00:00
set preproc_file=4coder_command_metadata.i
set meta_macros=/DMETA_PASS
2019-03-30 22:10:17 +00:00
call cl /I"%code_home%" %opts% %mode% %src% /P /Fi%preproc_file% %meta_macros%
call cl /I"%code_home%" %opts% %mode% "%code_home%\4coder_metadata_generator.cpp" /Femetadata_generator
2019-09-27 23:56:05 +00:00
metadata_generator -R "%code_home%" "%cd%\%preproc_file%"
2017-11-22 20:05:58 +00:00
2019-03-30 22:10:17 +00:00
call cl /I"%code_home%" %opts% %mode% %src% /Fecustom_4coder %build_dll% %exports%
2016-02-22 02:45:41 +00:00
2019-06-01 23:58:28 +00:00
exit
2016-02-22 02:45:41 +00:00
REM file spammation preventation
2017-11-22 20:05:58 +00:00
del metadata_generator*
2016-02-22 02:45:41 +00:00
del *.exp
del *.obj
del *.lib
2018-06-15 20:10:49 +00:00
del %preproc_file%