Skip to content

Commit 499a82f

Browse files
committed
fix: Build tests without OPENVASD is enabled
Some tests are only buildable if OPENVASD is enabled. Therefore build these tests conditionally too.
1 parent 3749ec1 commit 499a82f

File tree

1 file changed

+34
-28
lines changed

1 file changed

+34
-28
lines changed

CMakeLists.txt

Lines changed: 34 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -233,34 +233,40 @@ if (BUILD_TESTS AND NOT SKIP_SRC)
233233

234234
find_package (cgreen REQUIRED)
235235

236-
add_custom_target (tests DEPENDS
237-
array-test
238-
boreas-alivedetection-test
239-
boreas-cli-test
240-
boreas-error-test
241-
boreas-io-test
242-
boreas-ping-test
243-
boreas-sniffer-test
244-
compressutils-test
245-
cpeutils-test
246-
cvss-test
247-
hosts-test
248-
httputils-test
249-
json-test
250-
jsonpull-test
251-
logging-test
252-
logging-domain-test
253-
networking-test
254-
nvti-test
255-
openvasd-test
256-
osp-test
257-
passwordbasedauthentication-test
258-
test-hosts
259-
util-test
260-
version-test
261-
versionutils-test
262-
vtparser-test
263-
xmlutils-test)
236+
set (TESTS
237+
array-test
238+
boreas-alivedetection-test
239+
boreas-cli-test
240+
boreas-error-test
241+
boreas-io-test
242+
boreas-ping-test
243+
boreas-sniffer-test
244+
compressutils-test
245+
cpeutils-test
246+
cvss-test
247+
hosts-test
248+
json-test
249+
jsonpull-test
250+
logging-test
251+
logging-domain-test
252+
networking-test
253+
nvti-test
254+
osp-test
255+
passwordbasedauthentication-test
256+
test-hosts
257+
util-test
258+
version-test
259+
versionutils-test
260+
xmlutils-test)
261+
262+
if (OPENVASD)
263+
list (APPEND TESTS
264+
openvasd-test
265+
httputils-test
266+
vtparser-test)
267+
endif (OPENVASD)
268+
269+
add_custom_target (tests DEPENDS ${TESTS})
264270

265271
# Code coverage
266272
if (ENABLE_COVERAGE)

0 commit comments

Comments
 (0)