2022-09-15 21:34:39 +00:00
|
|
|
enable_testing()
|
|
|
|
find_package(GTest REQUIRED)
|
|
|
|
include_directories(${GTEST_INCLUDE_DIR})
|
|
|
|
|
|
|
|
add_executable(runUnitTests
|
|
|
|
basic.cpp
|
2023-03-30 17:00:56 +00:00
|
|
|
serialization.cpp
|
2023-04-01 14:45:20 +00:00
|
|
|
storagetransaction.cpp
|
2023-04-04 23:27:31 +00:00
|
|
|
cachetransaction.cpp
|
2022-09-15 21:34:39 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
target_compile_options(runUnitTests PRIVATE -fPIC)
|
|
|
|
|
2023-03-21 11:05:54 +00:00
|
|
|
target_include_directories(runUnitTests PRIVATE ${CMAKE_SOURCE_DIR}/src)
|
2022-09-15 21:34:39 +00:00
|
|
|
target_include_directories(runUnitTests PRIVATE ${Qt${QT_VERSION_MAJOR}_INCLUDE_DIRS})
|
|
|
|
target_include_directories(runUnitTests PRIVATE ${Qt${QT_VERSION_MAJOR}Core_INCLUDE_DIRS})
|
|
|
|
|
|
|
|
target_link_libraries(
|
|
|
|
runUnitTests
|
|
|
|
GTest::gtest_main
|
2023-03-22 16:30:41 +00:00
|
|
|
${PROJECT_NAME}
|
2023-03-26 18:42:52 +00:00
|
|
|
Qt${QT_VERSION_MAJOR}::Core
|
|
|
|
lmdb
|
2022-09-15 21:34:39 +00:00
|
|
|
)
|
|
|
|
include(GoogleTest)
|
|
|
|
gtest_discover_tests(runUnitTests)
|