AndreaRigoni ea1aec04bd fix EXPAT::EXPAT-NOTFOUND when building with Geant4 on conda
Geant4's G4EXPATShim creates EXPAT::EXPAT (uppercase) with
IMPORTED_LOCATION set to ${EXPAT_LIBRARY}, which is empty when EXPAT
is found via conda's config-mode package (expat::expat, lowercase).

After find_package(Geant4), patch EXPAT::EXPAT with the real library
path taken from expat::expat IMPORTED_LOCATION_NOCONFIG, falling back
to find_library if needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 10:17:40 +00:00
2026-03-26 23:13:43 +00:00
2026-03-25 20:30:46 +00:00
2026-03-25 20:30:46 +00:00
2018-04-17 15:39:10 +02:00
2026-03-14 14:01:44 +00:00
2019-12-19 10:29:55 +01:00
2026-03-06 10:45:33 +00:00
2026-03-05 12:42:14 +00:00
2026-03-05 12:42:14 +00:00
2018-04-17 15:39:10 +02:00
2018-04-17 15:39:10 +02:00
2018-04-17 15:39:10 +02:00
2018-04-17 15:39:10 +02:00
2018-04-17 15:39:10 +02:00

uLib

DOI

base toolkit library

CMT Cosmic Muon Tomography reconstruction, analysis and imaging software Developed by University of Padova and INFN Sezione di Padova Italy

Build Instructions

This project relies on conan (v2) for dependency management (Eigen3, Boost) and cmake for configuration. VTK is provided through the micromamba/conda-forge environment.

Prerequisites

This project requires a conda or micromamba environment containing the necessary global tools like ROOT, VTK, and Conan (v2). We provide a condaenv.yml file to quickly build this environment.

Installing Micromamba (Optional)

If you do not have conda installed, micromamba is a fast and lightweight alternative. You can install it on Linux via:

"${SHELL}" <(curl -L micro.mamba.pm/install.sh)

Creating the Environment

You can create and activate the environment using either micromamba or conda.

Using Micromamba:

micromamba env create -f condaenv.yml
micromamba activate mutom

Using Conda:

conda env create -f condaenv.yml
conda activate mutom

Configure and Build

Standard build (GCC + Ninja + ccache)

The default conan profile uses Ninja as the generator and ccache for compiler caching, dramatically speeding up incremental rebuilds.

  1. Configure Conan profile (first time only):
conan profile detect
  1. Install Conan dependencies:
conan install . --output-folder=build --build=missing
  1. Configure with CMake:
cmake --preset conan-release
  1. Build:
cmake --build build -j$(nproc)

LLVM/Clang build (clang + lld + ccache — fastest)

A fast conan profile is provided that uses clang, lld (LLVM linker), and ccache. Install them into your environment first:

micromamba install -n mutom -y clang clangxx lld -c conda-forge

Then build using the fast profile:

conan install . --output-folder=build --build=missing --profile=fast
cmake -B build -G Ninja \
      -DCMAKE_TOOLCHAIN_FILE=build/conan_toolchain.cmake \
      -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)

The fast profile is defined at ~/.conan2/profiles/fast and sets:

  • CMAKE_C_COMPILER=clang / CMAKE_CXX_COMPILER=clang++
  • CMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld
  • CMAKE_CXX_COMPILER_LAUNCHER=ccache

Make python package

micromamba run -n mutom env USE_CUDA=ON poetry install
Description
base toolkit library
Readme 79 MiB
Languages
C++ 85.1%
CMake 9.9%
Python 2%
C 1.9%
Makefile 0.9%
Other 0.2%