Skip to content

Building DASH

Claudio Bantaloukas edited this page Nov 2, 2021 · 7 revisions

Building DASH

Requirements for Windows

  • Intel Fortran Compiler
  • CMake
  • While DASH source is under the MIT Licence, building DASH currently requires a Winteracter Licence.

Building commands

Fetching the source code

Use the following command to clone the dash repository

git clone ssh://git@github.com/ccdc-opensource/dash.git

This will create a directory called dash on your disk.

CMake Configuration

The following powershell snippet will configure the build to:

  • use Visual Studio 2019 libraries
  • Use the fortran compiler in its default location
  • build 32-bit executables
  • use the dash directory as a location for the source code
  • use a bld directory as a location for the the generated solution and build products
  • install DASH under the install directory when selecting the INSTALL target

& "C:\Program Files\CMake\bin\cmake.exe" -G "Visual Studio 16 2019" -A Win32 -S dash -B bld '-DCMAKE_Fortran_COMPILER=C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows/bin/intel64_ia32/ifort.exe' -DCMAKE_INSTALL_PREFIX=install

Building from the command line

The following powershell snippet will compile all fortran code using the build directory bld configured using the cmake command above

& "C:\Program Files\CMake\bin\cmake.exe" --build bld

Installing from source

The following powershell snippet will run the install target, thus installing all required binaries and resource files under the directory specified by the -DCMAKE_INSTALL_PREFIX setting

& "C:\Program Files\CMake\bin\cmake.exe" --build bld --target install

Creating an installer

The following powershell snippet will run the package target, thus creating:

  • a compressed archive under the bld_CPack_Packages\win32\7Z directory
  • an executable MSI installer under the bld_CPack_Packages\win32\WIX directory

& "C:\Program Files\CMake\bin\cmake.exe" --build bld --target package

Debugging DASH in Visual Studio

We recommend that you follow these steps:

  • first run the cmake configuration as described above
  • open the DASH Visual Studio solution that has been generated in your preferred build directory
  • Run the ALL_BUILD target to compile all executables and libraries
  • Run the INSTALL target to generate a complete DASH distribution folder in your install directory
  • Right click on the DASH target, select Properties
  • In the Debug pane, select (your install directory)/bin as the current working directory for DASH

This will allow DASH to find the files it requires

Clone this wiki locally