Edit

kc3-lang/libevent/test-export/CMakeLists.txt

Branch :

  • Show log

    Commit

  • Author : Hennadii Stepanov
    Date : 2024-11-16 21:26:55
    Hash : 2d7a3b9b
    Message : cmake: Update minimum required version Compatibility with versions of CMake older than 3.10 is now deprecated and will be removed from a future version. See: https://cmake.org/cmake/help/v3.31/release/3.31.html

  • test-export/CMakeLists.txt
  • cmake_minimum_required(VERSION 3.10)
    if (POLICY CMP0074)
        cmake_policy(SET CMP0074 NEW)
    endif()
    list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../cmake")
    project(verify)
    # set(CMAKE_VERBOSE_MAKEFILE 1)
    if(NOT ${EVENT__CODE_COMPONENT} STREQUAL "")
        string(TOUPPER ${EVENT__CODE_COMPONENT} _UPPER_COMPONENT)
    endif()
    find_package(Libevent 2.2.0 REQUIRED COMPONENTS ${EVENT__LINK_COMPONENT})
    add_definitions(-DEVENT_EXPORT_TEST_COMPONENT_${_UPPER_COMPONENT})
    add_executable(test-export test-export.c)
    target_link_libraries(test-export ${LIBEVENT_LIBRARIES})
    enable_testing()
    add_test(test-export test-export)