From 04851b1a66e7e4fb92c6000aaf9486292fea9e95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Jos=C3=A9=20Nicola?= Date: Thu, 31 Aug 2023 21:02:52 +0200 Subject: [PATCH] Fix: Allow to override the variable BUILD_WITH_NETSNMP (#1481) Otherwise, when the variable was set to FALSE|NO|0|OFF the if statement always set the variable to TRUE. Now, it defaults to TRUE only if it was not set at all --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 69e645389..e390192e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,9 +145,9 @@ if (NOT OPENVAS_RUN_DIR) set (OPENVAS_RUN_DIR "/run/ospd") endif (NOT OPENVAS_RUN_DIR) -if (NOT BUILD_WITH_NETSNMP) +if (NOT DEFINED BUILD_WITH_NETSNMP) set (BUILD_WITH_NETSNMP TRUE) -endif (NOT BUILD_WITH_NETSNMP) +endif (NOT DEFINED BUILD_WITH_NETSNMP) set (OPENVAS_DATA_DIR "${DATADIR}/openvas") set (OPENVAS_STATE_DIR "${LOCALSTATEDIR}/lib/openvas")