Skip to content

Commit

Permalink
Fix: Allow to override the variable BUILD_WITH_NETSNMP (#1481)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jjnicola authored Aug 31, 2023
1 parent 5df33a6 commit 04851b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 04851b1

Please sign in to comment.