Install Validation-Rules Static Libraries

The default installation flow described in Install the Parser as Static Library installs:

  • The parser static library

  • The public header files

  • The exported CMake package configuration

If you also want validation-rules support in your installation, configure which validation-rules variant should be installed. During installation, CMake will:

  • Build the selected static library

  • Install it together with the parser library

  • Export its CMake target alongside the parser target

Configure the Validation-Rules Variant

Select the validation-rules variant during CMake configuration using ERBSLAND_CONFIGURATION_INSTALL_VR_VARIANT.

Example (std::regex variant):

$ git clone https://github.com/erbsland-dev/erbsland-cpp-configuration.git
$ mkdir build
$ cd build
$ cmake ../erbsland-cpp-configuration -G Ninja \
    -DCMAKE_BUILD_TYPE=Release \
    -DERBSLAND_CONFIGURATION_INSTALL_VR_VARIANT=re-std

Available values:

none

Default. Install the parser only.

re-disabled

Install erbsland-configuration-vr-re-disabled (no matches support).

re-std

Install erbsland-configuration-vr-re-std (matches using std::regex).

re-erbsland

Install erbsland-configuration-vr-re-erbsland (matches using erbsland-re).

all

Install all validation-rules variants.

Unless you are packaging for distribution, we strongly recommend selecting exactly one variant in consumer projects.

Choosing the Right Variant

If you plan to use matches constraints with regular expressions, we recommend the Erbsland Regular Expression library. It is designed for stability, safety, and predictable behavior across platforms.

Using std::regex reduces external dependencies, but keep in mind:

  • Behavior may differ between platforms.

  • Stability and performance depend heavily on the compiler and standard library implementation.

  • Edge-case handling is not consistent across environments.

If you do not plan to use the matches constraint, selecting re-disabled is a safe and dependency-free choice.

Build and Install

After configuration, build your project as usual and run the install step:

$ cmake --build .
$ cmake --install . --prefix /usr/local

This installs:

  • liberbsland-configuration-parser.a

  • The selected validation-rules archive (for example liberbsland-configuration-vr-re-std.a)

  • Parser and validation-rules headers required by the public API

  • CMake package configuration files exporting both targets