Skip to content

Commit

Permalink
Add WITH_TESTS option
Browse files Browse the repository at this point in the history
This makes a dependency on cppunit optional.
  • Loading branch information
kanavin authored and Conan-Kudo committed Nov 26, 2021
1 parent 587d9d1 commit d641447
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ option(WITH_MAN "Enables hawkey man page generation" ON)
option(WITH_ZCHUNK "Build with zchunk support" ON)
option(ENABLE_RHSM_SUPPORT "Build with Red Hat Subscription Manager support?" OFF)
option(ENABLE_SOLV_URPMREORDER "Build with support for URPM-like solution reordering?" OFF)
option(WITH_TESTS "Enables unit tests" ON)


# build options - debugging
Expand Down Expand Up @@ -175,8 +176,10 @@ endif()


# build tests
IF (WITH_TESTS)
enable_testing()
add_subdirectory(tests)
ENDIF()
if(WITH_BINDINGS)
add_subdirectory(python/hawkey)
endif()
Expand Down
2 changes: 2 additions & 0 deletions python/hawkey/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,6 @@ target_link_libraries(_hawkeymodule ${PYTHON_LIBRARY})
install(FILES __init__.py DESTINATION ${PYTHON_INSTALL_DIR}/hawkey)
install(TARGETS _hawkeymodule LIBRARY DESTINATION ${PYTHON_INSTALL_DIR}/hawkey)

IF (WITH_TESTS)
add_subdirectory(tests)
ENDIF()

0 comments on commit d641447

Please sign in to comment.