fixed testing setup
This commit is contained in:
parent
3b1f2d346f
commit
97e444c91c
2 changed files with 9 additions and 6 deletions
|
@ -17,5 +17,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||||
|
|
||||||
|
enable_testing()
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
add_subdirectory(test)
|
add_subdirectory(test)
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
enable_testing()
|
|
||||||
|
|
||||||
find_package(Boost COMPONENTS filesystem unit_test_framework REQUIRED)
|
find_package(Boost COMPONENTS filesystem unit_test_framework REQUIRED)
|
||||||
|
|
||||||
set(TEST_SOURCES test_seller.cpp)
|
add_executable(sellertest test_seller.cpp)
|
||||||
|
target_link_libraries(sellertest core Boost::boost Boost::filesystem Boost::unit_test_framework)
|
||||||
|
add_test(Seller ${CMAKE_BINARY_DIR}/bin/sellertest)
|
||||||
|
|
||||||
add_executable(testsuite ${TEST_SOURCES})
|
add_executable(databasetest test_database.cpp)
|
||||||
target_link_libraries(testsuite core Boost::boost Boost::filesystem Boost::unit_test_framework)
|
target_link_libraries(databasetest core Boost::boost Boost::filesystem Boost::unit_test_framework)
|
||||||
|
add_test(Database ${CMAKE_BINARY_DIR}/bin/databasetest)
|
||||||
|
|
Loading…
Reference in a new issue