-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompile.bat
More file actions
47 lines (40 loc) · 1.62 KB
/
compile.bat
File metadata and controls
47 lines (40 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
@echo off
rem ============================================================
rem OASIS - Windows build script
rem ============================================================
rem Prerequisites:
rem - CMake on PATH
rem - MSVC (run from "Developer Command Prompt" or "x64 Native Tools")
rem - Libraries: Armadillo, HDF5, OpenBLAS (or MKL)
rem - Optional: SuperLU, stl_reader, OpenFAST, FASTurbine_wrapper
rem
rem ALL paths are configured in CMakeUserConfig.cmake only.
rem Copy CMakeUserConfig.cmake.template and set paths for your system.
rem ============================================================
rem DELETE PREVIOUS BUILD ---------------------------------
rem rmdir /Q /S build
rem CONFIGURE ---------------------------------------------
rem Toolchain file is auto-detected from CMakeUserConfig.cmake.
cmake -B build -S .
if %ERRORLEVEL% NEQ 0 (
echo ERROR: CMake configure failed!
exit /b 1
)
rem CHOOSE COMPILATION OPTION -----------------------------
rem DEBUG COMPILATION ---------------------------------
rem cmake --build build
rem copy ".\build\Debug\OASIS.exe" ".\bin\oasis.exe"
rem RELEASE COMPILATION -------------------------------
cmake --build build --config Release
if %ERRORLEVEL% NEQ 0 (
echo ERROR: Build failed!
exit /b 1
)
rem Copy executable + all runtime DLLs from build output to bin/
rem (vcpkg auto-copies its DLLs to build/Release/ via VCPKG_APPLOCAL_DEPS;
rem CMakeLists.txt post-build commands copy FASTurbine + Intel DLLs there too)
if not exist bin mkdir bin
for %%f in (".\build\Release\*.exe" ".\build\Release\*.dll") do (
copy "%%f" ".\bin\" >nul
)
echo Build complete: bin\oasis.exe