EleFits depends on Elements, a Euclid-developed build framework based on CMake. As such, EleFits can be used either from an Elements project or from a CMake project. Euclid developers benefit from the continuous delivery of EDEN (Euclid development environment) and have nothing to install. Others must install EleFits (and Elements) before they configure their project.
Nothing to install: all versions of EleFits are already part of EDEN. Jump to the configuration section.
Download and run the installation script:
In the remaining, we assume that you're putting the source code of Elements and EleFits in some <root>
directory.
You'll first need to get Elements:
Finally, install EleFits the same way:
This will install the the set of libraries in /usr/local/lib
(or usr/local/lib64
), headers in /usr/local/include
, and executables in /usr/local/bin
. The end-user library is named EleFits, while the low-level API is named EleCfitsioWrapper.
An install script is provided to perform all those steps, install.sh
. Check the help as:
An Elements project is made of modules. The project contains a root CMakeLists.txt
, and each module contains a CMakeLists.txt
. For more information, please refer to the Elements documentation.
Using the package means declaring the dependency to the EleFits project in the root CMakeLists.txt
:
and to the EleFits module in the CMakeLists.txt
of each module which requires EleFits:
Here's a minimal CMakeLists.txt
file to use the EleFits library (end-user API):
The find_package
command expects parent folder of the file FindEleFits.cmake
to be in the CMAKE_MODULE_PATH
. For now, this file is located in the sources of EleFits, in cmake/modules
(we'd like it to be installed in a more standard location in some future version). To work with the proposed CMakeLists.txt
, it should be copied inside your project:
Note that, to run executables, the EleFits library has to be in the library path. This can be done, for example, with:
which can be added to the .bashrc
, e.g.: