51 lines
1.3 KiB
Batchfile
51 lines
1.3 KiB
Batchfile
@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 /Od
|
|
@rem /WX /W4 /wd4201 /wd4100 /wd4189 /wd4244 /wd4127 /wd4456
|
|
@rem
|
|
|
|
|
|
set mkl_root=D:/lib/oneAPI_mkl/mkl/2021.3.0
|
|
set mkl_core=%mkl_root%/lib/intel64/mkl_core.lib
|
|
set mkl_intel_lp64=%mkl_root%/lib/intel64/mkl_intel_lp64.lib
|
|
set mkl_intel_thread=%mkl_root%/lib/intel64/mkl_intel_thread.lib
|
|
set MKLCOMPILER=D:/lib/oneAPI_mkl/compiler/2021.3.0/windows/compiler
|
|
set libiomp5md=%MKLCOMPILER%/lib/intel64_win/libiomp5md.lib
|
|
|
|
set libiompdll_path=D:\lib\oneAPI_mkl\compiler\2021.3.0\windows\redist\intel64_win\compiler
|
|
set libiompdll_name=libiomp5md.dll
|
|
set libiompdll=%libiompdll_path%\%libiompdll_name%
|
|
|
|
set Sources=../src/main.c
|
|
|
|
|
|
|
|
IF NOT EXIST .\out mkdir .\out
|
|
IF NOT EXIST .\build mkdir .\build
|
|
pushd .\build
|
|
|
|
if not exist "%libiompdll_name%" (
|
|
echo Copying %libiompdll%
|
|
copy "%libiompdll%" .
|
|
if errorlevel 1 (
|
|
echo Error copying openmp dll
|
|
) else (
|
|
echo Copied openmp dll: %libiompdll_name%
|
|
)
|
|
|
|
)
|
|
|
|
cl %CommonCompilerFlags% %Sources% /I"%mkl_root%\include" /link %mkl_core% %mkl_intel_lp64% %mkl_intel_thread% %libiomp5md%
|
|
|
|
set LastError=%ERRORLEVEL%
|
|
popd
|
|
|
|
ctime -end timeBuild.ctm %LastError%
|
|
IF NOT %LastError%==0 GOTO :end
|
|
|
|
:end
|