mirror of
https://github.com/KingDuckZ/dindexer.git
synced 2024-11-29 01:33:46 +00:00
Add unit tests to cmake
This commit is contained in:
parent
abde34e240
commit
12d39b203e
3 changed files with 18 additions and 3 deletions
|
@ -112,9 +112,12 @@ add_subdirectory(src/locate)
|
||||||
add_subdirectory(src/navigate)
|
add_subdirectory(src/navigate)
|
||||||
|
|
||||||
#Tests
|
#Tests
|
||||||
add_subdirectory(test/gtest)
|
if (BUILD_TESTING)
|
||||||
add_subdirectory(test/unit)
|
enable_testing()
|
||||||
add_subdirectory(test/unit_cli)
|
add_subdirectory(test/gtest)
|
||||||
|
add_subdirectory(test/unit)
|
||||||
|
add_subdirectory(test/unit_cli)
|
||||||
|
endif()
|
||||||
|
|
||||||
target_link_libraries(${PROJECT_NAME}
|
target_link_libraries(${PROJECT_NAME}
|
||||||
INTERFACE ${PostgreSQL_LIBRARIES}
|
INTERFACE ${PostgreSQL_LIBRARIES}
|
||||||
|
|
|
@ -16,3 +16,9 @@ target_link_libraries(${PROJECT_NAME}
|
||||||
PRIVATE gtest
|
PRIVATE gtest
|
||||||
PRIVATE gtest_main
|
PRIVATE gtest_main
|
||||||
)
|
)
|
||||||
|
|
||||||
|
add_test(
|
||||||
|
NAME LibraryTests
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
COMMAND ${PROJECT_NAME}
|
||||||
|
)
|
||||||
|
|
|
@ -23,3 +23,9 @@ target_link_libraries(${PROJECT_NAME}
|
||||||
PRIVATE gtest_main
|
PRIVATE gtest_main
|
||||||
PRIVATE pbl
|
PRIVATE pbl
|
||||||
)
|
)
|
||||||
|
|
||||||
|
add_test(
|
||||||
|
NAME CliTests
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
COMMAND ${PROJECT_NAME}
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in a new issue