CMake configuration option
Synopsis
cmake --preset default -D[options]
Description
The program uses CMake as the build system and provide additional options to configure the build options, such as whether to use the ROOT dependency, whether to build documentation and the location of the installation.
Options
- USE_ROOT
OFF
(default): The program would only compile with ROOT if ROOT exists.ON
: CMake configuration will fail ifROOT
is not found.
- NO_ROOT
OFF
(default): Same as-DUSE_ROOT=OFF
.ON
: The program does NOT compiler with ROOT even if ROOT exists.
- BUILD_STATIC
OFF
(default): Use the dynamic linkage of the standard C++ library, i.e.libstdc++.so
.ON
: Use the static linkage of the standard C++ library, i.e.libstdc++.a
. If your system doesn’t havelibstdc++.a
, enabling this option would cause a failure of the build process.
- BUILD_TEST
OFF
: Disable the build the test scripts.ON
(default): Enable the build of the test scripts.
- BUILD_DOC
OFF
(default): Disable the documentation building of the project.ON
: Enable the build of the documentation as well (ifBUILD_ONLY_DOC
isOFF
).
- BUILD_ONLY_DOC
OFF
(default) Build the whole project.ON
: Only build the documentation for this project.
- CMAKE_INSTALL_PREFIX
Specify the location of the installation. The default value is
/usr/local
.
Example
To build and install the project at /home/usr_name/software/srs-daq
without ROOT dependency:
cmake --preset default . -DNO_ROOT=TRUE \
-DCMAKE_INSTALL_PREFIX="/home/user_name/software/srs-daq"