CMake: Fix win32 linking issue affecting unit tests w/ LLVM runtime

I observed undefined symbol errors when linking the bytecode_runtime
object with the check_* test executables on Windows when using LLVM
built from source. I'm not sure why, exactly, but these symbols should
all be present in the ClamAV::libclamav library that we're linking with,
so I don't know why we link with the object library targets in addition
to the libclamav shared/or/static library target.

This commit removes linking with those extra object library targets.
pull/486/head
Micah Snyder 3 years ago committed by Micah Snyder
parent b07b1a65cb
commit 426dd461f6
  1. 20
      unit_tests/CMakeLists.txt

@ -47,13 +47,9 @@ if(ENABLE_APP)
check_fpu_endian.c)
target_link_libraries(check_fpu_endian
PRIVATE
libcheck::check
ClamAV::libclamav
regex
lzma_sdk
yara
libcheck::check
${LIBTFM}
bytecode_runtime
JSONC::jsonc
${LIBMSPACK}
OpenSSL::SSL
@ -86,14 +82,10 @@ if(ENABLE_APP)
PRIVATE check_clamd.c checks.h)
target_link_libraries(check_clamd
PRIVATE
libcheck::check
ClamAV::common
ClamAV::libclamav
regex
lzma_sdk
yara
ClamAV::common
libcheck::check
${LIBTFM}
bytecode_runtime
JSONC::jsonc
${LIBMSPACK}
OpenSSL::SSL
@ -139,13 +131,9 @@ target_sources(check_clamav
check_uniq.c)
target_link_libraries(check_clamav
PRIVATE
libcheck::check
ClamAV::libclamav
regex
lzma_sdk
yara
libcheck::check
${LIBTFM}
bytecode_runtime
JSONC::jsonc
${LIBMSPACK}
OpenSSL::SSL

Loading…
Cancel
Save