diff options
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e601a7e..f2a7f51 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,11 +13,13 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20") add_definitions(-DSOURCE_DIR_PATH="${CMAKE_SOURCE_DIR}") find_package(Catch2 3 REQUIRED) -add_executable(tests src/tests/tests.cpp) -target_link_libraries(tests PRIVATE Catch2::Catch2WithMain pqxx pq curl) - file(GLOB SRC_FILES ${PROJECT_SOURCE_DIR}/src/*.cpp) +file(GLOB SRC_TESTS_FILES ${PROJECT_SOURCE_DIR}/src/tests/*.cpp) file(GLOB INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include) +add_executable(tests ${SRC_FILES} ${SRC_TESTS_FILES}) +target_include_directories(tests PRIVATE ${INCLUDE_DIR}) +target_link_libraries(tests PRIVATE Catch2::Catch2WithMain pqxx pq curl) + add_executable(${FNAME} ${SRC_FILES}) target_include_directories(${FNAME} PRIVATE ${INCLUDE_DIR}) target_link_libraries(${FNAME} pqxx pq curl) |
