Skip to content

Commit

Permalink
add server control and client lib
Browse files Browse the repository at this point in the history
  • Loading branch information
zengda committed Jan 30, 2017
1 parent 193cbfe commit c379fd4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@
/storage
CMakeFiles/
CMakeCache.txt
Makefile
*.cmake
36 changes: 22 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ project (logcabin)
set (LOGCABIN_VERSION_MAJOR 1)
set (LOGCABIN_VERSION_MINOR 2)

include_directories(BEFORE .)
include_directories(BEFORE ./include)
include_directories(BEFORE ./build)
link_directories(./build)

if (CMAKE_CXX_COMPILER EQUAL "clang")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
-Wno-c++98-compat-pedantic \
Expand Down Expand Up @@ -66,10 +71,6 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build)

include_directories(BEFORE .)
include_directories(BEFORE ./include)
include_directories(BEFORE ./build)

# add core dir
set(CORE_SRC
Core/Buffer.cc
Expand Down Expand Up @@ -225,7 +226,8 @@ add_custom_command(
## TODO:I beleive we need a marco to generate the protobuf src, but let's put off it now

##executable daemon
add_executable(LogCabin
## I will change it back to LogCabin after I finish all coding
add_executable(LogCabinServer
Server/main.cc
${SERVER_SRC}
${STORAGE_SRC}
Expand All @@ -237,13 +239,19 @@ add_executable(LogCabin
${CORE_SRC}
)

#add_library(logcabin STATIC
# ${CLIENT_SRC}
# ${TREE_SRC}
# ${PROTOCOL_SRC}
# ${RPC_SRC}
# ${EVENT_SRC}
# ${CORE_SRC}
# )
add_executable(ServerControl
Client/ServerControl.cc
)

add_library(logcabin STATIC
EXCLUDE_FROM_ALL
${CLIENT_SRC}
${TREE_SRC}
${PROTOCOL_SRC}
${RPC_SRC}
${EVENT_SRC}
${CORE_SRC}
)

target_link_libraries(LogCabin pthread protobuf rt cryptopp)
target_link_libraries(LogCabinServer pthread protobuf rt cryptopp)
target_link_libraries(ServerControl logcabin pthread protobuf rt cryptopp)

0 comments on commit c379fd4

Please sign in to comment.