-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from szmyd/conanv2
Conan V2
- Loading branch information
Showing
12 changed files
with
152 additions
and
124 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 |
---|---|---|
|
@@ -8,3 +8,4 @@ compile_commands* | |
.clangd/ | ||
.vscode/ | ||
.cache/ | ||
CMakeUserPresets.json |
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
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,48 +1,45 @@ | ||
cmake_minimum_required (VERSION 3.11) | ||
|
||
find_package(jungle QUIET) | ||
find_package(jungle QUIET REQUIRED) | ||
|
||
if (jungle_FOUND) | ||
find_package(GTest REQUIRED) | ||
add_subdirectory(jungle_logstore) | ||
add_subdirectory(jungle_logstore) | ||
|
||
add_library(test_fixture OBJECT) | ||
target_sources(test_fixture PRIVATE | ||
test_state_manager.cpp | ||
) | ||
target_link_libraries(test_fixture | ||
${PROJECT_NAME} | ||
jungle::jungle | ||
GTest::gmock | ||
) | ||
add_library(test_fixture OBJECT) | ||
target_sources(test_fixture PRIVATE | ||
test_state_manager.cpp | ||
) | ||
target_link_libraries(test_fixture | ||
${PROJECT_NAME} | ||
jungle::jungle | ||
GTest::gmock | ||
) | ||
|
||
add_executable(raft_service_test) | ||
target_sources(raft_service_test PRIVATE | ||
raft_service_tests.cpp | ||
$<TARGET_OBJECTS:test_fixture> | ||
$<TARGET_OBJECTS:jungle_logstore> | ||
) | ||
target_link_libraries (raft_service_test | ||
${PROJECT_NAME} | ||
${PROJECT_NAME}_proto | ||
jungle::jungle | ||
GTest::gmock | ||
) | ||
add_test(NAME RaftServiceTest COMMAND raft_service_test -cv 2) | ||
set_property(TEST RaftServiceTest PROPERTY RUN_SERIAL 1) | ||
add_executable(raft_service_test) | ||
target_sources(raft_service_test PRIVATE | ||
raft_service_tests.cpp | ||
$<TARGET_OBJECTS:test_fixture> | ||
$<TARGET_OBJECTS:jungle_logstore> | ||
) | ||
target_link_libraries (raft_service_test | ||
${PROJECT_NAME} | ||
${PROJECT_NAME}_proto | ||
jungle::jungle | ||
GTest::gmock | ||
) | ||
add_test(NAME RaftServiceTest COMMAND raft_service_test -cv 2) | ||
set_property(TEST RaftServiceTest PROPERTY RUN_SERIAL 1) | ||
|
||
add_executable(data_service_test) | ||
target_sources(data_service_test PRIVATE | ||
data_service_tests.cpp | ||
$<TARGET_OBJECTS:test_fixture> | ||
$<TARGET_OBJECTS:jungle_logstore> | ||
) | ||
target_link_libraries (data_service_test | ||
${PROJECT_NAME} | ||
${PROJECT_NAME}_proto | ||
jungle::jungle | ||
GTest::gmock | ||
) | ||
add_test(NAME DataServiceTest COMMAND data_service_test -cv 1) | ||
set_property(TEST DataServiceTest PROPERTY RUN_SERIAL 1) | ||
endif () | ||
add_executable(data_service_test) | ||
target_sources(data_service_test PRIVATE | ||
data_service_tests.cpp | ||
$<TARGET_OBJECTS:test_fixture> | ||
$<TARGET_OBJECTS:jungle_logstore> | ||
) | ||
target_link_libraries (data_service_test | ||
${PROJECT_NAME} | ||
${PROJECT_NAME}_proto | ||
jungle::jungle | ||
GTest::gmock | ||
) | ||
add_test(NAME DataServiceTest COMMAND data_service_test -cv 1) | ||
set_property(TEST DataServiceTest PROPERTY RUN_SERIAL 1) |
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,5 +1,7 @@ | ||
cmake_minimum_required (VERSION 3.11) | ||
|
||
find_package(lz4) | ||
|
||
file (GLOB LIBRARY_SOURCES *.cc) | ||
|
||
add_flags("-w") | ||
|
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,16 +1,12 @@ | ||
cmake_minimum_required(VERSION 3.11) | ||
project(test_package) | ||
|
||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) | ||
conan_basic_setup(TARGETS) | ||
|
||
find_package(NuraftMesg QUIET REQUIRED) | ||
|
||
set(CMAKE_CXX_STANDARD 20) | ||
set(CPP_WARNINGS "-Wall -Wextra -Werror") | ||
|
||
add_executable(example_server example_server.cpp example_state_manager.cpp in_memory_log_store.cpp) | ||
target_link_libraries(example_server NuraftMesg::proto) | ||
target_compile_features(example_server PUBLIC cxx_std_20) | ||
target_link_libraries(example_server nuraft_mesg::proto) | ||
|
||
add_executable(example_client example_client.cpp) | ||
target_link_libraries(example_client NuraftMesg::proto) | ||
target_compile_features(example_client PUBLIC cxx_std_20) | ||
target_link_libraries(example_client nuraft_mesg::proto) |
Oops, something went wrong.