tests/CMakeLists.txt

Thu, 12 Oct 2023 00:00:35 +0200

author
Mike Becker <universe@uap-core.de>
date
Thu, 12 Oct 2023 00:00:35 +0200
changeset 753
24dc84788dee
parent 728
71c4ac35c1ce
child 756
0b635553b86a
permissions
-rw-r--r--

replace most of the build system with uwproj

     1 cmake_minimum_required(VERSION 3.14)
     2 project(ucxtest VERSION 3.0 DESCRIPTION "UAP Common Extensions - Tests")
     4 # Configuration
     5 cmake_policy(SET CMP0077 NEW)
     6 set(CMAKE_CXX_STANDARD 17)
     7 enable_testing()
     9 # Load Google Test Framework
    10 option(INSTALL_GTEST "By default googletest shall not be installed." OFF)
    11 option(BUILD_GMOCK "In this project we do not need gmock." OFF)
    12 include(FetchContent)
    13 FetchContent_Declare(
    14         googletest
    15         GIT_REPOSITORY https://github.com/google/googletest.git
    16         GIT_TAG e2239ee6043f73722e7aa812a459f54a28552929 # release 1.11.0
    17 )
    18 # For Windows: Prevent overriding the parent project's compiler/linker settings
    19 set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
    20 FetchContent_MakeAvailable(googletest)
    21 include(GoogleTest)
    22 message(STATUS "Google Test made available")
    24 add_executable(ucxtest
    25         test_utils.cpp
    26         test_allocator.cpp
    27         test_compare.cpp
    28         test_string.cpp
    29         test_buffer.cpp
    30         test_list.cpp
    31         test_hash_key.cpp
    32         test_map.cpp
    33         test_map_generics.c
    34         test_mempool.cpp
    35         test_printf.cpp
    36         selftest.cpp
    37         util_allocator.cpp
    38         )
    39 target_link_libraries(ucxtest ${CMAKE_BINARY_DIR}/../libucx${STLIB_EXT} gtest_main)
    40 gtest_discover_tests(ucxtest)

mercurial