Wed, 20 Dec 2023 16:46:14 +0100
bring back UCX test - fixes #341
universe@753 | 1 | cmake_minimum_required(VERSION 3.14) |
universe@753 | 2 | project(ucxtest VERSION 3.0 DESCRIPTION "UAP Common Extensions - Tests") |
universe@753 | 3 | |
universe@753 | 4 | # Configuration |
universe@753 | 5 | cmake_policy(SET CMP0077 NEW) |
universe@522 | 6 | set(CMAKE_CXX_STANDARD 17) |
universe@753 | 7 | enable_testing() |
universe@510 | 8 | |
universe@656 | 9 | # Load Google Test Framework |
universe@728 | 10 | option(INSTALL_GTEST "By default googletest shall not be installed." OFF) |
universe@728 | 11 | option(BUILD_GMOCK "In this project we do not need gmock." OFF) |
universe@510 | 12 | include(FetchContent) |
universe@510 | 13 | FetchContent_Declare( |
universe@510 | 14 | googletest |
universe@510 | 15 | GIT_REPOSITORY https://github.com/google/googletest.git |
universe@510 | 16 | GIT_TAG e2239ee6043f73722e7aa812a459f54a28552929 # release 1.11.0 |
universe@510 | 17 | ) |
universe@510 | 18 | # For Windows: Prevent overriding the parent project's compiler/linker settings |
universe@510 | 19 | set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) |
universe@510 | 20 | FetchContent_MakeAvailable(googletest) |
universe@510 | 21 | include(GoogleTest) |
universe@510 | 22 | message(STATUS "Google Test made available") |
universe@510 | 23 | |
universe@512 | 24 | add_executable(ucxtest |
universe@633 | 25 | test_utils.cpp |
universe@512 | 26 | test_allocator.cpp |
universe@631 | 27 | test_compare.cpp |
universe@583 | 28 | test_string.cpp |
universe@530 | 29 | test_buffer.cpp |
universe@517 | 30 | test_list.cpp |
universe@596 | 31 | test_hash_key.cpp |
universe@556 | 32 | test_map.cpp |
universe@691 | 33 | test_map_generics.c |
universe@727 | 34 | test_mempool.cpp |
universe@636 | 35 | test_printf.cpp |
universe@512 | 36 | selftest.cpp |
universe@518 | 37 | util_allocator.cpp |
universe@510 | 38 | ) |
universe@761 | 39 | target_include_directories(ucxtest PRIVATE ${CMAKE_SOURCE_DIR}/../src) |
universe@756 | 40 | target_link_libraries(ucxtest ${CMAKE_BINARY_DIR}/../libucx_static${STLIB_EXT} gtest_main) |
universe@512 | 41 | gtest_discover_tests(ucxtest) |