From 30f2a969e8ace4472ada981e4cef9159b61e1d78 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Tue, 14 Mar 2017 00:07:17 +0300 Subject: [PATCH] cmake: eliminate EVENT_BUILDING_REGRESS_TEST, since we link with shared libs Before 7182c2f561570cd9ceb704623ebe9ae3608c7b43 ("cmake: build SHARED and STATIC libraries (like autoconf does)") it links with *.c. --- CMakeLists.txt | 10 +--------- include/event2/visibility.h | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 72e37cea..f274082a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -983,19 +983,11 @@ if (NOT EVENT__DISABLE_TESTS) add_executable(regress ${SRC_REGRESS}) - # While building the test suite we don't want the visibility - # header trying to "dllimport" the symbols on windows (it - # generates a ton of warnings due to different link - # attributes for all of the symbols) - set_target_properties(regress - PROPERTIES COMPILE_DEFINITIONS - "EVENT_BUILDING_REGRESS_TEST=1") - target_link_libraries(regress ${LIB_APPS} ${LIB_PLATFORM} event_core_shared - event_extra_static) + event_extra_shared) if (NOT EVENT__DISABLE_OPENSSL) target_link_libraries(regress event_openssl_shared) endif() diff --git a/include/event2/visibility.h b/include/event2/visibility.h index 74d259a9..57ea3b76 100644 --- a/include/event2/visibility.h +++ b/include/event2/visibility.h @@ -44,7 +44,7 @@ # define EVENT2_EXPORT_SYMBOL /* unknown compiler */ # endif #else -# if defined(_MSC_VER) && !defined(EVENT_BUILDING_REGRESS_TEST) +# if defined(_MSC_VER) # define EVENT2_EXPORT_SYMBOL extern __declspec(dllimport) # else # define EVENT2_EXPORT_SYMBOL