Skip to content

Releases: ph3at/libenvpp

v1.5.2

09 Dec 15:44

Choose a tag to compare

Support reusing system dependencies and building as shared library

The cmake option LIBENVPP_USE_SYSTEM_DEPS was added to allow using system dependencies (fmt) rather than using the bundled dependency provided by libenvpp.

Also BUILD_SHARED_LIBS is now correctly respected to allow building as a shared library.

All the new build variants are now also tested through integration tests in CI.

v1.5.1

26 Nov 13:07

Choose a tag to compare

Use https instead of git protocol for submodules

This fixes the issue where cloning is not possible without ssh authentification. This for example happens for other projects that depend on libenvpp and use CI where ssh authentication isn't usually setup.

v1.5.0

22 Nov 15:51

Choose a tag to compare

New interface for easier option parsing

register_option/register_required_option has received a new overload which takes a list of (option_string, option_type) pairs which will be used for both parsing and error checking. This eliminates the need for having a separate default_parser specialization for the option enum.

v1.4.4

15 Oct 17:41

Choose a tag to compare

Improved cmake configuration

Fix cmake error reported in #11 due to missing CMakePackageConfigHelpers include when installing libenvpp.

v1.4.3

07 Oct 14:28

Choose a tag to compare

Improved cmake dependency handling

libenvpp now detects if dependencies have already been provided by the parent project and reuses them. This was previously only supported when using FetchContent which has this built-in, but now this also works when manually adding dependencies either through find_package or add_subdirectory.

Additionally the dependencies of libenvpp are now fetched from submodules with FetchContent instead of from the respective git repo. This has the benefit that no internet connection is required when configuring through cmake, as long as the submodules were previously cloned.

v1.4.2

18 Sep 13:42

Choose a tag to compare

Support for MinGW

libenvpp now supports MinGW. The version of catch2 that libenvpp depended on had issues with MinGW which has been resolved upstream. libenvpp now depends on v3.7.1 which works with MinGW.

fmt was also updated to v11.0.2, since it was causing a lot of warnings with MinGW otherwise.

A warning produced by libenvpp when using MinGW was also fixed.

v1.4.1

23 Apr 13:08

Choose a tag to compare

Bug fixes to string handling

The libenvpp internal string handling on windows was treating empty strings as not present which lead to unexpected exceptions being thrown. Issue reported in #7.

This release also hardens against string conversion failures, so that they don't crash irrecoverably.

v1.4.0

29 Dec 15:00

Choose a tag to compare

More versatile bool parsing

The internal bool parser has been extended to be more versatile. Previously only 0/false and 1/true (case-sensitive) were supported. Now libenvpp can natively parse 0/false/off/no and 1/true/on/yes as bool in a case-insensitive way.

v1.3.0

10 Aug 16:25

Choose a tag to compare

New interface register_deprecated

A new interface has been added to allow marking certain environment variables as deprecated and providing a message to the user on what to do.

Usage example:

auto pre = env::prefix("APP");
pre.register_deprecated("FEATURE", "The option 'APP_FEATURE' has been deprecated since version x.y. Please use SOMETHING instead.");

v1.2.0

24 Jul 10:32

Choose a tag to compare

New overload for env::scoped_test_environment

Constructing a scoped test environment now requires less code. For the use-case where only one variable is required there's now a specific overload that allows construction like this:

const auto _ = env::scoped_test_environment("MYPROG_ENV_VAR", "value");

and for more than one variable this syntax can be used:

const auto _ = env::scoped_test_environment({
    {"MYPROG_LOG_FILE_PATH", "/dev/null"},
    {"MYPROG_NUM_THREADS", "8"},
});