@echo off

ctime -begin timeBuild.ctm

@rem /WX /W4 /wd4201 /wd4100 /wd4189 /wd4244 /wd4127 /wd4456
@rem set CommonCompilerFlags="/nologo /Zi /FC"
set CommonCompilerFlags=/nologo /Zi /FC 
@rem /WX /W4 /wd4201 /wd4100 /wd4189 /wd4244 /wd4127 /wd4456
set CudaSources=../src/cuda_entry_point.cu
set Sources=../src/main.c
set CudaLib=D:/lib/cudatoolkit/lib/x64
set CudaSolver=%CudaLib%/cusolver.lib
IF NOT EXIST .\build mkdir .\build
pushd .\build
cl %CommonCompilerFlags% %Sources% -Feprogram.exe
@rem nvcc -Xcompiler %CommonCompilerFlags% -o program.exe %Sources% %CudaSources% -lcusolver
set LastError=%ERRORLEVEL%
popd

ctime -end timeBuild.ctm %LastError%
IF NOT %LastError%==0 GOTO :end

:end
