aboutsummaryrefslogtreecommitdiff
path: root/tests/CMakeLists.txt
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2021-01-25 23:27:22 +0100
committerPali Rohár <pali.rohar@gmail.com>2021-01-27 18:58:21 +0100
commit86a41b921ca5c4bad1d0d7e54f9276046a25e319 (patch)
treea8b64ba1d9a4cf2432d1f65333a1de1dd6a9299e /tests/CMakeLists.txt
parenta5af061ce1d1bb3f58e74c48c0698dad59d79937 (diff)
downloaddlfcn-win32-86a41b921ca5c4bad1d0d7e54f9276046a25e319.tar.gz
dlfcn-win32-86a41b921ca5c4bad1d0d7e54f9276046a25e319.tar.bz2
dlfcn-win32-86a41b921ca5c4bad1d0d7e54f9276046a25e319.zip
Function dladdr() now retrieve symbol name and symbol address from both export and import tables
dladdr tests for Windows now should always pass like on other systems.
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r--tests/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 00b6647..47fef38 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -25,6 +25,13 @@ target_link_libraries(test-dladdr dl)
25if(UNIX) 25if(UNIX)
26 set_target_properties(test-dladdr PROPERTIES COMPILE_FLAGS "-Wl,--export-dynamic -fpie") 26 set_target_properties(test-dladdr PROPERTIES COMPILE_FLAGS "-Wl,--export-dynamic -fpie")
27endif() 27endif()
28if(WIN32 AND NOT BUILD_SHARED_LIBS)
29 if(MSVC)
30 set_property(TARGET test-dladdr APPEND_STRING PROPERTY LINK_FLAGS "/EXPORT:dlopen /EXPORT:dladdr")
31 else()
32 set_property(TARGET test-dladdr APPEND_STRING PROPERTY LINK_FLAGS "-Wl,--export-all-symbols")
33 endif()
34endif()
28 35
29install(TARGETS test-dladdr EXPORT dlfcn-win32-targets RUNTIME DESTINATION bin) 36install(TARGETS test-dladdr EXPORT dlfcn-win32-targets RUNTIME DESTINATION bin)
30 37