Cetmodules Documentation

Overview

Cetmodules is, at its core, a wrapper around low-level CMake functionality intended to fulfill the following goals:

  1. Reduce the number of CMake commands necessary to accomplish common tasks, including for “modern” (v3+) CMake functionality such as pseudo-targets.

  2. Generate CMake config files automatically, taking care of the bookkeeping necessary to handle transitive dependencies with minimum user intervention.

  3. Provide domain-specific build tools useful to scientists utilizing the Art HEP analysis framwork to process data from (mainly) neutrino experiments.

Target user base

Cetmodules was developed as a backward-compatible replacement for an earlier tool (“cetbuildtools”) satisfying the latter goal mentioned above. This was intimately tied to a domain-specific package management system called UPS. Notwithstanding its origins, Cetmodules is intended to be a general build tool—although someone from outside the original target community might encounter some puzzling terminology, vestigial functionality, or other endearing quirks.

Documentation notes

Information specific to legacy compatibility and domain-specific features will be marked with appropriate admonitions:

cetbuildtools

You will only care about this information if you are porting code from cetbuidltools.

… or:

HEP

This is a Find module specific to HEP.

… or:

ROOT

This is a feature that supports building code using ROOT.

Compatibility

  • Cetmodules requires CMake >= 3.22.

cetbuildtools

  • Cetmodules >= 2.10.00 is backward-compatible with cetbuildtools >= 7.00.00.

Unported cetbuildtools code will generate many deprecation and other warnings. To temporarily disable these warnings, add -DCET_WARN_DEPRECATED:BOOL=NO to your CMake configuration command-line options.

Some cetbuildtools-style behavior is different or disabled in Cetmodules by default either because it is inefficient, inflexible or against modern best practice. Examples include use of UPS-specific variables or terminology, or library-path variables instead of targets in dependency lists. These can be enabled on a per-package basis by adding -D{project}_OLD_STYLE_CONFIG_VARS:BOOL=YES to your CMake configuration command-line options.

Reference Documentation

Latest reference documentation (with links to other versions)

License

BSD 3-Clause

Copyright 2010–2023 FERMI NATIONAL ACCELERATOR LABORATORY

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Support

If Fermilab has an applicable MOU and/or SLA with your organization, support will be provided thereunder; otherwise support is best-effort only and no warranty is expressed or implied thereby.

Contributing

Contributions to Cetmodules are welcome via GitHub pull request.