Added the test to CMakeLists.txt, all tests OK.

This commit is contained in:
Eelke Klein 2017-08-26 15:53:15 +02:00
parent cb0ef0b130
commit 4c658d7811
12 changed files with 34 additions and 80 deletions

View file

@ -59,6 +59,9 @@ include_directories( ${fmt_INCLUDE_DIRS} )
find_package(Boost 1.63 COMPONENTS system REQUIRED )
include_directories( ${Boost_INCLUDE_DIRS} )
find_package(GTest REQUIRED)
add_library(core STATIC
core/BackupFormatModel.cpp
core/CsvWriter.cpp
@ -118,7 +121,7 @@ add_executable(pglab
pglab/resources.qrc
)
target_include_directories(pglab PUBLIC
target_include_directories(pglab PRIVATE
./core
./pgsql
)
@ -132,3 +135,25 @@ target_link_libraries( pglab
${Botan_LIBRARIES}
pthread
)
add_executable(runtests
tests/main.cpp
tests/tst_CsvWriter.cpp
tests/tst_expected.cpp
tests/tst_PasswordManager.cpp
tests/tst_scopeguard.cpp
tests/tst_SqlLexer.cpp
)
target_include_directories(runtests PRIVATE ./core ${GTEST_INCLUDE_DIRS})
target_link_libraries(runtests
core
${GTEST_LIBRARIES}
${Botan_LIBRARIES}
Qt5::Widgets
pthread
)
enable_testing()
add_test(tests runtests)