clamav/unit_tests
Micah Snyder 1b504ef30d
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-02-13 20:07:46 -05:00
..
clamscan Store URLs from HTML when recording scan metadata json 2024-09-11 13:40:29 -04:00
examples Bump copyright dates for 2024 2024-01-22 11:27:17 -05:00
input Store URLs from HTML when recording scan metadata json 2024-09-11 13:40:29 -04:00
check_bytecode.c Remove max-allocation limits where not required 2024-03-15 13:18:47 -04:00
check_clamav.c Remove libbz2 dead code 2024-04-13 12:34:15 -04:00
check_clamav_skip.c bb12596: Fix build issue when libcheck missing 2020-08-24 15:11:07 -07:00
check_clamd.c Windows: Fix C/Rust FFI compat issue + Windows compile warnings 2024-04-09 10:35:22 -04:00
check_disasm.c Bump copyright dates for 2024 2024-01-22 11:27:17 -05:00
check_fpu_endian.c Bump copyright dates for 2024 2024-01-22 11:27:17 -05:00
check_htmlnorm.c Bump copyright dates for 2024 2024-01-22 11:27:17 -05:00
check_jsnorm.c Windows: Fix C/Rust FFI compat issue + Windows compile warnings 2024-04-09 10:35:22 -04:00
check_matchers.c Remove PCRE dead code 2024-04-13 12:34:15 -04:00
check_regex.c Windows: Fix C/Rust FFI compat issue + Windows compile warnings 2024-04-09 10:35:22 -04:00
check_str.c Bump copyright dates for 2024 2024-01-22 11:27:17 -05:00
check_uniq.c Bump copyright dates for 2024 2024-01-22 11:27:17 -05:00
checks.h CMake: Add CTest support to match Autotools checks 2021-02-25 11:41:26 -08:00
clamd_test.py Bump copyright dates for 2024 2024-01-22 11:27:17 -05:00
CMakeLists.txt CMake: Fix Windows build issue w/ conflicting libraries 2025-02-13 20:07:46 -05:00
freshclam_test.py Tests: remove unused Python modules from freshclam tests 2024-08-28 15:09:12 -04:00
libclamav_test.py Bump copyright dates for 2024 2024-01-22 11:27:17 -05:00
Run-GetLibs.ctest Test: fix check_clamd failure on Windows 2021-03-22 19:50:48 -07:00
sigtool_test.py Bump copyright dates for 2024 2024-01-22 11:27:17 -05:00
testcase.py Notify user that ole2 files are encrypted 2024-09-10 11:50:27 -04:00
valgrind.supp Valgrind: Adjust statx suppressions 2024-04-09 10:35:22 -04:00