test/CMakeLists.txt

Tue, 04 Oct 2022 19:25:07 +0200

author
Mike Becker <universe@uap-core.de>
date
Tue, 04 Oct 2022 19:25:07 +0200
changeset 591
7df0bcaecffa
parent 583
0f3c9662f9b5
child 596
52fcaf3c9154
permissions
-rw-r--r--

fix over-optimization of strstr

1. it's actually less performant to frequently read bytes
from an array instead of using the native word length
2. the SBO buffer should be local and not static to allow
multi-threading usage

     1 # Load Google Test Framework
     2 set(CMAKE_CXX_STANDARD 17)
     4 include(FetchContent)
     5 FetchContent_Declare(
     6         googletest
     7         GIT_REPOSITORY https://github.com/google/googletest.git
     8         GIT_TAG e2239ee6043f73722e7aa812a459f54a28552929 # release 1.11.0
     9 )
    10 # For Windows: Prevent overriding the parent project's compiler/linker settings
    11 set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
    12 FetchContent_MakeAvailable(googletest)
    13 include(GoogleTest)
    14 message(STATUS "Google Test made available")
    16 add_executable(ucxtest
    17         test_allocator.cpp
    18         test_string.cpp
    19         test_buffer.cpp
    20         test_list.cpp
    21         test_tree.cpp
    22         test_map.cpp
    23         test_basic_mempool.cpp
    24         selftest.cpp
    25         util_allocator.cpp
    26         )
    27 target_link_libraries(ucxtest PRIVATE ucx_static gtest_main)
    28 gtest_discover_tests(ucxtest)

mercurial