1cmake_minimum_required(VERSION 3.1.2) 2if (POLICY CMP0074) 3 cmake_policy(SET CMP0074 NEW) 4endif() 5project(verify) 6# set(CMAKE_VERBOSE_MAKEFILE 1) 7if(NOT ${EVENT__CODE_COMPONENT} STREQUAL "") 8 string(TOUPPER ${EVENT__CODE_COMPONENT} _UPPER_COMPONENT) 9endif() 10find_package(Libevent 2.1.0 REQUIRED COMPONENTS ${EVENT__LINK_COMPONENT}) 11add_definitions(-DEVENT_EXPORT_TEST_COMPONENT_${_UPPER_COMPONENT}) 12add_executable(test-export test-export.c) 13target_link_libraries(test-export ${LIBEVENT_LIBRARIES}) 14enable_testing() 15add_test(test-export test-export) 16