build script that links MKL with openmp

This commit is contained in:
antonl 2026-03-15 13:56:47 +01:00
parent ba5ec9e09e
commit 2e177250db
2 changed files with 32 additions and 1 deletions

31
build.bat Normal file
View File

@ -0,0 +1,31 @@
@echo off
setlocal
set MKL_ROOT=E:\lib\intel_mkl\mkl\2025.3
set COMPILER_ROOT=E:\lib\intel_mkl\compiler\2025.3
set SRC=%1
if "%SRC%"=="" (
echo Usage: build.bat source.c
exit /b 1
)
set OUT=%~n1.exe
pushd build
del /F /Q *
clang ../src/%SRC% -o %OUT% ^
-fopenmp ^
-I"%MKL_ROOT%\include" ^
-L"%MKL_ROOT%\lib" ^
-L"%COMPILER_ROOT%\lib" ^
-lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core ^
-llibiomp5md ^
-Wall
popd
echo Build complete: build/%OUT%
set PATH=%PATH%;E:\lib\intel_mkl\mkl\2025.3\bin
set PATH=%PATH%;E:\lib\intel_mkl\compiler\2025.3\bin

View File

@ -15,7 +15,7 @@ int main() {
printf(" ******* \n HELLO WARRUDU \n ****);
printf(" ******* \n HELLO WARRUDU \n ****\n");