clamav/unit_tests
Micah Snyder 134b4e7f3c
CMake: Fix Windows build issue w/ conflicting libraries
At install, the CMake build may fail if it detects the same library
dependency in two locations. This happened for us with the following
error:

  CMake Error at libfreshclam/cmake_install.cmake:157 (file):
    file Multiple conflicting paths found for libcrypto-3-x64.dll:

      C:/Users/clamav_jenkins_svc.TALOS/clam_dependencies/x64/lib/libcrypto-3-x64.dll
      C:/WINDOWS/system32/libcrypto-3-x64.dll
      C:\WINDOWS\system32/libcrypto-3-x64.dll
  Call Stack (most recent call first):
    cmake_install.cmake:96 (include)

This happens when system provided DLL names match exactly with the ones
we provide. ClamAV woudld't prefer that DLL at load time, because it
looks in the EXE directory first. But it does confuse the `file()`
command used to locate build dependencies.

The fix in this commit uses a regex to exclude all libraries found under
C:\Windows
2025-05-21 17:12:50 -04:00
..
clamscan Tests: python 3.5 compatibility fixes 2023-05-19 16:59:20 -07:00
examples Add example program to test cl_cvdunpack & test 2022-10-12 21:46:54 -07:00
input Fix unit test caused by expiring signing certificate 2024-08-13 12:36:50 -04:00
check_bytecode.c Allmatch-mode overhaul, part 1: append_virus 2022-10-19 13:13:57 -07:00
check_clamav.c Scanners: Remove allmatch checks + significant code cleanup 2022-10-19 13:13:57 -07:00
check_clamav_skip.c bb12596: Fix build issue when libcheck missing 2020-08-24 15:11:07 -07:00
check_clamd.c Add explicit log level parameter to application logging API 2022-02-15 15:13:55 -08:00
check_disasm.c DB read logic cleanup, fix some warnings 2022-02-23 12:28:31 -07:00
check_fpu_endian.c Bump copyright for 2022 2022-01-09 14:23:25 -07:00
check_htmlnorm.c Bump copyright for 2022 2022-01-09 14:23:25 -07:00
check_jsnorm.c Bump copyright for 2022 2022-01-09 14:23:25 -07:00
check_matchers.c PE, ELF, Mach-O: code cleanup 2022-10-19 13:13:57 -07:00
check_regex.c Allmatch-mode overhaul, part 1: append_virus 2022-10-19 13:13:57 -07:00
check_str.c Scanners: Remove allmatch checks + significant code cleanup 2022-10-19 13:13:57 -07:00
check_uniq.c Bump copyright for 2022 2022-01-09 14:23:25 -07:00
checks.h CMake: Add CTest support to match Autotools checks 2021-02-25 11:41:26 -08:00
clamd_test.py Test: Add clamdscan --allmatch stickiness regression test 2022-11-04 15:46:33 -07:00
CMakeLists.txt CMake: Fix Windows build issue w/ conflicting libraries 2025-05-21 17:12:50 -04:00
freshclam_test.py Tests: remove unused Python modules from freshclam tests 2024-08-28 16:09:09 -04:00
libclamav_test.py Bump copyright for 2022 2022-01-09 14:23:25 -07:00
Run-GetLibs.ctest Test: fix check_clamd failure on Windows 2021-03-22 19:50:48 -07:00
sigtool_test.py Tests: python 3.5 compatibility fixes 2023-05-19 16:59:20 -07:00
testcase.py Tests: Increase default timeout to 10 minutes 2022-03-02 21:44:48 -07:00
valgrind.supp CMake: Fix LLVM linking issues: libclamav_rust, -ltinfo 2022-03-09 20:35:42 -08:00