Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
MartyRuntimeConfig Class Reference

Runtime resolver for the MARTY installation used by generated code. More...

#include <MartyRuntimeConfig.h>

Classes

struct  InstallInfo
 

Static Public Member Functions

static InstallInfo set_external_install_path (const std::filesystem::path &path)
 Register a user-provided MARTY installation path.
 
static void clear_external_install_path ()
 Clear the user-provided path and return to the default fallback.
 
static InstallInfo resolve ()
 Resolve the MARTY install that should be used now.
 
static InstallInfo require_available (const std::string &context)
 Validate and return the active MARTY installation.
 
static std::string shell_quote (const std::filesystem::path &path)
 Shell-quote a path for command strings passed to std::system().
 
static std::filesystem::path default_install_path ()
 
static bool was_external_path_provided ()
 

Detailed Description

Runtime resolver for the MARTY installation used by generated code.

The resolver lets API code register an existing MARTY installation before Hyperiso initialization. If no explicit path is registered, it falls back to the historical Third_party/MARTY/MARTY_INSTALL location produced by -DBUILD_WITH_MARTY=ON.

A valid installation prefix is expected to expose at least:

  • include/marty.h
  • lib/libmarty.so, lib/libmarty.dylib or lib/libmarty.a

A bin/marty executable is detected and reported when present, but is not required by the current generated-code pipeline, which links libmarty directly.

Definition at line 30 of file MartyRuntimeConfig.h.

Member Function Documentation

◆ clear_external_install_path()

static void MartyRuntimeConfig::clear_external_install_path ( )
inlinestatic

Clear the user-provided path and return to the default fallback.

Definition at line 62 of file MartyRuntimeConfig.h.

◆ default_install_path()

static std::filesystem::path MartyRuntimeConfig::default_install_path ( )
inlinestatic

Definition at line 122 of file MartyRuntimeConfig.h.

◆ require_available()

static InstallInfo MartyRuntimeConfig::require_available ( const std::string &  context)
inlinestatic

Validate and return the active MARTY installation.

Emits a detailed LOG_ERROR when neither a valid external installation nor the default BUILD_WITH_MARTY installation is available.

Definition at line 85 of file MartyRuntimeConfig.h.

◆ resolve()

static InstallInfo MartyRuntimeConfig::resolve ( )
inlinestatic

Resolve the MARTY install that should be used now.

Definition at line 70 of file MartyRuntimeConfig.h.

◆ set_external_install_path()

static InstallInfo MartyRuntimeConfig::set_external_install_path ( const std::filesystem::path &  path)
inlinestatic

Register a user-provided MARTY installation path.

The input can be either the install prefix itself, a path containing a MARTY_INSTALL/ or install/ child, the include directory, the lib directory, the marty.h file, or the libmarty library file.

Definition at line 53 of file MartyRuntimeConfig.h.

◆ shell_quote()

static std::string MartyRuntimeConfig::shell_quote ( const std::filesystem::path &  path)
inlinestatic

Shell-quote a path for command strings passed to std::system().

Definition at line 107 of file MartyRuntimeConfig.h.

◆ was_external_path_provided()

static bool MartyRuntimeConfig::was_external_path_provided ( )
inlinestatic

Definition at line 127 of file MartyRuntimeConfig.h.


The documentation for this class was generated from the following file: