Skip to main content

BESA

BESA is a declarative CMake project model. Projects describe features, valid feature spaces, and semantic source units; BESA lowers that model into CMake targets and a machine-readable manifest. The same model is consumed by cpdocs, so documentation does not require a second project description.

Features and source languages are independent concepts. A project feature such as gpu may select a CUDA source unit, but the feature is still just a project capability while cuda is the unit's language.

cmake_minimum_required(VERSION 3.25)
project(example VERSION 1.0.0 LANGUAGES NONE)
find_package(besa CONFIG REQUIRED)

besa_add_feature(mpi)
besa_add_feature(gpu)

besa_keyso_zero_or_one(parallel mpi)
besa_keyso_zero_or_one(acceleration gpu)
besa_keyso_create_feature_space(supported PRODUCT parallel acceleration)
besa_set_feature_space(supported)
besa_configure_complete()

besa_add_subdirectory(DIRECTORY src/core TYPE cpp)
besa_add_subdirectory(DIRECTORY src/gpu TYPE cuda CONDITION gpu)
besa_add_subdirectory(DIRECTORY bin TYPE bin)

Built-in semantic types are c, cpp, cuda, hip, fortran, and bin. Their manifest languages are respectively c, cpp, cuda, hip, fortran, and no single language for bin. C/C++/CUDA/HIP units use include/ and lib/; Fortran additionally uses mod/; bin turns top-level .c/.cpp files into executables.

Generators register a custom type that resolves to one built-in type:

besa_register_subdirectory_type(
  jnum
  FUNCTION jnum_add_subdirectory
  RESOLVES_TO cpp
  GENERATED
)

besa_add_subdirectory(DIRECTORY schema TYPE jnum)

BESA owns the generated prefix and the global codegen target. The callback receives SOURCE_DIR, BUILD_DIR, OUTPUT_DIR, and OUTPUT_TARGET_VARIABLE; any extra ARGS supplied to besa_add_subdirectory() are forwarded unchanged. This lets cpdocs build codegen on the host and then read the generated include/, lib/, and (for Fortran) mod/ roots without building the target application.

Metadata

Release files for besa 0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for besa 0.4.2
File Size Uploaded
besa-0.4.2.tar.gz 60.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for besa 0.4.2
File Interpreter ABI Platform
besa-0.4.2-py3-none-any.whl Python 3 none any Details

Total release size: 105.8 kB

Release files / besa-0.4.2.tar.gz

Download URL besa-0.4.2.tar.gz
Size 60.5 kB
Tags Source
SHA-256 checksum
How to use checksums
52e52478894d835a12465caac2728b6b2036e6dd42318279faac1c5fa2562628
BLAKE2b-256 checksum
How to use checksums
ca52018b8c69a71cfcbb95b76b27dc295927154829927beb3e66d53c21bd0fc4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.18.1 {"ci":null,"cpu":"x86_64","distro":{"libc":{"lib":"glibc","version":"2.44"},"name":"Arch Linux"},"implementation":{"name":"CPython","version":"3.14.7"},"installer":{"name":"hatch","version":"1.18.1"},"openssl_version":"OpenSSL 3.6.4 25 Aug 2026","python":"3.14.7","system":{"name":"Linux","release":"6.18.54-1-lts"}} HTTPX2/2.13.1

Release files / besa-0.4.2-py3-none-any.whl

Download URL besa-0.4.2-py3-none-any.whl
Size 45.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
314e2dbc7343d55d2dfa35c9bdb89cb641e9e0479f2986d6754ded17e1ec1c01
BLAKE2b-256 checksum
How to use checksums
a6dd2db5d992f6a2c263405f5ad41550e91029ac5e4f5d3e3ff778cfb73c69ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.18.1 {"ci":null,"cpu":"x86_64","distro":{"libc":{"lib":"glibc","version":"2.44"},"name":"Arch Linux"},"implementation":{"name":"CPython","version":"3.14.7"},"installer":{"name":"hatch","version":"1.18.1"},"openssl_version":"OpenSSL 3.6.4 25 Aug 2026","python":"3.14.7","system":{"name":"Linux","release":"6.18.54-1-lts"}} HTTPX2/2.13.1

Release history Release notifications | RSS feed

0.4.4

2 release files

0.4.3

2 release files

This release

0.4.2 This release

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page