CMake options#

When configuring Einsums, you can set a variety of options to allow CMake to generate your specific makefiles/project files. A list of the most important CMake options can be found in important_cmake_options, while this section includes the comprehensive list.

Variables that influence how Einsums is built#

The options are split into these categories:

Generic options#

EINSUMS_FFT_LIBRARY:STRING#

FFT library

EINSUMS_WITH_CXX_STANDARD:STRING#

C++ standard to use for compiling einsums (default: 20)

Build Targets options#

BUILD_SHARED_LIBS:BOOL#

Build using shared libraries (default: ON)

EINSUMS_WITH_BINARY_DIR:PATH#

Root directory for libraries and executables for the build. This does not affect the installed location of libraries and executables.

EINSUMS_WITH_COMPILE_ONLY_TESTS:BOOL#

Create build system support for compile time only tests (default: ON)

EINSUMS_WITH_CUDA:BOOL#

Enable support for CUDA (default: OFF)

EINSUMS_WITH_DOCUMENTATION:BOOL#

Build the Einsums documentation (default OFF).

EINSUMS_WITH_DOCUMENTATION_OUTPUT_FORMATS:STRING#

List of documentation output formats to generate. Valid options are html. Multiple values can be separated with semicolons. (default html).

EINSUMS_WITH_EXAMPLES:BOOL#

Build examples (default: ON)

EINSUMS_WITH_EXECUTABLE_PREFIX:STRING#

Sets a string to be prepended to executable names (default: none).

EINSUMS_WITH_FAIL_COMPILE_TESTS:BOOL#

Create build system support for fail compile tests (default: ON)

EINSUMS_WITH_FULL_RPATH:BOOL#

Build and link libraries and executables with full RPATHs (default: ON)

EINSUMS_WITH_HIDDEN_VISIBILITY:BOOL#

Use -fvisibility=hidden for builds on platforms which support it (default: ON)

EINSUMS_WITH_HIP:BOOL#

Enable support for HIP (default: OFF)

EINSUMS_WITH_MALLOC:STRING#

Define which allocator should be linked in. Options are: system and mimalloc. (default: system)

EINSUMS_WITH_PRECOMPILED_HEADERS:BOOL#

Enabled precompiled headers for certain build targets (experimental) (default: OFF)

EINSUMS_WITH_TESTS:BOOL#

Build tests (default: ON)

EINSUMS_WITH_TESTS_BENCHMARKS:BOOL#

Build benchmark tests (default: ON)

EINSUMS_WITH_TESTS_EXAMPLES:BOOL#

Add examples as tests (default: ON)

EINSUMS_WITH_TESTS_EXTERNAL_BUILD:BOOL#

Build external CMake build tests (default: ON)

EINSUMS_WITH_TESTS_HEADERS:BOOL#

Build header tests (default: ON)

EINSUMS_WITH_TESTS_REGRESSIONS:BOOL#

Build regression tests (default: ON)

EINSUMS_WITH_TESTS_UNIT:BOOL#

Build unit tests (default: ON)

EINSUMS_WITH_UNITY_BUILD:BOOL#

Enable unity build for certain build targets (default: OFF)

Profiling options#

EINSUMS_WITH_ITTNOTIFY:BOOL#

Enable Amplifier (ITT) instrumentation support.

Debugging options#

EINSUMS_WITH_BACKTRACES:BOOL#

Attach backtraces to einsums exceptions (default: ON)

EINSUMS_WITH_CHECK_MODULE_DEPENDENCIES:BOOL#

Verify that no modules are cross-referenced from a different module category (default: OFF)

EINSUMS_WITH_COMPILER_WARNINGS:BOOL#

Enable compiler warnings (default: ON)

EINSUMS_WITH_COMPILER_WARNINGS_AS_ERROR:BOOL#

Turn compiler warnings into error (default: OFF)

EINSUMS_WITH_COVERAGE:BOOL#

Enable code coverage generation

EINSUMS_WITH_DEPRECATION_WARNINGS:BOOL#

Enable warnings for deprecated facilities. (default: ON)

EINSUMS_WITH_SANITIZERS:STRING#

Configure with sanitizer instrumentation support.

EINSUMS_WITH_TESTS_VALGRIND:BOOL#

Run selected tests with valgrind.

EINSUMS_WITH_TESTS_VALGRIND_OPTIONS:STRING#

Use these options when running tests under valgrind.

EINSUMS_WITH_THREAD_BACKTRACE_DEPTH:STRING#

Thread stack back trace depth being captured (default: 20)

EINSUMS_WITH_VALGRIND:BOOL#

Enable Valgrind instrumentation support.

Additional tools and libraries used by Einsums#

Here is a list of additional libraries and tools that are either optionally supported by the build system or are optionally required for certain examples or tests. These libraries and tools can be detected by the Einsums build system.

Each of the tools or libraries listed here will be automatically detected if they are installed in some standard location. If a tool or library is installed in a different location, you can specify its base directory by appending _ROOT to the variable name as listed below. For instance, to configure a custom directory for Amplifier, specify Amplifier_ROOT=/custom/amplifier/root.

Amplifier_ROOT:PATH#

Specifies where to look for one of the tools of the Intel Parallel Studio product, either Intel Amplifier or Intel Inspector. This should be set if the CMake variable EINSUMS_USE_ITT_NOTIFY is set to ON. Enabling ITT support in Einsums will integrate any application with the mentioned Intel tools, which customizes the generated information for your application and improves the generated diagnostics.