For a proper build, the release code including the required CMake files can be downloaded or cloned from the
SWAN git repository
hosted on TU Delft GitLab.
Next, carry out the following steps.
1. clone the repository and navigate to the top level source directory
git clone https://gitlab.tudelft.nl/citg/wavemodels/swan.git && cd swan2. create the build directory
mkdir build cd buildThis step is required to perform an out-of-source build with CMake, that is, build files will not be created in the /swan/src directory.
cmake .. -G Ninja cmake --build .The first command refers to the source directory where the main configuration file is invoked. The second command carries out the building in the build directory. The package is actually built by invoking Ninja.
cmake --install .The default install directory is /usr/local/swan (Unix-like operating systems, including macOS) or C:PROGRAM FILESswan (Windows). Instead, you may install SWAN in any other user-defined directory, as follows
cmake --install . --prefix /your/defined/directoryAfter installation a number of subdirectories are created. The executables end up in the /bin directory, the library files in /lib, and the module files in /mod. Additionally, the /doc folder contains the pdf documents, the folder /tools consists of some useful scripts and the /misc directory contains all of the files that do not fit in other folders (e.g., a machinefile and the edit file swan.edt).
The SWAN team 2024-09-09