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

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@753 39 target_link_libraries(ucxtest ${CMAKE_BINARY_DIR}/../libucx${STLIB_EXT} gtest_main)
universe@512 40 gtest_discover_tests(ucxtest)

mercurial