| Name | Version | Required for |
|---|---|---|
| cmake | ≥ 3.0 | core build |
| OpenSSL | ≥ 1.0.2 | core build |
| swig | 3.0.0 | Python wrapper |
| Boost | ≥ 3.0 | C++ & Python wrappers |
| Java jdk | Java wrapper | |
| IDL | IDL wrapper |
Note: The dependencies not marked as for the core build are optional and the build will still work without them; it will just build without the functionality that the dependencies are for.
First you will need to install the dependencies.
When using yum the command to run is:
LANG=C sudo yum -y groupinstall 'Development Tools'
sudo yum -y install openssl-devel boost-devel swig-devel python-devel \
postgresql-devel libxml2-devel gsl-devel libgcrypt-devel bzip2-devel \
java-1.8.0-openjdk-devel
When using apt-get the command to run is:
sudo apt-get install git python3-dev libssl-dev libboost-dev python3-numpy python3-matplotlib
Next, run cmake to configure the build (in the UDA root directory):
cmake -Bbuild -H.
See CMake Options for more options.
After configuring with cmake run make to build:
make -C build
And install using:
make -C build install
You can install the dependencies using macports:
sudo port install openssl boost swig-python
You can then install UDA in the same way as for Linux.
To build on Windows you will need to first build the extlibs, then build the main source.
In the UDA extlibs directory run (in Powershell):
mkdir build
cd build
cmake.exe .. -G"MinGW Makefiles" -DBUILD_SHARED_LIBS=ON
mingw32-make.exe
cd ..
.\install.bat
Next, in the UDA root directory run (in Powershell):
mkdir build
cd build
..\scripts\cmake-win.bat
mingw32-make.exe
mingw32-make.exe install
In install the Python client you will need to run (in Powershell):
$python_dir = (Get-Item (Get-Command python).Source).DirectoryName
rm $python_dir\Lib\site-packages\pyuda
copy -Recurse .\include\pyuda $python_dir\Lib\site-packages\
cp .\extlib\lib\libxdr.dll $python_dir\Lib\site-packages\pyuda\
Once you have done this, you can run UDA in Python by running (in Powershell):
Set-Item -Path env:UDA_HOST -Value "rca.fusion.org.uk"
Set-Item -Path env:UDA_PORT -Value "56565"
python
Some useful standard CMake options are (others can be found at cmake.org):
| Name | Type | Default | Description |
|---|---|---|---|
| -DCMAKE_INSTALL_PREFIX | PATH | /usr/local | The location where UDA will be installed |
You can also specify the type of build files generated by CMake using the -G option, i.e. -G"Unix Makefiles" to
generate GNU makefiles (the default on Linux) or -GNinja to generate Ninja makefiles.
The UDA specific configuration options are:
| Name | Type | Default | Description |
|---|---|---|---|
| TARGET_TYPE | STRING | None | The name of the target machine, this is used to provide machine specific configuration options (see below). |
| CLIENT_ONLY | BOOL | FALSE | Only build the client |
| NO_WRAPPERS | BOOL | FALSE | Do not build any of the language wrappers, only the C client API is built |
| NO_MODULES | BOOL | FALSE | Do not build any of the internal server legacy modules |
| FAT_IDL | BOOL | FALSE | Build the IDL wrapper using the fat-client library |
In the cmake/Config directory found in the UDA route directory you will find a number of target-<NAME>.cmake files.
These files are used to provide machine specific compilation options to UDA. These options can be overridden at run-time
but are useful as a set of defaults that UDA will fall back to. The file to use is specified by the TARGET_TYPE configuration
option, i.e. if -DTARGET_TYPE=MAST is used then the target-MAST.cmake file will be included. You can add a new configuration
file simply by creating a new file following the naming convention target-<MY_TARGET>.cmake and then you can use your
new <MY_TARGET> as the value for TARGET_TYPE.