File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 3.21)
22project (bitvector)
33
44set (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)
88endif ()
99if (MSVC )
@@ -34,6 +34,7 @@ elseif(MSVC)
3434 message (WARNING "BMI1 support is not available for MSVC in this configuration." )
3535endif ()
3636
37+ # Optionally disable bounds checking in the bitvector implementation
3738
3839# Enable testing
3940enable_testing ()
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ This repository provides a small bit vector implementation along with tests and
77Bounds 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
1111cmake --build build --config Release
1212./build/bitvector_benchmark
1313```
You can’t perform that action at this time.
0 commit comments