Skip to content

Commit c4035f8

Browse files
committed
Merge branch 'dev' into main
2 parents 7878ba4 + 010b589 commit c4035f8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+2453
-818
lines changed

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,37 @@
1+
- [libassert 2.0.0-beta](#libassert-200-beta)
12
- [libassert 2.0.0-alpha](#libassert-200-alpha)
23
- [libassert 1.2.2](#libassert-122)
34
- [libassert 1.2.1](#libassert-121)
45
- [libassert 1.2](#libassert-12)
56
- [libassert 1.1](#libassert-11)
67
- [libassert 1.0 🎉](#libassert-10-)
78

9+
## libassert 2.0.0-beta
10+
11+
Changes:
12+
- Catch2 and GoogleTest integrations
13+
- Implemented alternative path modes
14+
- {fmt} support with `LIBASSERT_USE_FMT`
15+
- Reworked stringification again
16+
- Overhauled C++ tokenizer to use a much better implementation
17+
- Added `libassert::enable_virtual_terminal_processing_if_needed()` to the public interface
18+
- Added `libassert::isatty` to the public interface as well as stdin/stdout/stderr constants
19+
- Renamed `libassert::generate_stringification` to `libassert::stringify`
20+
- Added setting for output separator with `libassert::set_separator`
21+
- Updated parameter passing for `libassert::set_color_scheme`
22+
- Updated `libassert::stacktrace` to take color scheme and skip parameters
23+
- Added C++23 specialization for how static assertion information is stored which is hopefully faster for compile times
24+
- Added `LIBASSERT_PREFIX_ASSERTIONS` option to only add assertion macros with a `LIBASSERT_` prefix
25+
- Added normalization for msvc ``​`anonymous namespace'``
26+
- Added `LIBASSERT_NO_STRINGIFY_SMART_POINTER_OBJECTS` option
27+
- Improved how data is stored in `binary_diagnostics_descriptor`, `assert_static_parameters`, and `assertion_info`
28+
- Simplified up failure handler signature
29+
- Added limit to the number of items stringified for containers
30+
- Resolved long-standing bug related to libc++'s std::regex implementation
31+
- Added methods for getting parts of assertion info outputs for easier custom failure handler implementation
32+
- Improved internal argument processing
33+
- Cmake fixes and improvements
34+
835
## libassert 2.0.0-alpha
936

1037
This is the first pre-release for version 2. Version 2 is an overhaul of the library taking lessons learned.

CMakeLists.txt

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ project(
2121
include(cmake/ProjectIsTopLevel.cmake)
2222
include(cmake/OptionVariables.cmake)
2323

24+
if(PROJECT_IS_TOP_LEVEL)
25+
find_program(CCACHE_FOUND ccache)
26+
if(CCACHE_FOUND)
27+
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
28+
endif()
29+
endif()
30+
2431
if(PROJECT_IS_TOP_LEVEL)
2532
if(CMAKE_GENERATOR STREQUAL "Ninja")
2633
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
@@ -43,7 +50,7 @@ set(LIBASSERT_MAGIC_ENUM_REPO "https://github.com/Neargye/magic_enum.git")
4350
set(LIBASSERT_MAGIC_ENUM_TAG "e55b9b54d5cf61f8e117cafb17846d7d742dd3b4") # v0.9.5
4451

4552
set(LIBASSERT_CPPTRACE_REPO "https://github.com/jeremy-rifkin/cpptrace.git")
46-
set(LIBASSERT_CPPTRACE_TAG "7fda402638875e6a265ba5e6ed376dcee4bd29fa") # v0.4.0
53+
set(LIBASSERT_CPPTRACE_TAG "58992cbeb6417764ceb190ad40d1207d929f1402") # v0.4.1
4754

4855
# obtain cpptrace
4956
if(LIBASSERT_USE_EXTERNAL_CPPTRACE)
@@ -94,6 +101,7 @@ target_sources(
94101
src/platform.cpp
95102
src/printing.cpp
96103
src/paths.cpp
104+
src/tokenizer.cpp
97105
)
98106

99107
# link dependencies
@@ -150,7 +158,7 @@ target_compile_features(
150158
PUBLIC cxx_std_17
151159
)
152160

153-
if(LIBSANITIZER_BUILD)
161+
if(LIBASSERT_SANITIZER_BUILD)
154162
add_compile_options(-fsanitize=address)
155163
add_link_options(-fsanitize=address)
156164
endif()
@@ -198,6 +206,11 @@ if(LIBASSERT_BUILD_TESTING)
198206
enable_testing()
199207
endif()
200208

209+
target_compile_definitions(
210+
${target_name} PUBLIC
211+
LIBASSERT_BUILD_TESTING
212+
)
213+
201214
# tell unit tests where our files are
202215
set(LIBASSERT_BINARY_DIR "${PROJECT_BINARY_DIR}")
203216
set(LIBASSERT_SOURCE_DIR "${PROJECT_SOURCE_DIR}")

0 commit comments

Comments
 (0)