-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: cmakes changes, headers and memeber names
- Loading branch information
1 parent
2e93ebd
commit 05591d7
Showing
8 changed files
with
30 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,25 @@ | ||
cmake_minimum_required(VERSION 3.22) | ||
|
||
project(queue LANGUAGES CXX) | ||
project(AgentQueue LANGUAGES CXX) | ||
set(CMAKE_CXX_STANDARD 20) | ||
set(CMAKE_CXX_STANDARD_REQUIRED True) | ||
|
||
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wunused -pthread") | ||
|
||
include_directories(${CMAKE_SOURCE_DIR}/include) | ||
|
||
find_package(SQLiteCpp REQUIRED) | ||
find_package(nlohmann_json REQUIRED) | ||
find_package(fmt REQUIRED) | ||
find_package(Boost REQUIRED COMPONENTS asio beast) | ||
find_package(Boost REQUIRED COMPONENTS asio) | ||
|
||
add_library(queue | ||
add_library(AgentQueue | ||
src/sqlitestorage.cpp | ||
src/queue.cpp | ||
) | ||
|
||
target_include_directories(queue PRIVATE include ${SQLiteCpp_INCLUDE_DIRS}) | ||
target_link_libraries(queue PRIVATE SQLiteCpp nlohmann_json::nlohmann_json fmt::fmt Boost::asio) | ||
target_include_directories(AgentQueue PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include PRIVATE ${SQLiteCpp_INCLUDE_DIRS}) | ||
target_link_libraries(AgentQueue PUBLIC nlohmann_json::nlohmann_json Boost::asio PRIVATE SQLiteCpp nlohmann_json::nlohmann_json fmt::fmt Boost::asio) | ||
|
||
if(BUILD_TESTS) | ||
enable_testing() | ||
add_subdirectory(tests) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,23 @@ | ||
find_package(GTest REQUIRED) | ||
# find_package(SQLiteCpp REQUIRED) | ||
# find_package(nlohmann_json REQUIRED) | ||
|
||
include_directories(../include) | ||
include_directories(${GTEST_INCLUDE_DIRS}) | ||
include_directories(${SQLiteCpp_INCLUDE_DIRS}) | ||
# AgentQueue tests | ||
add_executable(test_AgentQueue queue_test.cpp) | ||
|
||
#TODO: is this reusable ? | ||
# file(GLOB QUEUE_UNIT_TEST_SRC "*.cpp") | ||
target_link_libraries(test_AgentQueue PUBLIC | ||
AgentQueue | ||
GTest::gtest | ||
GTest::gtest_main | ||
GTest::gmock | ||
GTest::gmock_main) | ||
|
||
add_executable(test_queue | ||
queue_test.cpp | ||
../src/sqlitestorage.cpp | ||
) | ||
|
||
target_link_libraries(test_queue | ||
${GTEST_LIBRARIES} | ||
${GTEST_MAIN_LIBRARIES} | ||
queue | ||
SQLiteCpp | ||
nlohmann_json::nlohmann_json | ||
fmt::fmt | ||
Boost::asio) | ||
|
||
# Create a test executable for SQLiteStorage tests | ||
add_executable(test_sqlitestorage | ||
sqlitestorage_test.cpp | ||
../src/sqlitestorage.cpp) | ||
# SQLiteStorage tests | ||
add_executable(test_sqlitestorage sqlitestorage_test.cpp) | ||
|
||
target_link_libraries(test_sqlitestorage | ||
${GTEST_LIBRARIES} | ||
${GTEST_MAIN_LIBRARIES} | ||
AgentQueue | ||
SQLiteCpp | ||
nlohmann_json::nlohmann_json | ||
fmt::fmt) | ||
GTest::gtest | ||
GTest::gtest_main | ||
GTest::gmock | ||
GTest::gmock_main) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters