Install from source - Build for MS Windows

Hey everybody,
since I had some problems building CADET for MS Windows with the installation guide on the CADET webpage and Bill helped me out differently as suggested. I figured that a short summary of the steps would be clever. If you think its worth sharing, we could also move it to a public section later on.

Build for MS Windows:

The following instructions are not based on any sequence, but it is recommended to work through them deterministically from top to bottom. If programs or settings already exist, the corresponding steps can be skipped.

Install Visual Studio:

Install Intel® oneAPI Base Toolkit

Install vcpkg: C++ Library Manager

  • Carry out the first two steps of the “Quick Start: Windows” from the README on the github repository of vcpkg: GitHub - microsoft/vcpkg: C++ Library Manager for Windows, Linux, and MacOS which are:
    • Clone the repository or place an unzipped vcpkg folder structure at C:\src or C:\dev
    • Open the windows command prompt and change director to C:\src or C:\dev and carry out the following line .\vcpkg\bootstrap-vcpkg.bat
  • Now use vcpkg to install hdf5 and suitesparse
  • The directory of the command window should be still at C:\src or C:\dev. Then the following line will install the libraries
    .\vcpkg\vcpkg install hdf5:x64-windows-static suitesparse:x64-windows-static

Add system environment variables

  • Press the windows button and type: variable → system environment variables should appear as first option. Open it and klick on environment variable.
  • In the environment variable window klick search for the path variable in the system variable window and klick on edit.
  • In the new window check for the following paths. If they are not in the list add them:
    • C:\Program Files (x86)\Intel\oneAPI\tbb\latest\redist\intel64\vc_mt
    • C:\Program Files (x86)\Intel\oneAPI\mkl\latest\redist\intel64
    • C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\redist\ intel64_win\compiler

Download CADET and modify CMakeSettings.json

  • Clone the CADET repository or place the unzipped folder structure at a desired location
  • Open the CADET repository in Visual Studio
  • Use the VCPKG_42_dll configuration
  • Download the CMakeSettings.json from this post and replace it with the one in the CADET folder
  • Open the CMakeSettings.json with Visual Studio and modify the variable INSTALL_DIR and TOOLCHAIN_FILE under environments.
    • INSTALL_DIR is the directory where CADET is installed to and where you later find the cadet-cli, which is needed for the compilation of the python cadet code
    • TOOLCHAIN_FILE variable should direct to the vcpkg.cmake file
  • When you hit save Visual Studio should run CMake-Generation and should terminate without errors
  • In the Project explorer above the CMakeSettings.json right klick the CMakeList.txt and click install
  • Visual Studio is now building CADET and should give the feedback that the installation was successful
  • Open a command prompt window and change directory to the INSTALL_DIR
  • Execute these lines in the command window at the INSTALL_DIR:
    • .\createLWE.h5
    • .\cadet-cli LWE.h5
  • If no error is occurring the compilation of cadet was successful

CMakeSettings.json (9.9 KB)


Hi Lukas,
after all this time I finally had the chance to install CADET from source again and found these instructions helpful. Regarding the .json configuration, we could add that the user should check and, if required, set all the environment variables, i.e. also HDF5_DIR and SUNDIALS_DIR. Additionally, we could note that the “generator” should match the VS version.