File: CMakeLists.txt

package info (click to toggle)
libdnf 0.75.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,468 kB
  • sloc: cpp: 48,297; xml: 1,638; python: 1,537; ansic: 1,223; sql: 227; sh: 54; makefile: 39
file content (22 lines) | stat: -rw-r--r-- 774 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
pkg_check_modules(CHECK REQUIRED check)
pkg_check_modules(CPPUNIT REQUIRED cppunit)

add_subdirectory(libdnf/conf)
add_subdirectory(libdnf/module/modulemd)
add_subdirectory(libdnf/module)
add_subdirectory(libdnf/repo)
add_subdirectory(libdnf/transaction)
add_subdirectory(libdnf/sack)
add_subdirectory(hawkey)
add_subdirectory(libdnf)

set(LIBDNF_TEST_SOURCES
    ${LIBDNF_TEST_SOURCES}
    ${CMAKE_CURRENT_SOURCE_DIR}/run_tests.cpp
)

add_executable(run_tests ${LIBDNF_TEST_SOURCES} ${LIBDNF_TEST_HEADERS})
target_link_libraries(run_tests libdnf cppunit)

add_test(NAME test_cpp COMMAND ${CMAKE_CURRENT_BINARY_DIR}/run_tests DEPENDS run_tests COMMENT "Running CPPUNIT tests...")
set_property(TEST test_cpp PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/libdnf")