Skip to content

Commit

Permalink
fix export test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
ygj6 committed Jul 2, 2020
1 parent 2cfa7ff commit 410552a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion cmake/AddEventLibrary.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ macro(add_event_library LIB_NAME)
"${LIB_NAME}_shared" PROPERTIES
OUTPUT_NAME "${LIB_NAME}-${EVENT_PACKAGE_RELEASE}"
VERSION "${CURRENT_MINUS_AGE}.${EVENT_ABI_LIBVERSION_AGE}.${EVENT_ABI_LIBVERSION_REVISION}"
SOVERSION "${CURRENT_MINUS_AGE}")
SOVERSION "${CURRENT_MINUS_AGE}"
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
endif()

if (NOT WIN32)
Expand Down
2 changes: 1 addition & 1 deletion test-export/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ project(verify)
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})
find_package(Libevent 2.1.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})
Expand Down
6 changes: 3 additions & 3 deletions test-export/test-export.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ def link_and_run(link, code):
Returns 0 if links and runs successfully, otherwise 1.
"""
exec_cmd("cmake --build . --target clean", True)
generator = ''
arch = ''
if platform.system() == "Windows":
generator = '-G "Visual Studio 15 2017 Win64"'
arch = '-A x64'
cmd = 'cmake .. %s -DEVENT__LINK_COMPONENT=%s -DEVENT__CODE_COMPONENT=%s' % (
generator, link, code)
arch, link, code)
if link_type == "static":
cmd = "".join([cmd, " -DLIBEVENT_STATIC_LINK=1"])
r = exec_cmd(cmd, True)
Expand Down

0 comments on commit 410552a

Please sign in to comment.