Tue, 04 Oct 2022 19:25:07 +0200
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
universe@510 | 1 | # Load Google Test Framework |
universe@522 | 2 | set(CMAKE_CXX_STANDARD 17) |
universe@510 | 3 | |
universe@510 | 4 | include(FetchContent) |
universe@510 | 5 | FetchContent_Declare( |
universe@510 | 6 | googletest |
universe@510 | 7 | GIT_REPOSITORY https://github.com/google/googletest.git |
universe@510 | 8 | GIT_TAG e2239ee6043f73722e7aa812a459f54a28552929 # release 1.11.0 |
universe@510 | 9 | ) |
universe@510 | 10 | # For Windows: Prevent overriding the parent project's compiler/linker settings |
universe@510 | 11 | set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) |
universe@510 | 12 | FetchContent_MakeAvailable(googletest) |
universe@510 | 13 | include(GoogleTest) |
universe@510 | 14 | message(STATUS "Google Test made available") |
universe@510 | 15 | |
universe@512 | 16 | add_executable(ucxtest |
universe@512 | 17 | test_allocator.cpp |
universe@583 | 18 | test_string.cpp |
universe@530 | 19 | test_buffer.cpp |
universe@517 | 20 | test_list.cpp |
universe@515 | 21 | test_tree.cpp |
universe@556 | 22 | test_map.cpp |
universe@571 | 23 | test_basic_mempool.cpp |
universe@512 | 24 | selftest.cpp |
universe@518 | 25 | util_allocator.cpp |
universe@510 | 26 | ) |
universe@512 | 27 | target_link_libraries(ucxtest PRIVATE ucx_static gtest_main) |
universe@512 | 28 | gtest_discover_tests(ucxtest) |