]> granicus.if.org Git - libevent/commitdiff
cmake: eliminate EVENT_BUILDING_REGRESS_TEST, since we link with shared libs
authorAzat Khuzhin <a3at.mail@gmail.com>
Mon, 13 Mar 2017 21:07:17 +0000 (00:07 +0300)
committerAzat Khuzhin <a3at.mail@gmail.com>
Mon, 13 Mar 2017 21:33:37 +0000 (00:33 +0300)
Before 7182c2f561570cd9ceb704623ebe9ae3608c7b43 ("cmake: build SHARED
and STATIC libraries (like autoconf does)") it links with *.c.

CMakeLists.txt
include/event2/visibility.h

index 72e37cea7525e3ffdb93843e5a5f4bc68be805e8..f274082a2de6cc9e43f7ddfb89f98e195669ae73 100644 (file)
@@ -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()
index 74d259a97177e670d34a81906b94537d531cf001..57ea3b76c8397abc9422483b6674ae546ac0fafe 100644 (file)
@@ -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