Target "sniffer-test" links to item " -lpcap" which has leading or trailing whitespace. This is now an error according to policy CMP0004. pcap-config --libs outputs a leading space diff --git a/boreas/CMakeLists.txt b/boreas/CMakeLists.txt index e2f86b2..d12d530 100644 --- a/boreas/CMakeLists.txt +++ b/boreas/CMakeLists.txt @@ -65,6 +65,7 @@ if (PCAP_CONFIG) execute_process (COMMAND pcap-config --cflags OUTPUT_VARIABLE PCAP_CFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) + string(STRIP "${PCAP_LDFLAGS}" PCAP_LDFLAGS) else (PCAP_CONFIG) message (STATUS "pcap-config not found, using defaults...") set (PCAP_LDFLAGS "-L/usr/lib -lpcap")