From 8411ea9cc24af34a600b4d7f8a4a1088320672e1 Mon Sep 17 00:00:00 2001 From: Sirius Bakke Date: Thu, 19 Mar 2020 23:36:30 +0100 Subject: [PATCH] chore: Optionally link net-snmp --- src/unit_tests/AddressRangeDialogTest/CMakeLists.txt | 6 +++++- src/unit_tests/AddressTableTest/CMakeLists.txt | 6 +++++- src/unit_tests/CustomServiceDialogTest/CMakeLists.txt | 6 +++++- src/unit_tests/DNSTest/CMakeLists.txt | 6 +++++- src/unit_tests/FirewallDialogTest/CMakeLists.txt | 6 +++++- src/unit_tests/GroupObjectDialogTest/CMakeLists.txt | 6 +++++- src/unit_tests/ICMP6ServiceDialogTest/CMakeLists.txt | 6 +++++- src/unit_tests/ICMPServiceDialogTest/CMakeLists.txt | 6 +++++- src/unit_tests/IPDialogTest/CMakeLists.txt | 6 +++++- src/unit_tests/IPServiceDialogTest/CMakeLists.txt | 6 +++++- src/unit_tests/ImporterTest/CMakeLists.txt | 6 +++++- src/unit_tests/InterfaceDialogTest/CMakeLists.txt | 6 +++++- src/unit_tests/NetworkDialogTest/CMakeLists.txt | 6 +++++- src/unit_tests/ObjectManipulatorTest/CMakeLists.txt | 6 +++++- src/unit_tests/ObjectMatcherTest/CMakeLists.txt | 6 +++++- src/unit_tests/PFImporterTest/CMakeLists.txt | 6 +++++- src/unit_tests/PIXImporterTest/CMakeLists.txt | 6 +++++- src/unit_tests/RCS/CMakeLists.txt | 6 +++++- src/unit_tests/RuleSetViewContextMenuTest/CMakeLists.txt | 6 +++++- src/unit_tests/RuleSetViewTest/CMakeLists.txt | 6 +++++- src/unit_tests/TCPServiceDialogTest/CMakeLists.txt | 6 +++++- src/unit_tests/TagServiceDialogTest/CMakeLists.txt | 6 +++++- src/unit_tests/UDPServiceDialogTest/CMakeLists.txt | 6 +++++- src/unit_tests/UsageResolverTest/CMakeLists.txt | 6 +++++- src/unit_tests/UserSerivceDialogTest/CMakeLists.txt | 6 +++++- src/unit_tests/compilerLibTest/CMakeLists.txt | 6 +++++- src/unit_tests/generatedScriptTestsIpfilter/CMakeLists.txt | 6 +++++- src/unit_tests/generatedScriptTestsIpfw/CMakeLists.txt | 6 +++++- src/unit_tests/generatedScriptTestsLinux/CMakeLists.txt | 6 +++++- src/unit_tests/generatedScriptTestsPF/CMakeLists.txt | 6 +++++- src/unit_tests/generatedScriptTestsSecuwall/CMakeLists.txt | 6 +++++- src/unit_tests/genericDialogTest/CMakeLists.txt | 6 +++++- src/unit_tests/instDialogClusterTest/CMakeLists.txt | 6 +++++- src/unit_tests/instDialogCompileTest/CMakeLists.txt | 6 +++++- src/unit_tests/instDialogInspectTest/CMakeLists.txt | 6 +++++- src/unit_tests/instDialogInstallTest/CMakeLists.txt | 6 +++++- src/unit_tests/instDialogObjectListTest/CMakeLists.txt | 6 +++++- src/unit_tests/newClusterDialogTest/CMakeLists.txt | 6 +++++- src/unit_tests/parseCommandLineTest/CMakeLists.txt | 6 +++++- src/unit_tests/startTipDialogTest/CMakeLists.txt | 6 +++++- 40 files changed, 200 insertions(+), 40 deletions(-) diff --git a/src/unit_tests/AddressRangeDialogTest/CMakeLists.txt b/src/unit_tests/AddressRangeDialogTest/CMakeLists.txt index ef95e43ed..6442a08c5 100644 --- a/src/unit_tests/AddressRangeDialogTest/CMakeLists.txt +++ b/src/unit_tests/AddressRangeDialogTest/CMakeLists.txt @@ -3,4 +3,8 @@ SET(CMAKE_AUTOMOC ON) add_executable(AddressRangeDialogTest AddressRangeDialogTest.cpp main_AddressRangeDialogTest.cpp) add_test(NAME AddressRangeDialogTest COMMAND AddressRangeDialogTest) -target_link_libraries(AddressRangeDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder netsnmp xml2 xslt z pthread Qt5::Test) +target_link_libraries(AddressRangeDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(AddressRangeDialogTest netsnmp) +ENDIF() diff --git a/src/unit_tests/AddressTableTest/CMakeLists.txt b/src/unit_tests/AddressTableTest/CMakeLists.txt index 3a249dc74..5a2ae91f9 100644 --- a/src/unit_tests/AddressTableTest/CMakeLists.txt +++ b/src/unit_tests/AddressTableTest/CMakeLists.txt @@ -3,7 +3,11 @@ SET(CMAKE_AUTOMOC ON) add_executable(AddressTableTest AddressTableTest.cpp main.cpp) add_test(NAME AddressTableTest COMMAND AddressTableTest) -target_link_libraries(AddressTableTest PRIVATE test_main netsnmp gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) +target_link_libraries(AddressTableTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(AddressTableTest netsnmp) +ENDIF() file(COPY addresstable-1.txt addresstable-2.txt DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/src/unit_tests/CustomServiceDialogTest/CMakeLists.txt b/src/unit_tests/CustomServiceDialogTest/CMakeLists.txt index eb318f671..33d5e90ad 100644 --- a/src/unit_tests/CustomServiceDialogTest/CMakeLists.txt +++ b/src/unit_tests/CustomServiceDialogTest/CMakeLists.txt @@ -3,4 +3,8 @@ SET(CMAKE_AUTOMOC ON) add_executable(CustomServiceDialogTest CustomServiceDialogTest.cpp main_CustomServiceDialogTest.cpp) add_test(NAME CustomServiceDialogTest COMMAND CustomServiceDialogTest) -target_link_libraries(CustomServiceDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder netsnmp xml2 xslt z pthread Qt5::Test) +target_link_libraries(CustomServiceDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(CustomServiceDialogTest netsnmp) +ENDIF() diff --git a/src/unit_tests/DNSTest/CMakeLists.txt b/src/unit_tests/DNSTest/CMakeLists.txt index 7440719c6..566744ea6 100644 --- a/src/unit_tests/DNSTest/CMakeLists.txt +++ b/src/unit_tests/DNSTest/CMakeLists.txt @@ -3,4 +3,8 @@ SET(CMAKE_AUTOMOC ON) add_executable(DNSTest DNSTest.cpp main.cpp) add_test(NAME DNSTest COMMAND DNSTest) -target_link_libraries(DNSTest PRIVATE test_main netsnmp gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) +target_link_libraries(DNSTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(DNSTest netsnmp) +ENDIF() diff --git a/src/unit_tests/FirewallDialogTest/CMakeLists.txt b/src/unit_tests/FirewallDialogTest/CMakeLists.txt index 2b6fe584a..e73f2cb94 100644 --- a/src/unit_tests/FirewallDialogTest/CMakeLists.txt +++ b/src/unit_tests/FirewallDialogTest/CMakeLists.txt @@ -3,4 +3,8 @@ SET(CMAKE_AUTOMOC ON) add_executable(FirewallDialogTest FirewallDialogTest.cpp main_FirewallDialogTest.cpp) add_test(NAME FirewallDialogTest COMMAND FirewallDialogTest) -target_link_libraries(FirewallDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder netsnmp xml2 xslt z pthread Qt5::Test) +target_link_libraries(FirewallDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(FirewallDialogTest netsnmp) +ENDIF() diff --git a/src/unit_tests/GroupObjectDialogTest/CMakeLists.txt b/src/unit_tests/GroupObjectDialogTest/CMakeLists.txt index b3f4b9a4e..1fafccbbc 100644 --- a/src/unit_tests/GroupObjectDialogTest/CMakeLists.txt +++ b/src/unit_tests/GroupObjectDialogTest/CMakeLists.txt @@ -3,4 +3,8 @@ SET(CMAKE_AUTOMOC ON) add_executable(GroupObjectDialogTest GroupObjectDialogTest.cpp main_GroupObjectDialogTest.cpp) add_test(NAME GroupObjectDialogTest COMMAND GroupObjectDialogTest) -target_link_libraries(GroupObjectDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder netsnmp xml2 xslt z pthread Qt5::Test) +target_link_libraries(GroupObjectDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(GroupObjectDialogTest netsnmp) +ENDIF() diff --git a/src/unit_tests/ICMP6ServiceDialogTest/CMakeLists.txt b/src/unit_tests/ICMP6ServiceDialogTest/CMakeLists.txt index 1ba403a11..0122bed8f 100644 --- a/src/unit_tests/ICMP6ServiceDialogTest/CMakeLists.txt +++ b/src/unit_tests/ICMP6ServiceDialogTest/CMakeLists.txt @@ -3,4 +3,8 @@ SET(CMAKE_AUTOMOC ON) add_executable(ICMP6ServiceDialogTest ICMP6ServiceDialogTest.cpp main_ICMP6ServiceDialogTest.cpp) add_test(NAME ICMP6ServiceDialogTest COMMAND ICMP6ServiceDialogTest) -target_link_libraries(ICMP6ServiceDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder netsnmp xml2 xslt z pthread Qt5::Test) +target_link_libraries(ICMP6ServiceDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(ICMP6ServiceDialogTest netsnmp) +ENDIF() diff --git a/src/unit_tests/ICMPServiceDialogTest/CMakeLists.txt b/src/unit_tests/ICMPServiceDialogTest/CMakeLists.txt index 9b0e52f36..c50b7c535 100644 --- a/src/unit_tests/ICMPServiceDialogTest/CMakeLists.txt +++ b/src/unit_tests/ICMPServiceDialogTest/CMakeLists.txt @@ -3,4 +3,8 @@ SET(CMAKE_AUTOMOC ON) add_executable(ICMPServiceDialogTest ICMPServiceDialogTest.cpp main_ICMPServiceDialogTest.cpp) add_test(NAME ICMPServiceDialogTest COMMAND ICMPServiceDialogTest) -target_link_libraries(ICMPServiceDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder netsnmp xml2 xslt z pthread Qt5::Test) +target_link_libraries(ICMPServiceDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(ICMPServiceDialogTest netsnmp) +ENDIF() diff --git a/src/unit_tests/IPDialogTest/CMakeLists.txt b/src/unit_tests/IPDialogTest/CMakeLists.txt index 9e2f94c91..eaf0b6e7f 100644 --- a/src/unit_tests/IPDialogTest/CMakeLists.txt +++ b/src/unit_tests/IPDialogTest/CMakeLists.txt @@ -3,4 +3,8 @@ SET(CMAKE_AUTOMOC ON) add_executable(IPDialogTest IPDialogTest.cpp main_IPDialogTest.cpp) add_test(NAME IPDialogTest COMMAND IPDialogTest) -target_link_libraries(IPDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder netsnmp xml2 xslt z pthread Qt5::Test) +target_link_libraries(IPDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(IPDialogTest netsnmp) +ENDIF() diff --git a/src/unit_tests/IPServiceDialogTest/CMakeLists.txt b/src/unit_tests/IPServiceDialogTest/CMakeLists.txt index 3502b3981..cf6d4d244 100644 --- a/src/unit_tests/IPServiceDialogTest/CMakeLists.txt +++ b/src/unit_tests/IPServiceDialogTest/CMakeLists.txt @@ -3,4 +3,8 @@ SET(CMAKE_AUTOMOC ON) add_executable(IPServiceDialogTest IPServiceDialogTest.cpp main_IPServiceDialogTest.cpp) add_test(NAME IPServiceDialogTest COMMAND IPServiceDialogTest) -target_link_libraries(IPServiceDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder netsnmp xml2 xslt z pthread Qt5::Test) +target_link_libraries(IPServiceDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(IPServiceDialogTest netsnmp) +ENDIF() diff --git a/src/unit_tests/ImporterTest/CMakeLists.txt b/src/unit_tests/ImporterTest/CMakeLists.txt index 741f029a7..f069fa632 100644 --- a/src/unit_tests/ImporterTest/CMakeLists.txt +++ b/src/unit_tests/ImporterTest/CMakeLists.txt @@ -3,7 +3,11 @@ set (CMAKE_AUTOMOC ON) add_executable(ImporterTest ImporterTest.cpp main_ImporterTest.cpp) add_test(NAME ImporterTest COMMAND ImporterTest) -target_link_libraries(ImporterTest PRIVATE test_main netsnmp gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) +target_link_libraries(ImporterTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(ImporterTest netsnmp) +ENDIF() file(COPY test_data DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/src/unit_tests/InterfaceDialogTest/CMakeLists.txt b/src/unit_tests/InterfaceDialogTest/CMakeLists.txt index 47d019d24..0903479ef 100644 --- a/src/unit_tests/InterfaceDialogTest/CMakeLists.txt +++ b/src/unit_tests/InterfaceDialogTest/CMakeLists.txt @@ -3,4 +3,8 @@ SET(CMAKE_AUTOMOC ON) add_executable(InterfaceDialogTest InterfaceDialogTest.cpp main_InterfaceDialogTest.cpp) add_test(NAME InterfaceDialogTest COMMAND InterfaceDialogTest) -target_link_libraries(InterfaceDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder netsnmp xml2 xslt z pthread Qt5::Test) +target_link_libraries(InterfaceDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(InterfaceDialogTest netsnmp) +ENDIF() diff --git a/src/unit_tests/NetworkDialogTest/CMakeLists.txt b/src/unit_tests/NetworkDialogTest/CMakeLists.txt index 018c86089..582a96763 100644 --- a/src/unit_tests/NetworkDialogTest/CMakeLists.txt +++ b/src/unit_tests/NetworkDialogTest/CMakeLists.txt @@ -3,4 +3,8 @@ SET(CMAKE_AUTOMOC ON) add_executable(NetworkDialogTest NetworkDialogTest.cpp main_NetworkDialogTest.cpp) add_test(NAME NetworkDialogTest COMMAND NetworkDialogTest) -target_link_libraries(NetworkDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder netsnmp xml2 xslt z pthread Qt5::Test) +target_link_libraries(NetworkDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(NetworkDialogTest netsnmp) +ENDIF() diff --git a/src/unit_tests/ObjectManipulatorTest/CMakeLists.txt b/src/unit_tests/ObjectManipulatorTest/CMakeLists.txt index 4b96cd8ac..d3dcb6b8f 100644 --- a/src/unit_tests/ObjectManipulatorTest/CMakeLists.txt +++ b/src/unit_tests/ObjectManipulatorTest/CMakeLists.txt @@ -3,6 +3,10 @@ SET(CMAKE_AUTOMOC ON) add_executable(ObjectManipulatorTest ObjectManipulatorTest.cpp main_ObjectManipulatorTest.cpp) add_test(NAME ObjectManipulatorTest COMMAND ObjectManipulatorTest) -target_link_libraries(ObjectManipulatorTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder netsnmp xml2 xslt z pthread Qt5::Test) +target_link_libraries(ObjectManipulatorTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(ObjectManipulatorTest netsnmp) +ENDIF() file(COPY test.fwb DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/src/unit_tests/ObjectMatcherTest/CMakeLists.txt b/src/unit_tests/ObjectMatcherTest/CMakeLists.txt index cea186f5e..f2a118986 100644 --- a/src/unit_tests/ObjectMatcherTest/CMakeLists.txt +++ b/src/unit_tests/ObjectMatcherTest/CMakeLists.txt @@ -3,6 +3,10 @@ set (CMAKE_AUTOMOC ON) add_executable(ObjectMatcherTest ObjectMatcherTest.cpp main.cpp) add_test(NAME ObjectMatcherTest COMMAND ObjectMatcherTest) -target_link_libraries(ObjectMatcherTest PRIVATE test_main netsnmp gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) +target_link_libraries(ObjectMatcherTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(ObjectMatcherTest netsnmp) +ENDIF() file(COPY test_data.fwb DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/src/unit_tests/PFImporterTest/CMakeLists.txt b/src/unit_tests/PFImporterTest/CMakeLists.txt index 79c521163..812f53e6d 100644 --- a/src/unit_tests/PFImporterTest/CMakeLists.txt +++ b/src/unit_tests/PFImporterTest/CMakeLists.txt @@ -3,7 +3,11 @@ set (CMAKE_AUTOMOC ON) add_executable(PFImporterTest PFImporterTest.cpp main_PFImporterTest.cpp) add_test(NAME PFImporterTest COMMAND PFImporterTest) -target_link_libraries(PFImporterTest PRIVATE test_main netsnmp gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) +target_link_libraries(PFImporterTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(PFImporterTest netsnmp) +ENDIF() file(COPY test_data DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/src/unit_tests/PIXImporterTest/CMakeLists.txt b/src/unit_tests/PIXImporterTest/CMakeLists.txt index e52ca338e..ec0def180 100644 --- a/src/unit_tests/PIXImporterTest/CMakeLists.txt +++ b/src/unit_tests/PIXImporterTest/CMakeLists.txt @@ -3,7 +3,11 @@ set (CMAKE_AUTOMOC ON) add_executable(PIXImporterTest PIXImporterTest.cpp main_PIXImporterTest.cpp) add_test(NAME PIXImporterTest COMMAND PIXImporterTest) -target_link_libraries(PIXImporterTest PRIVATE test_main netsnmp gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) +target_link_libraries(PIXImporterTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(PIXImporterTest netsnmp) +ENDIF() file(COPY test_data DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/src/unit_tests/RCS/CMakeLists.txt b/src/unit_tests/RCS/CMakeLists.txt index de4d3a6e7..02b40ce3b 100644 --- a/src/unit_tests/RCS/CMakeLists.txt +++ b/src/unit_tests/RCS/CMakeLists.txt @@ -3,6 +3,10 @@ set (CMAKE_AUTOMOC ON) add_executable(RCSTest RCSTest.cpp main_RCS.cpp) add_test(NAME RCSTest COMMAND RCSTest) -target_link_libraries(RCSTest PRIVATE test_main netsnmp gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) +target_link_libraries(RCSTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(RCSTest netsnmp) +ENDIF() file(COPY rlog_unit_test.log "zu.fwb,v" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/src/unit_tests/RuleSetViewContextMenuTest/CMakeLists.txt b/src/unit_tests/RuleSetViewContextMenuTest/CMakeLists.txt index c60d26f90..c8e30baa6 100644 --- a/src/unit_tests/RuleSetViewContextMenuTest/CMakeLists.txt +++ b/src/unit_tests/RuleSetViewContextMenuTest/CMakeLists.txt @@ -3,4 +3,8 @@ SET(CMAKE_AUTOMOC ON) add_executable(RuleSetViewContextMenuTest RuleSetViewContextMenuTest.cpp main_RuleSetViewContextMenuTest.cpp) add_test(NAME RuleSetViewContextMenuTest COMMAND RuleSetViewContextMenuTest) -target_link_libraries(RuleSetViewContextMenuTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder netsnmp xml2 xslt z pthread Qt5::Test) +target_link_libraries(RuleSetViewContextMenuTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(RuleSetViewContextMenuTest netsnmp) +ENDIF() diff --git a/src/unit_tests/RuleSetViewTest/CMakeLists.txt b/src/unit_tests/RuleSetViewTest/CMakeLists.txt index 902c034a3..a6d7b7e49 100644 --- a/src/unit_tests/RuleSetViewTest/CMakeLists.txt +++ b/src/unit_tests/RuleSetViewTest/CMakeLists.txt @@ -3,4 +3,8 @@ SET(CMAKE_AUTOMOC ON) add_executable(RuleSetViewTest RuleSetViewTest.cpp main_RuleSetViewTest.cpp) add_test(NAME RuleSetViewTest COMMAND RuleSetViewTest) -target_link_libraries(RuleSetViewTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder netsnmp xml2 xslt z pthread Qt5::Test) +target_link_libraries(RuleSetViewTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(RuleSetViewTest netsnmp) +ENDIF() diff --git a/src/unit_tests/TCPServiceDialogTest/CMakeLists.txt b/src/unit_tests/TCPServiceDialogTest/CMakeLists.txt index f9379fc00..94c21de4e 100644 --- a/src/unit_tests/TCPServiceDialogTest/CMakeLists.txt +++ b/src/unit_tests/TCPServiceDialogTest/CMakeLists.txt @@ -3,4 +3,8 @@ SET(CMAKE_AUTOMOC ON) add_executable(TCPServiceDialogTest TCPServiceDialogTest.cpp main_TCPServiceDialogTest.cpp) add_test(NAME TCPServiceDialogTest COMMAND TCPServiceDialogTest) -target_link_libraries(TCPServiceDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder netsnmp xml2 xslt z pthread Qt5::Test) +target_link_libraries(TCPServiceDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(TCPServiceDialogTest netsnmp) +ENDIF() diff --git a/src/unit_tests/TagServiceDialogTest/CMakeLists.txt b/src/unit_tests/TagServiceDialogTest/CMakeLists.txt index 415c51404..c18543ab1 100644 --- a/src/unit_tests/TagServiceDialogTest/CMakeLists.txt +++ b/src/unit_tests/TagServiceDialogTest/CMakeLists.txt @@ -3,4 +3,8 @@ SET(CMAKE_AUTOMOC ON) add_executable(TagServiceDialogTest TagServiceDialogTest.cpp main_TagServiceDialogTest.cpp) add_test(NAME TagServiceDialogTest COMMAND TagServiceDialogTest) -target_link_libraries(TagServiceDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder netsnmp xml2 xslt z pthread Qt5::Test) +target_link_libraries(TagServiceDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(TagServiceDialogTest netsnmp) +ENDIF() diff --git a/src/unit_tests/UDPServiceDialogTest/CMakeLists.txt b/src/unit_tests/UDPServiceDialogTest/CMakeLists.txt index 7134d8971..882cad33a 100644 --- a/src/unit_tests/UDPServiceDialogTest/CMakeLists.txt +++ b/src/unit_tests/UDPServiceDialogTest/CMakeLists.txt @@ -3,4 +3,8 @@ SET(CMAKE_AUTOMOC ON) add_executable(UDPServiceDialogTest UDPServiceDialogTest.cpp main_UDPServiceDialogTest.cpp) add_test(NAME UDPServiceDialogTest COMMAND UDPServiceDialogTest) -target_link_libraries(UDPServiceDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder netsnmp xml2 xslt z pthread Qt5::Test) +target_link_libraries(UDPServiceDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(UDPServiceDialogTest netsnmp) +ENDIF() diff --git a/src/unit_tests/UsageResolverTest/CMakeLists.txt b/src/unit_tests/UsageResolverTest/CMakeLists.txt index f31cd0151..da804955a 100644 --- a/src/unit_tests/UsageResolverTest/CMakeLists.txt +++ b/src/unit_tests/UsageResolverTest/CMakeLists.txt @@ -3,4 +3,8 @@ set (CMAKE_AUTOMOC ON) add_executable(UsageResolverTest UsageResolverTest.cpp main_UsageResolverTest.cpp) add_test(NAME UsageResolverTest COMMAND UsageResolverTest) -target_link_libraries(UsageResolverTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder netsnmp xml2 xslt z pthread Qt5::Test) +target_link_libraries(UsageResolverTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(UsageResolverTest netsnmp) +ENDIF() diff --git a/src/unit_tests/UserSerivceDialogTest/CMakeLists.txt b/src/unit_tests/UserSerivceDialogTest/CMakeLists.txt index dbbdcebb5..420e00adb 100644 --- a/src/unit_tests/UserSerivceDialogTest/CMakeLists.txt +++ b/src/unit_tests/UserSerivceDialogTest/CMakeLists.txt @@ -3,4 +3,8 @@ SET(CMAKE_AUTOMOC ON) add_executable(UserServiceDialogTest UserServiceDialogTest.cpp main_UserServiceDialogTest.cpp) add_test(NAME UserServiceDialogTest COMMAND UserServiceDialogTest) -target_link_libraries(UserServiceDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder netsnmp xml2 xslt z pthread Qt5::Test) +target_link_libraries(UserServiceDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(UserServiceDialogTest netsnmp) +ENDIF() diff --git a/src/unit_tests/compilerLibTest/CMakeLists.txt b/src/unit_tests/compilerLibTest/CMakeLists.txt index 5e44ad642..d79191a50 100644 --- a/src/unit_tests/compilerLibTest/CMakeLists.txt +++ b/src/unit_tests/compilerLibTest/CMakeLists.txt @@ -5,6 +5,10 @@ add_definitions(-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\") add_executable(compilerLibTest interfacePropertiesTest.cpp tests_main.cpp) add_test(NAME compilerLibTest COMMAND compilerLibTest) -target_link_libraries(compilerLibTest PRIVATE test_main netsnmp gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) +target_link_libraries(compilerLibTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(compilerLibTest netsnmp) +ENDIF() file(COPY test.fwb DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/src/unit_tests/generatedScriptTestsIpfilter/CMakeLists.txt b/src/unit_tests/generatedScriptTestsIpfilter/CMakeLists.txt index 8733b132c..caad1d6fb 100644 --- a/src/unit_tests/generatedScriptTestsIpfilter/CMakeLists.txt +++ b/src/unit_tests/generatedScriptTestsIpfilter/CMakeLists.txt @@ -3,7 +3,11 @@ SET(CMAKE_AUTOMOC ON) add_executable(generatedScriptTestsIpfilter generatedScriptTestsIpfilter.cpp main_generatedScriptTestsIpfilter.cpp) add_test(NAME generatedScriptTestsIpfilter COMMAND generatedScriptTestsIpfilter) -target_link_libraries(generatedScriptTestsIpfilter PRIVATE test_main netsnmp gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) +target_link_libraries(generatedScriptTestsIpfilter PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(generatedScriptTestsIpfilter netsnmp) +ENDIF() file(COPY test1.fwb DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/src/unit_tests/generatedScriptTestsIpfw/CMakeLists.txt b/src/unit_tests/generatedScriptTestsIpfw/CMakeLists.txt index aaaff9159..feae11725 100644 --- a/src/unit_tests/generatedScriptTestsIpfw/CMakeLists.txt +++ b/src/unit_tests/generatedScriptTestsIpfw/CMakeLists.txt @@ -3,7 +3,11 @@ SET(CMAKE_AUTOMOC ON) add_executable(generatedScriptTestsIpfw generatedScriptTestsIpfw.cpp main_generatedScriptTestsIpfw.cpp) add_test(NAME generatedScriptTestsIpfw COMMAND generatedScriptTestsIpfw) -target_link_libraries(generatedScriptTestsIpfw PRIVATE test_main netsnmp gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) +target_link_libraries(generatedScriptTestsIpfw PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(generatedScriptTestsIpfw netsnmp) +ENDIF() file(COPY test1.fwb DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/src/unit_tests/generatedScriptTestsLinux/CMakeLists.txt b/src/unit_tests/generatedScriptTestsLinux/CMakeLists.txt index 7cdb5d894..0c862ac58 100644 --- a/src/unit_tests/generatedScriptTestsLinux/CMakeLists.txt +++ b/src/unit_tests/generatedScriptTestsLinux/CMakeLists.txt @@ -3,7 +3,11 @@ SET(CMAKE_AUTOMOC ON) add_executable(generatedScriptTestsLinux generatedScriptTestsLinux.cpp main_generatedScriptTestsLinux.cpp) add_test(NAME generatedScriptTestsLinux COMMAND generatedScriptTestsLinux) -target_link_libraries(generatedScriptTestsLinux PRIVATE test_main netsnmp gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) +target_link_libraries(generatedScriptTestsLinux PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(generatedScriptTestsLinux netsnmp) +ENDIF() file(COPY test1.fwb DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/src/unit_tests/generatedScriptTestsPF/CMakeLists.txt b/src/unit_tests/generatedScriptTestsPF/CMakeLists.txt index bcec28947..896264b8c 100644 --- a/src/unit_tests/generatedScriptTestsPF/CMakeLists.txt +++ b/src/unit_tests/generatedScriptTestsPF/CMakeLists.txt @@ -3,7 +3,11 @@ SET(CMAKE_AUTOMOC ON) add_executable(generatedScriptTestsPF generatedScriptTestsPF.cpp main_generatedScriptTestsPF.cpp) add_test(NAME generatedScriptTestsPF COMMAND generatedScriptTestsPF) -target_link_libraries(generatedScriptTestsPF PRIVATE test_main netsnmp gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) +target_link_libraries(generatedScriptTestsPF PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(generatedScriptTestsPF netsnmp) +ENDIF() file(COPY test1.fwb DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/src/unit_tests/generatedScriptTestsSecuwall/CMakeLists.txt b/src/unit_tests/generatedScriptTestsSecuwall/CMakeLists.txt index d1d73d6bf..69e14c195 100644 --- a/src/unit_tests/generatedScriptTestsSecuwall/CMakeLists.txt +++ b/src/unit_tests/generatedScriptTestsSecuwall/CMakeLists.txt @@ -3,7 +3,11 @@ SET(CMAKE_AUTOMOC ON) add_executable(generatedScriptTestsSecuwall generatedScriptTestsSecuwall.cpp main_generatedScriptTestsSecuwall.cpp) add_test(NAME generatedScriptTestsSecuwall COMMAND generatedScriptTestsSecuwall) -target_link_libraries(generatedScriptTestsSecuwall PRIVATE test_main netsnmp gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) +target_link_libraries(generatedScriptTestsSecuwall PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(generatedScriptTestsSecuwall netsnmp) +ENDIF() file(COPY test1.fwb ref.secuwall-1 DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/src/unit_tests/genericDialogTest/CMakeLists.txt b/src/unit_tests/genericDialogTest/CMakeLists.txt index 8b5a24772..dc8081580 100644 --- a/src/unit_tests/genericDialogTest/CMakeLists.txt +++ b/src/unit_tests/genericDialogTest/CMakeLists.txt @@ -3,4 +3,8 @@ SET(CMAKE_AUTOMOC ON) add_executable(genericDialogTest genericDialogTest.cpp main_genericDialogTest.cpp) add_test(NAME genericDialogTest COMMAND genericDialogTest) -target_link_libraries(genericDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder netsnmp xml2 xslt z pthread Qt5::Test) +target_link_libraries(genericDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(genericDialogTest netsnmp) +ENDIF() diff --git a/src/unit_tests/instDialogClusterTest/CMakeLists.txt b/src/unit_tests/instDialogClusterTest/CMakeLists.txt index 37325de4b..06eeb64a5 100644 --- a/src/unit_tests/instDialogClusterTest/CMakeLists.txt +++ b/src/unit_tests/instDialogClusterTest/CMakeLists.txt @@ -3,6 +3,10 @@ SET(CMAKE_AUTOMOC ON) add_executable(instDialogClusterTest instDialogClusterTest.cpp main_instDialogClusterTest.cpp) add_test(NAME instDialogClusterTest COMMAND instDialogClusterTest) -target_link_libraries(instDialogClusterTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder netsnmp xml2 xslt z pthread Qt5::Test) +target_link_libraries(instDialogClusterTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(instDialogClusterTest netsnmp) +ENDIF() file(COPY test.fwb DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/src/unit_tests/instDialogCompileTest/CMakeLists.txt b/src/unit_tests/instDialogCompileTest/CMakeLists.txt index 84d5536fb..fa453ac4d 100644 --- a/src/unit_tests/instDialogCompileTest/CMakeLists.txt +++ b/src/unit_tests/instDialogCompileTest/CMakeLists.txt @@ -3,6 +3,10 @@ SET(CMAKE_AUTOMOC ON) add_executable(instDialogCompileTest instDialogCompileTest.cpp main_instDialogCompileTest.cpp) add_test(NAME instDialogCompileTest COMMAND instDialogCompileTest) -target_link_libraries(instDialogCompileTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder netsnmp xml2 xslt z pthread Qt5::Test) +target_link_libraries(instDialogCompileTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(instDialogCompileTest netsnmp) +ENDIF() file(COPY test.fwb DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/src/unit_tests/instDialogInspectTest/CMakeLists.txt b/src/unit_tests/instDialogInspectTest/CMakeLists.txt index a653488e9..8a6e7bfcf 100644 --- a/src/unit_tests/instDialogInspectTest/CMakeLists.txt +++ b/src/unit_tests/instDialogInspectTest/CMakeLists.txt @@ -3,6 +3,10 @@ SET(CMAKE_AUTOMOC ON) add_executable(instDialogInspectTest instDialogInspectTest.cpp main_instDialogInspectTest.cpp) add_test(NAME instDialogInspectTest COMMAND instDialogInspectTest) -target_link_libraries(instDialogInspectTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder netsnmp xml2 xslt z pthread Qt5::Test) +target_link_libraries(instDialogInspectTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(instDialogInspectTest netsnmp) +ENDIF() file(COPY test.fwb DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/src/unit_tests/instDialogInstallTest/CMakeLists.txt b/src/unit_tests/instDialogInstallTest/CMakeLists.txt index e6735a4c1..a2c5e0db9 100644 --- a/src/unit_tests/instDialogInstallTest/CMakeLists.txt +++ b/src/unit_tests/instDialogInstallTest/CMakeLists.txt @@ -3,6 +3,10 @@ SET(CMAKE_AUTOMOC ON) add_executable(instDialogInstallTest instDialogInstallTest.cpp main_instDialogInstallTest.cpp) add_test(NAME instDialogInstallTest COMMAND instDialogInstallTest) -target_link_libraries(instDialogInstallTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder netsnmp xml2 xslt z pthread Qt5::Test) +target_link_libraries(instDialogInstallTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(instDialogInstallTest netsnmp) +ENDIF() file(COPY test.fwb DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/src/unit_tests/instDialogObjectListTest/CMakeLists.txt b/src/unit_tests/instDialogObjectListTest/CMakeLists.txt index 7b73725f9..bacaea1a5 100644 --- a/src/unit_tests/instDialogObjectListTest/CMakeLists.txt +++ b/src/unit_tests/instDialogObjectListTest/CMakeLists.txt @@ -3,6 +3,10 @@ SET(CMAKE_AUTOMOC ON) add_executable(instDialogObjectListTest instDialogObjectListTest.cpp main_instDialogObjectListTest.cpp) add_test(NAME instDialogObjectListTest COMMAND instDialogObjectListTest) -target_link_libraries(instDialogObjectListTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder netsnmp xml2 xslt z pthread Qt5::Test) +target_link_libraries(instDialogObjectListTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(instDialogObjectListTest netsnmp) +ENDIF() file(COPY test.fwb DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/src/unit_tests/newClusterDialogTest/CMakeLists.txt b/src/unit_tests/newClusterDialogTest/CMakeLists.txt index 1580e13cc..f7b6be5a6 100644 --- a/src/unit_tests/newClusterDialogTest/CMakeLists.txt +++ b/src/unit_tests/newClusterDialogTest/CMakeLists.txt @@ -3,6 +3,10 @@ SET(CMAKE_AUTOMOC ON) add_executable(newClusterDialogTest newClusterDialogTest.cpp main_newClusterDialogTest.cpp) add_test(NAME newClusterDialogTest COMMAND newClusterDialogTest) -target_link_libraries(newClusterDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder netsnmp xml2 xslt z pthread Qt5::Test) +target_link_libraries(newClusterDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(newClusterDialogTest netsnmp) +ENDIF() file(COPY test.fwb DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/src/unit_tests/parseCommandLineTest/CMakeLists.txt b/src/unit_tests/parseCommandLineTest/CMakeLists.txt index fd454a55a..a80966496 100644 --- a/src/unit_tests/parseCommandLineTest/CMakeLists.txt +++ b/src/unit_tests/parseCommandLineTest/CMakeLists.txt @@ -3,4 +3,8 @@ set (CMAKE_AUTOMOC ON) add_executable(parseCommandLineTest parseCommandLineTest.cpp main_parseCommandLineTest.cpp) add_test(NAME parseCommandLineTest COMMAND parseCommandLineTest) -target_link_libraries(parseCommandLineTest PRIVATE test_main netsnmp gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) +target_link_libraries(parseCommandLineTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(parseCommandLineTest netsnmp) +ENDIF() diff --git a/src/unit_tests/startTipDialogTest/CMakeLists.txt b/src/unit_tests/startTipDialogTest/CMakeLists.txt index c573c85cd..a847ec52e 100644 --- a/src/unit_tests/startTipDialogTest/CMakeLists.txt +++ b/src/unit_tests/startTipDialogTest/CMakeLists.txt @@ -3,4 +3,8 @@ SET(CMAKE_AUTOMOC ON) add_executable(startTipDialogTest startTipDialogTest.cpp main_startTipDialogTest.cpp) add_test(NAME startTipDialogTest COMMAND startTipDialogTest) -target_link_libraries(startTipDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder netsnmp xml2 xslt z pthread Qt5::Test) +target_link_libraries(startTipDialogTest PRIVATE test_main gui import fwbparser antlr common iptlib fwbpf fwbjuniper fwbcisco compilerdriver fwcompiler fwbuilder xml2 xslt z pthread Qt5::Test) + +IF (NETSNMP_FOUND) + target_link_libraries(startTipDialogTest netsnmp) +ENDIF()