-
Notifications
You must be signed in to change notification settings - Fork 3
/
build_win2022.bat
44 lines (29 loc) · 1.48 KB
/
build_win2022.bat
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
REM This can be made a lot more elegant - focus is right now to make it work
@echo off
pushd %~dp0
REM Required for documentation and inline documentation in Python
set GRAPHVIZ_PATH=C:\Program Files\Graphviz\bin
set DOXYGEN_DIR=C:/PFx64/doxygen
set SWIG_DIR=C:\Program Files\swig
set GTEST_ROOT="C:/Program Files/googletest-distribution"
set FFTW_DIR="c:/Program Files/fftw-3.3.5"
REM Visual Studio environment
call "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvarsall.bat" x64
REM Python virtual or base environment
IF EXIST "c:\cygwin64\home\jem\Environments\PyPI38\Scripts\activate.bat" (
call "c:\cygwin64\home\jem\Environments\PyPI38\Scripts\activate.bat"
) ELSE IF EXIST "C:\Users\Jens Munk Hansen\Environments\Python310\Scripts\activate.bat" (
call "C:\Users\Jens Munk Hansen\Environments\Python310\Scripts\activate.bat"
) ELSE IF EXIST "C:\Environments\Python310\Scripts\activate.bat" (
call "C:\Environments\Python310\Scripts\activate.bat"
) ELSE (
call "c:\Users\jem\Environments\PyPI38\Scripts\activate.bat"
)
mkdir build
set PATH="C:\Program Files\CMake\bin";%FFTW_DIR%;%SWIG_DIR%;%GRAPHVIZ_PATH%;%PATH%
REM Create solution
cmake -H%~dp0 -B%~dp0\build -G "Visual Studio 17 2022" -A "x64" -DBUILD_SPS_TEST=OFF -DBUILD_DOCUMENTATION=OFF -DBUILD_SWIG_DOCUMENTATION=OFF -DBUILD_FNM_TEST=OFF -DBUILD_GL_TEST=OFF -DDOXYGEN_EXECUTABLE=%DOXYGEN_DIR%/bin/doxygen.exe
cd %~dp0\build
REM Build solution
msbuild fnm.sln /p:Configuration=Release
cd %~dp0