Skip to content

Commit

Permalink
Fix test program linkage for cross-compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
SWilson4 committed May 14, 2024
1 parent 71ee535 commit 154d8e4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@ endif()

add_executable(kat_sig_stfl kat_sig_stfl.c test_helpers.c)
target_link_libraries(kat_sig_stfl PRIVATE ${TEST_DEPS})
if(CMAKE_SYSTEM_NAME STREQUAL "Windows" AND BUILD_SHARED_LIBS)
# workaround for Windows .dll
if(CMAKE_CROSSCOMPILING)
target_link_options(kat_sig_stfl PRIVATE -Wl,--allow-multiple-definition)
else()
target_link_options(kat_sig_stfl PRIVATE "/FORCE:MULTIPLE")
endif()
endif()

add_executable(test_sig test_sig.c)
target_link_libraries(test_sig PRIVATE ${TEST_DEPS})
Expand Down

0 comments on commit 154d8e4

Please sign in to comment.