universe@656: # Use C++ for Testing universe@522: set(CMAKE_CXX_STANDARD 17) universe@510: universe@656: # Load Google Test Framework universe@728: option(INSTALL_GTEST "By default googletest shall not be installed." OFF) universe@728: option(BUILD_GMOCK "In this project we do not need gmock." OFF) universe@510: include(FetchContent) universe@510: FetchContent_Declare( universe@510: googletest universe@510: GIT_REPOSITORY https://github.com/google/googletest.git universe@510: GIT_TAG e2239ee6043f73722e7aa812a459f54a28552929 # release 1.11.0 universe@510: ) universe@510: # For Windows: Prevent overriding the parent project's compiler/linker settings universe@510: set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) universe@510: FetchContent_MakeAvailable(googletest) universe@510: include(GoogleTest) universe@510: message(STATUS "Google Test made available") universe@510: universe@512: add_executable(ucxtest universe@633: test_utils.cpp universe@512: test_allocator.cpp universe@631: test_compare.cpp universe@583: test_string.cpp universe@530: test_buffer.cpp universe@517: test_list.cpp universe@596: test_hash_key.cpp universe@556: test_map.cpp universe@691: test_map_generics.c universe@727: test_mempool.cpp universe@636: test_printf.cpp universe@512: selftest.cpp universe@518: util_allocator.cpp universe@510: ) universe@512: target_link_libraries(ucxtest PRIVATE ucx_static gtest_main) universe@512: gtest_discover_tests(ucxtest)