Skip to content

Commit 0ce975b

Browse files
committed
Merge latest main into work
1 parent 38bb221 commit 0ce975b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 3.21)
22
project(bitvector)
33

44
set(CMAKE_CXX_STANDARD 17)
5-
option(BV_BOUNDS_CHECK "Enable bounds checking in bitvector" ON)
6-
if(NOT BV_BOUNDS_CHECK)
5+
option(BITVECTOR_NO_BOUND_CHECK "Disable bounds checking in bitvector" OFF)
6+
if(BITVECTOR_NO_BOUND_CHECK)
77
add_compile_definitions(BITVECTOR_NO_BOUND_CHECK)
88
endif()
99
if(MSVC)
@@ -34,6 +34,7 @@ elseif(MSVC)
3434
message(WARNING "BMI1 support is not available for MSVC in this configuration.")
3535
endif()
3636

37+
# Optionally disable bounds checking in the bitvector implementation
3738

3839
# Enable testing
3940
enable_testing()

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This repository provides a small bit vector implementation along with tests and
77
Bounds checking is enabled by default. To benchmark without checks, configure and build with (this defines `BITVECTOR_NO_BOUND_CHECK`):
88

99
```bash
10-
cmake -S . -B build -DBV_BOUNDS_CHECK=OFF -DCMAKE_BUILD_TYPE=Release
10+
cmake -S . -B build -DBITVECTOR_NO_BOUND_CHECK=ON -DCMAKE_BUILD_TYPE=Release
1111
cmake --build build --config Release
1212
./build/bitvector_benchmark
1313
```

0 commit comments

Comments
 (0)