diff options
Diffstat (limited to 'meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch')
-rw-r--r-- | meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch b/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch new file mode 100644 index 0000000000..7c8131b4be --- /dev/null +++ b/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | From 0d0155c4dd6c0b3305ea2ab0e10b0f84d024a6e1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Tue, 6 Nov 2018 13:54:43 +0100 | ||
4 | Subject: [PATCH] Add WITH_TESTS option | ||
5 | |||
6 | This makes a dependency on cppunit optional. | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
10 | |||
11 | --- | ||
12 | CMakeLists.txt | 3 +++ | ||
13 | python/hawkey/CMakeLists.txt | 2 ++ | ||
14 | 2 files changed, 5 insertions(+) | ||
15 | |||
16 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
17 | index b73a03d7..a9e0200f 100644 | ||
18 | --- a/CMakeLists.txt | ||
19 | +++ b/CMakeLists.txt | ||
20 | @@ -36,6 +36,7 @@ OPTION(WITH_MAN "Enables hawkey man page generation" ON) | ||
21 | OPTION(WITH_HTML "Enables hawkey HTML generation" ON) | ||
22 | |||
23 | OPTION(WITH_BINDINGS "Enables python/SWIG bindings" ON) | ||
24 | +OPTION(WITH_TESTS "Enables unit tests" ON) | ||
25 | |||
26 | OPTION (ENABLE_SOLV_URPMREORDER "Build with support for URPM-like solution reordering?" OFF) | ||
27 | option (ENABLE_RHSM_SUPPORT "Build with Red Hat Subscription Manager support?" OFF) | ||
28 | @@ -122,8 +123,10 @@ IF (WITH_BINDINGS) | ||
29 | # ADD_SUBDIRECTORY (bindings/perl) | ||
30 | ADD_SUBDIRECTORY (bindings/python) | ||
31 | ENDIF() | ||
32 | +IF (WITH_TESTS) | ||
33 | ENABLE_TESTING() | ||
34 | ADD_SUBDIRECTORY (tests) | ||
35 | +ENDIF() | ||
36 | IF (WITH_BINDINGS) | ||
37 | ADD_SUBDIRECTORY (python/hawkey) | ||
38 | ADD_SUBDIRECTORY (docs/hawkey) | ||
39 | diff --git a/python/hawkey/CMakeLists.txt b/python/hawkey/CMakeLists.txt | ||
40 | index 3c0b3c0c..31466ed9 100644 | ||
41 | --- a/python/hawkey/CMakeLists.txt | ||
42 | +++ b/python/hawkey/CMakeLists.txt | ||
43 | @@ -49,4 +49,6 @@ TARGET_LINK_LIBRARIES(_hawkeymodule ${PYTHON_LIBRARY}) | ||
44 | INSTALL(FILES __init__.py DESTINATION ${PYTHON_INSTALL_DIR}/hawkey) | ||
45 | INSTALL(TARGETS _hawkeymodule LIBRARY DESTINATION ${PYTHON_INSTALL_DIR}/hawkey) | ||
46 | |||
47 | +IF (WITH_TESTS) | ||
48 | ADD_SUBDIRECTORY(tests) | ||
49 | +ENDIF() | ||