WSL
Unless a native Windows build is strictly required, we recommend using Windows Subsystem for Linux (WSL2). First, ensure that:
- virtualization is turned on in BIOS,
- Hyper-V and Virtual Machine Platform are turned on in Windows features,
- Memory integrity is turned on in Windows Security (Core isolation).
When all the requirements are met, WSL can be installed via a console
wsl.exe --install [Distro]
where Distro
is the name of the Linux distribution.
The install steps are then the same as those described in Build/Linux.
Windows
The following instructions have been tested on windows 10 64bits, in Release and Debug configurations, and with the following packages versions: Visual Studio 2022, CMake 3.23, Python 3.8.7, SWIG 4.0.2, Eigen 3.3.9, Gmsh 4.8.4.
Required libraries
-
Git
Install git from https://git-scm.com/download/win. -
Visual Studio
Download the Visual Studio installer from https://visualstudio.microsoft.com/downloads/ and follow the instructions. You can either download the full installer including the IDE (https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&channel=Release&version=VS2022), or only the build tools (https://aka.ms/vs/17/release/vs_BuildTools.exe). The following instructions assumes that VS has been installed in C:\Program Files\Microsoft Visual Studio. -
CMake
Install CMake from https://cmake.org/, and add the executable to the Path environment variable (e.g. C:\Program Files\CMake\bin). -
Python and packages
Install Python from https://www.python.org/, and add the executable to the Path environment variable (e.g. C:\Program Files\Python). Install python packages using pip
python -m pip install numpy
python -m pip install scipy
python -m pip install vtk
-
SWIG
Download SWIG from http://www.swig.org/, unzip it to the location of your choice, and add the executable to the Path environment variable (e.g. C:\Program Files\SWIG). -
Eigen
Download Eigen from https://eigen.tuxfamily.org/index.php?title=Main_Page, unzip it to the location of your choice (e.g. C:\Program Files\eigen). -
Gmsh
Download gmsh from https://gmsh.info/, unzip it to the location of your choice, and add the executable to the Path environment variable (e.g. C:\Program Files\gmsh). -
CoDiPack Download CoDiPack from https://github.com/SciCompKL/CoDiPack, unzip it to the location of your choice (e.g. C:\Program Files\codipack).
Build
REM setup env
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
set INCLUDE=%INCLUDE%;C:\Program Files\eigen
set INCLUDE=%INCLUDE%;C:\Program Files\codipack
REM clone SDPM (e.g. in C:\Users\Me\dev\sdpm)
cd C:\Users\Me\dev
git clone git@gitlab.uliege.be:am-dept/sdpm.git
cd sdpm
REM configure, build and test
mkdir build && cd build
cmake .. && cmake --build . [--target install] --config Release REM alternatively, cmake -G Ninja -DCMAKE_BUILD_TYPE=Release .. && cmake --build . [--target install]
ctest [-j6] -C Release
Run an example
From the SDPM root directory:
python run.py sdpm\tests\lann.py