libassert

The most over-engineered and overpowered C++ assertion library.

Latest version: 2.2.1

Add to xmake.lua

add_requires("libassert 2.2.1")

Learn how to add and link packages with Xmake →

Information

License
MIT
Recipe updated
2025-08-25T04:11:46.000Z

Platforms

  • linux: i386, x86_64, armv7, armv7s, arm64, mips, mips64, mipsel, mips64el, loong64, riscv64, s390x, ppc, ppc64, ppc64el, sparc64
  • macosx: x86_64, arm64
  • windows: x86, x64, arm, arm64, arm64ec

Options

decompose
Enables expression decomposition of && and || (this prevents short circuiting) · Type: boolean · Default: false
lowercase
Enables assert alias for ASSERT · Type: boolean · Default: false
magic_enum
Use the MagicEnum library to print better diagnostics for enum classes · Type: boolean · Default: true

Versions

  • v1.2
  • v1.2.2
  • v2.0.0
  • v2.0.1
  • v2.0.2
  • v2.1.0
  • v2.1.1
  • v2.1.2
  • v2.1.4
  • v2.1.5
  • v2.2.0
  • v2.2.1

Dependencies

No dependencies declared.

Install with xrepo

Install the package independently of a project and inspect its available configuration.

install

xrepo install "libassert 2.2.1"

show info

xrepo info "libassert"

Link a library to your target

Declare the requirement, then attach the library to the target that uses it.

xmake.lua

add_requires("libassert 2.2.1")

target("demo")
    set_kind("binary")
    add_files("src/*.cpp")
    add_packages("libassert")

Open a package environment

Open a shell with the environment exported by this package. Use the executable names documented by the package.

enter shell

xrepo env -b "libassert 2.2.1" shell