File tree Expand file tree Collapse file tree 13 files changed +229
-219
lines changed
Expand file tree Collapse file tree 13 files changed +229
-219
lines changed Original file line number Diff line number Diff line change @@ -46,14 +46,14 @@ jobs:
4646 - name : Install Build Tools
4747 run : |
4848 brew update
49- brew install cmake ninja boost google-sparsehash
49+ brew install cmake ninja google-sparsehash
5050 - uses : actions/checkout@v4
5151 - name : Configure Multi-Config
5252 run : cmake -B "$BUILD_DIR" -DPTRIE_BuildTests=ON -DPTRIE_BuildBenchmark=OFF
53- - name : Build Debug
54- run : cmake --build "$BUILD_DIR" --config Debug
55- - name : Test Debug
56- run : ctest --test-dir "$BUILD_DIR" -C Debug
53+ # - name: Build Debug
54+ # run: cmake --build "$BUILD_DIR" --config Debug
55+ # - name: Test Debug
56+ # run: ctest --test-dir "$BUILD_DIR" -C Debug
5757 - name : Build Release
5858 run : cmake --build "$BUILD_DIR" --config Release
5959 - name : Test Release
Original file line number Diff line number Diff line change @@ -46,14 +46,14 @@ jobs:
4646 - name : Install Build Tools
4747 run : |
4848 brew update
49- brew install cmake ninja boost google-sparsehash
49+ brew install cmake ninja google-sparsehash
5050 - uses : actions/checkout@v4
5151 - name : Configure Multi-Config
5252 run : cmake -B "$BUILD_DIR" -DPTRIE_BuildTests=ON -DPTRIE_BuildBenchmark=OFF
53- - name : Build Debug
54- run : cmake --build "$BUILD_DIR" --config Debug
55- - name : Test Debug
56- run : ctest --test-dir "$BUILD_DIR" -C Debug
53+ # - name: Build Debug
54+ # run: cmake --build "$BUILD_DIR" --config Debug
55+ # - name: Test Debug
56+ # run: ctest --test-dir "$BUILD_DIR" -C Debug
5757 - name : Build Release
5858 run : cmake --build "$BUILD_DIR" --config Release
5959 - name : Test Release
Original file line number Diff line number Diff line change 4646 - name : Install Build Tools
4747 run : |
4848 brew update
49- brew install cmake ninja boost google-sparsehash
49+ brew install cmake ninja google-sparsehash
5050 - uses : actions/checkout@v4
5151 - name : Configure Multi-Config
5252 run : cmake -B "$BUILD_DIR" -DPTRIE_BuildTests=ON -DPTRIE_BuildBenchmark=OFF
Original file line number Diff line number Diff line change 4343 - name : Install Build Tools
4444 run : |
4545 sudo apt-get -qq update
46- sudo apt-get -qq install cmake ninja-build g++ libsparsehash-dev libboost-test-dev
46+ sudo apt-get -qq install cmake ninja-build g++ libsparsehash-dev
4747 - uses : actions/checkout@v4
4848 - name : Configure Multi-Config
4949 run : cmake -B "$BUILD_DIR" -DPTRIE_BuildTests=ON -DPTRIE_BuildBenchmark=OFF
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ include(cmake/sanitizers.cmake)
2222if (NOT CMAKE_BUILD_TYPE MATCHES Prebuild)
2323 add_subdirectory (src)
2424 if (PTRIE_BuildTests)
25+ include (cmake/doctest.cmake)
2526 enable_testing ()
2627 add_subdirectory (test )
2728 endif ()
Original file line number Diff line number Diff line change @@ -13,12 +13,12 @@ cmake --install build-quick --config Release --prefix=$PWD/local
1313Ubuntu (assuming 24.04 LTS):
1414``` shell
1515sudo apt install cmake ninja-build g++
16- sudo apt install libsparsehash-dev libboost-test-dev
16+ sudo apt install libsparsehash-dev
1717```
1818macOS (install [ XCode from AppStore] ( https://apps.apple.com/us/app/xcode/id497799835 ) , and [ Homebrew] ( https://brew.sh ) ):
1919``` shell
2020brew install cmake ninja
21- brew install google-sparsehash boost
21+ brew install google-sparsehash
2222```
2323
2424## Configure, Build, Test and Benchmark
Original file line number Diff line number Diff line change 1+ # Downloads and compiles DocTest unit testing framework
2+ include (FetchContent)
3+ set (FETCHCONTENT_QUIET ON )
4+ set (FETCHCONTENT_UPDATES_DISCONNECTED ON )
5+
6+ set (DOCTEST_WITH_TESTS OFF CACHE BOOL "Build tests/examples" )
7+ set (DOCTEST_WITH_MAIN_IN_STATIC_LIB ON CACHE BOOL "Build a static lib for doctest::doctest_with_main" )
8+ set (DOCTEST_NO_INSTALL OFF CACHE BOOL "Skip the installation process" )
9+ set (DOCTEST_USE_STD_HEADERS OFF CACHE BOOL "Use std headers" )
10+
11+ FetchContent_Declare(doctest
12+ GIT_REPOSITORY https://github.com/doctest/doctest.git
13+ GIT_TAG v2.4.12 # "main" for latest
14+ GIT_SHALLOW TRUE # download specific revision only (git clone --depth 1)
15+ GIT_PROGRESS TRUE # show download progress in Ninja
16+ USES_TERMINAL_DOWNLOAD TRUE )
17+ FetchContent_MakeAvailable(doctest)
Original file line number Diff line number Diff line change 1- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.30.0" )
2- cmake_policy (SET CMP0167 NEW) # FindBoost from boost installation
3- endif ()
4- find_package (Boost 1.83 REQUIRED COMPONENTS unit_test_framework)
5-
61add_executable (Delete delete.cpp)
72add_executable (Set set.cpp)
83add_executable (Map map.cpp)
94add_executable (StableSet stable_set.cpp)
105
11- target_link_libraries (Set PRIVATE ptrie Boost::unit_test_framework )
12- target_link_libraries (Delete PRIVATE ptrie Boost::unit_test_framework )
13- target_link_libraries (StableSet PRIVATE ptrie Boost::unit_test_framework )
14- target_link_libraries (Map PRIVATE ptrie Boost::unit_test_framework )
6+ target_link_libraries (Set PRIVATE ptrie doctest::doctest_with_main )
7+ target_link_libraries (Delete PRIVATE ptrie doctest::doctest_with_main )
8+ target_link_libraries (StableSet PRIVATE ptrie doctest::doctest_with_main )
9+ target_link_libraries (Map PRIVATE ptrie doctest::doctest_with_main )
1510
1611add_test (NAME Set COMMAND Set)
1712add_test (NAME Delete COMMAND Delete)
You can’t perform that action at this time.
0 commit comments