Skip to content

Commit 85b992a

Browse files
committed
[c] support dynamic loading on Windows: test
1 parent 0592abd commit 85b992a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/dynamic_loading/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ target_link_libraries(
3030

3131
# Put all outputs in the same directory so Boost.DLL can locate the shared
3232
# libraries relative to the test executable at runtime.
33+
# ENABLE_EXPORTS is required so that symbols from each shared library are
34+
# visible to other shared libraries loaded at runtime (e.g. dl_test_overrider
35+
# can resolve symbols from dl_test_method/dl_test_registry).
3336
foreach(
3437
target dl_test_registry dl_test_method dl_test_overrider
3538
boost_openmethod-test_dynamic_loading)
@@ -38,7 +41,8 @@ foreach(
3841
PROPERTIES
3942
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
4043
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
41-
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
44+
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
45+
ENABLE_EXPORTS ON)
4246
endforeach()
4347

4448
add_test(

0 commit comments

Comments
 (0)