Build And Integrate
NeoMC currently builds from source as a set of static C++20 libraries.
Requirements
- CMake 3.20 or newer;
- a C++20 compiler;
- POSIX threads;
- HDF5 C and Zlib when importer support is enabled.
Build The Core Libraries
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --target neomc_core --parallelThe default build does not enable importers, benchmark consumers, data tools or core-evidence executables.
Use NeoMC From Another CMake Project
The current repository does not install or export a find_package(NeoMC) package. Add the source tree as a subdirectory:
add_subdirectory(path/to/neomc)
add_executable(my_transport main.cc)
target_link_libraries(my_transport PRIVATE neomc_simulation)neomc_simulation brings the public runtime dependencies transitively. Link a lower-level target only when the application deliberately uses that module without the simulation runtime.
Applications that use file-backed data resolvers also link the importer target:
target_link_libraries(
my_transport
PRIVATE
neomc_simulation
neomc_physics_data_importers
)Build Importers And Repository Examples
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DNEOMC_BUILD_IMPORTERS=ON \
-DNEOMC_BUILD_BENCHMARKS=ON
cmake --build build --parallelThe available options are:
| Option | Default | Purpose |
|---|---|---|
NEOMC_BUILD_IMPORTERS | OFF | HDF5, ENDF and reference-data importers |
NEOMC_BUILD_BENCHMARKS | OFF | repository use-case consumers |
NEOMC_BUILD_GEANT4_BENCHMARKS | OFF | optional Geant4 comparison programs |
NEOMC_BUILD_CORE_EVIDENCE | OFF | narrow physics evidence executables |
NEOMC_BUILD_DATA_TOOLS | OFF | evaluated-data processing and audit tools |
Benchmark and Geant4 builds require importers.
Physics Data Is Separate
The source repository does not bundle complete transport libraries. Importer examples expect authoritative upstream files under a local data/ tree or at paths supplied on the command line. See Physics data and cross sections before running a data-backed example.