Main changes:
-
Upgraded
DarkPACKto support the latest version ofMARTY -
Overloaded
<<forParam_t -
MARTYitself has been upgraded to support explicitly the assignment operator ofInitSanitizer, by ensuring that its name remains untouched, allowing for consistent debugging when an exception is thrown
This CMakeLists.txt file is used to configure and build the MyProject project. It sets up the necessary build options, finds required packages, and defines custom targets for documentation generation and code formatting.
Prints the values of the given variables.
Lists all models in the src directory that start with dp_.
Checks if a file should be excluded based on the defined patterns.
Option to enable or disable documentation generation with Doxygen.
Option to enable or disable the compilation of the CMA submodule and dependent libraries.
Option to enable or disable clang-format to modify files.
List of model libraries to compile.
List of external libraries to be linked.
List of compile options for linking external libraries.
List of commands to install headers only.
Patterns to exclude from clang-format.
Custom target for headers installation.
Custom target for documentation generation with Doxygen.
Custom target to run clang-format to change files.
Custom target to run clang-format to check code style compliance.
Adds the DPMathLib subdirectory.
Adds the Test subdirectory.
Adds the CMA-ES submodule if ENABLE_SUBMODULE_CMA is enabled.
If BUILD_DOCUMENTATION is enabled and Doxygen is found, a custom target for documentation generation is added.
If ENABLE_CLANG_FORMAT is enabled, custom targets for running clang-format are added.
This CMakeLists.txt file sets up the build environment for MyProject, including options for documentation generation, code formatting, and submodule compilation. It defines custom functions, options, variables, and targets to streamline the build process.
In order to use this package, MARTY has to be installed and configured on your machine.
No further external dependencies are required.
We encourage users to read carefully this section on requirements before proceeding with the installation. It may save you some time, especially if you are on Linux and you are installing MARTY for the first time.
You can copy this package in the directory that you prefer:
wget https://gitlab.in2p3.fr/darkpack/darkpack-public/-/archive/master/darkpack-public-master.tar.gz
tar -xf darkpack-public-master.tar.gz
cd darkpack-public-master
On Linux and Mac it is possible to download, install and configure MARTY by running the (unofficial) script install_marty.sh in the folder where you wish to install MARTY.
The script will extract and compile the version on MARTY
contained in the file marty-public.tar.gz,
provided that the dependencies are installed.
You can find all the details about installations and dependencies on MARTY's website.
If you want to install the latest version, you can open the script and modify it. There is already a function to do it. For any problem with the installation of MARTY we recommend to visit MARTY's website.
The following procedure refers to the mssm2to2 library. The same results can be obtained for any library (named e.g. newlib), simply replacing mssm2to2 with newlib and vice versa in what follows.
Note that all the scripts are written for a bash environment. If you wish to use another shell, you may need to adjust the scripts. It is important that the environmental variable INSTALLMARTYPATH is defined and that is the path where MARTY has been built.
If you used the script to compile MARTY, it will help you to set this variable.
Once MARTY is installed, you are ready to use this package!
The manual can be found in this repository and also here.
In order to generate a new model, you need to
-
place its source file in the folder
src/models; -
compile it, by calling
./lib_generate.sh <1> <2>where
<1>is the name of the library you want as output, and<2>is the name of the.cppfile (without its extension) -
now the model is generated, you need to copy it into
src. To do so, run the script./lib_copy.sh <1>where
<1>is the same as before. This script will also genrate theCMakeLists.txtneeded in the projects.
-
you need to add your new model into the
CMakeLists.txtin the root folder. Add the line:add_subdirectory(src/dp_<1>)where
<1>is the same as before, after the other projects are added. -
you can compile all the models together by using
cmake. Otherwise, you can use the scripts we provide./configure.sh ./build.shwhich will, respectively, configure and build
DarkPACKin release mode, and usingninjaas build system.