提交 8ce2e7b1 编写于 作者: W wangguibao

Replace public/configure with protobufs

Change-Id: Idd4b74f44b6bfe014b232dbbd23648bef9d6c262
上级 350e8f23
...@@ -98,7 +98,7 @@ endif() ...@@ -98,7 +98,7 @@ endif()
add_subdirectory(bsl) add_subdirectory(bsl)
add_subdirectory(ullib) add_subdirectory(ullib)
add_subdirectory(proto_configure) add_subdirectory(configure)
add_subdirectory(mempool) add_subdirectory(mempool)
add_subdirectory(predictor) add_subdirectory(predictor)
add_subdirectory(inferencer-fluid-cpu) add_subdirectory(inferencer-fluid-cpu)
......
...@@ -5,11 +5,11 @@ LIST(APPEND protofiles ...@@ -5,11 +5,11 @@ LIST(APPEND protofiles
) )
PROTOBUF_GENERATE_CPP(configure_proto_srcs configure_proto_hdrs ${protofiles}) PROTOBUF_GENERATE_CPP(configure_proto_srcs configure_proto_hdrs ${protofiles})
list(APPEND proto_configure_srcs ${configure_proto_srcs}) list(APPEND configure_srcs ${configure_proto_srcs})
list(APPEND proto_configure_srcs ${CMAKE_CURRENT_LIST_DIR}/src/configure_parser.cpp) list(APPEND configure_srcs ${CMAKE_CURRENT_LIST_DIR}/src/configure_parser.cpp)
add_library(proto_configure ${proto_configure_srcs}) add_library(configure ${configure_srcs})
add_executable(test_configure add_executable(test_configure
${CMAKE_CURRENT_LIST_DIR}/tests/test_configure.cpp) ${CMAKE_CURRENT_LIST_DIR}/tests/test_configure.cpp)
...@@ -17,4 +17,4 @@ target_include_directories(test_configure PUBLIC ...@@ -17,4 +17,4 @@ target_include_directories(test_configure PUBLIC
${CMAKE_CURRENT_BINARY_DIR}/ ${CMAKE_CURRENT_BINARY_DIR}/
${CMAKE_CURRENT_LIST_DIR}/include ${CMAKE_CURRENT_LIST_DIR}/include
) )
target_link_libraries(test_configure proto_configure protobuf) target_link_libraries(test_configure configure protobuf)
...@@ -4,6 +4,6 @@ target_include_directories(fluid_cpu_engine PUBLIC ...@@ -4,6 +4,6 @@ target_include_directories(fluid_cpu_engine PUBLIC
${CMAKE_CURRENT_LIST_DIR}/include ${CMAKE_CURRENT_LIST_DIR}/include
${PADDLE_INCLUDE_DIR} ${PADDLE_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/Paddle/fluid_install_dir/) ${CMAKE_BINARY_DIR}/Paddle/fluid_install_dir/)
add_dependencies(fluid_cpu_engine pdserving paddle_fluid proto_configure) add_dependencies(fluid_cpu_engine pdserving paddle_fluid configure)
target_link_libraries(fluid_cpu_engine pdserving -liomp5 -lmklml_intel -lpthread -lcrypto -lm -lrt -lssl -ldl -lz) target_link_libraries(fluid_cpu_engine pdserving -liomp5 -lmklml_intel -lpthread -lcrypto -lm -lrt -lssl -ldl -lz)
...@@ -17,18 +17,17 @@ set_source_files_properties( ...@@ -17,18 +17,17 @@ set_source_files_properties(
PROPERTIES PROPERTIES
COMPILE_FLAGS "-Wno-strict-aliasing -Wno-unused-variable -Wno-non-virtual-dtor -Wno-error=non-virtual-dtor -Wno-error=delete-non-virtual-dtor") COMPILE_FLAGS "-Wno-strict-aliasing -Wno-unused-variable -Wno-non-virtual-dtor -Wno-error=non-virtual-dtor -Wno-error=delete-non-virtual-dtor")
add_dependencies(pdserving protobuf boost brpc leveldb pdcodegen add_dependencies(pdserving protobuf boost brpc leveldb pdcodegen
proto_configure configure ullib mempool)
ullib mempool)
target_include_directories(pdserving PUBLIC target_include_directories(pdserving PUBLIC
${CMAKE_CURRENT_LIST_DIR}/ ${CMAKE_CURRENT_LIST_DIR}/
${CMAKE_CURRENT_BINARY_DIR}/ ${CMAKE_CURRENT_BINARY_DIR}/
${CMAKE_CURRENT_BINARY_DIR}/../proto_configure ${CMAKE_CURRENT_BINARY_DIR}/../configure
${CMAKE_CURRENT_LIST_DIR}/../proto_configure/include ${CMAKE_CURRENT_LIST_DIR}/../configure/include
${CMAKE_CURRENT_LIST_DIR}/../mempool ${CMAKE_CURRENT_LIST_DIR}/../mempool
${CMAKE_CURRENT_LIST_DIR}/../ullib/include) ${CMAKE_CURRENT_LIST_DIR}/../ullib/include)
target_link_libraries(pdserving target_link_libraries(pdserving
brpc protobuf boost leveldb proto_configure ullib brpc protobuf boost leveldb configure ullib
mempool -lpthread -lcrypto -lm -lrt -lssl -ldl -lz) mempool -lpthread -lcrypto -lm -lrt -lssl -ldl -lz)
add_executable(pdserving_exe ${pdserving_srcs}) add_executable(pdserving_exe ${pdserving_srcs})
...@@ -37,18 +36,18 @@ set_source_files_properties( ...@@ -37,18 +36,18 @@ set_source_files_properties(
PROPERTIES PROPERTIES
COMPILE_FLAGS "-Wno-strict-aliasing -Wno-unused-variable -Wno-non-virtual-dtor -Wno-error=non-virtual-dtor -Wno-error=delete-non-virtual-dtor") COMPILE_FLAGS "-Wno-strict-aliasing -Wno-unused-variable -Wno-non-virtual-dtor -Wno-error=non-virtual-dtor -Wno-error=delete-non-virtual-dtor")
add_dependencies(pdserving_exe add_dependencies(pdserving_exe
protobuf boost brpc leveldb pdcodegen proto_configure bsl protobuf boost brpc leveldb pdcodegen configure bsl
ullib mempool) ullib mempool)
target_include_directories(pdserving_exe PUBLIC target_include_directories(pdserving_exe PUBLIC
${CMAKE_CURRENT_LIST_DIR}/ ${CMAKE_CURRENT_LIST_DIR}/
${CMAKE_CURRENT_BINARY_DIR}/ ${CMAKE_CURRENT_BINARY_DIR}/
${CMAKE_CURRENT_BINARY_DIR}/../proto_configure ${CMAKE_CURRENT_BINARY_DIR}/../configure
${CMAKE_CURRENT_LIST_DIR}/../proto_configure/include ${CMAKE_CURRENT_LIST_DIR}/../configure/include
${CMAKE_CURRENT_LIST_DIR}/../mempool ${CMAKE_CURRENT_LIST_DIR}/../mempool
${CMAKE_CURRENT_LIST_DIR}/../ullib/include) ${CMAKE_CURRENT_LIST_DIR}/../ullib/include)
target_link_libraries(pdserving_exe brpc protobuf leveldb bsl target_link_libraries(pdserving_exe brpc protobuf leveldb bsl
proto_configure ullib mempool -lpthread -lcrypto -lm -lrt -lssl configure ullib mempool -lpthread -lcrypto -lm -lrt -lssl
-ldl -lz) -ldl -lz)
add_library(pdclient ${pdclient_srcs}) add_library(pdclient ${pdclient_srcs})
...@@ -56,13 +55,13 @@ set_source_files_properties( ...@@ -56,13 +55,13 @@ set_source_files_properties(
${pdclient_srcs} ${pdclient_srcs}
PROPERTIES PROPERTIES
COMPILE_FLAGS "-Wno-strict-aliasing -Wno-unused-variable -Wno-non-virtual-dtor -Wno-error=non-virtual-dtor -Wno-error=delete-non-virtual-dtor") COMPILE_FLAGS "-Wno-strict-aliasing -Wno-unused-variable -Wno-non-virtual-dtor -Wno-error=non-virtual-dtor -Wno-error=delete-non-virtual-dtor")
add_dependencies(pdclient protobuf boost brpc pdcodegen proto_configure) add_dependencies(pdclient protobuf boost brpc pdcodegen configure)
target_include_directories(pdclient PUBLIC target_include_directories(pdclient PUBLIC
${CMAKE_CURRENT_LIST_DIR}/ ${CMAKE_CURRENT_LIST_DIR}/
${CMAKE_CURRENT_BINARY_DIR}/ ${CMAKE_CURRENT_BINARY_DIR}/
${CMAKE_CURRENT_BINARY_DIR}/../proto_configure ${CMAKE_CURRENT_BINARY_DIR}/../configure
${CMAKE_CURRENT_LIST_DIR}/../proto_configure/include ${CMAKE_CURRENT_LIST_DIR}/../configure/include
${CMAKE_CURRENT_LIST_DIR}/../mempool ${CMAKE_CURRENT_LIST_DIR}/../mempool
${CMAKE_CURRENT_LIST_DIR}/../ullib/include) ${CMAKE_CURRENT_LIST_DIR}/../ullib/include)
target_link_libraries(pdclient protobuf boost brpc -lpthread -lcrypto -lm -lrt -lssl -ldl -lz) target_link_libraries(pdclient protobuf boost brpc -lpthread -lcrypto -lm -lrt -lssl -ldl -lz)
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <bthread/bthread.h> #include <bthread/bthread.h>
#include <error.h> #include <error.h>
#include "configure.pb.h" #include "server_configure.pb.h"
#include "configure_parser.h" #include "configure_parser.h"
#include "common/utils.h" #include "common/utils.h"
......
include(src/CMakeLists.txt) include(src/CMakeLists.txt)
include(proto/CMakeLists.txt) include(proto/CMakeLists.txt)
add_library(sdk-cpp ${sdk_cpp_srcs}) add_library(sdk-cpp ${sdk_cpp_srcs})
add_dependencies(sdk-cpp pdcodegen proto_configure) add_dependencies(sdk-cpp pdcodegen configure)
target_include_directories(sdk-cpp PUBLIC target_include_directories(sdk-cpp PUBLIC
${CMAKE_CURRENT_LIST_DIR}/include ${CMAKE_CURRENT_LIST_DIR}/include
${CMKAE_CURRENT_BINARY_DIR}/ ${CMKAE_CURRENT_BINARY_DIR}/
${CMAKE_CURRENT_BINARY_DIR}/../proto_configure ${CMAKE_CURRENT_BINARY_DIR}/../configure
${CMAKE_CURRENT_LIST_DIR}/../proto_configure/include ${CMAKE_CURRENT_LIST_DIR}/../configure/include
${CMAKE_CURRENT_LIST_DIR}/../ullib/include ${CMAKE_CURRENT_LIST_DIR}/../ullib/include
${CMAKE_CURRENT_BINARY_DIR}/../bsl/include ${CMAKE_CURRENT_BINARY_DIR}/../bsl/include
) )
target_link_libraries(sdk-cpp brpc proto_configure protobuf leveldb) target_link_libraries(sdk-cpp brpc configure protobuf leveldb)
add_executable(ximage ${CMAKE_CURRENT_LIST_DIR}/demo/ximage.cpp) add_executable(ximage ${CMAKE_CURRENT_LIST_DIR}/demo/ximage.cpp)
target_include_directories(ximage PUBLIC target_include_directories(ximage PUBLIC
${CMAKE_CURRENT_LIST_DIR}/include ${CMAKE_CURRENT_LIST_DIR}/include
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/../proto_configure ${CMAKE_CURRENT_BINARY_DIR}/../configure
${CMAKE_CURRENT_LIST_DIR}/../proto_configure/include ${CMAKE_CURRENT_LIST_DIR}/../configure/include
${CMAKE_CURRENT_LIST_DIR}/../ullib/include ${CMAKE_CURRENT_LIST_DIR}/../ullib/include
${CMAKE_CURRENT_BINARY_DIR}/../bsl/include) ${CMAKE_CURRENT_BINARY_DIR}/../bsl/include)
target_link_libraries(ximage sdk-cpp -lpthread -lcrypto -lm -lrt -lssl -ldl target_link_libraries(ximage sdk-cpp -lpthread -lcrypto -lm -lrt -lssl -ldl
...@@ -27,8 +27,8 @@ add_executable(mapcnn_dense ${CMAKE_CURRENT_LIST_DIR}/demo/mapcnn_dense.cpp) ...@@ -27,8 +27,8 @@ add_executable(mapcnn_dense ${CMAKE_CURRENT_LIST_DIR}/demo/mapcnn_dense.cpp)
target_include_directories(mapcnn_dense PUBLIC target_include_directories(mapcnn_dense PUBLIC
${CMAKE_CURRENT_LIST_DIR}/include ${CMAKE_CURRENT_LIST_DIR}/include
${CMAKE_CURRENT_BINARY_DIR}/ ${CMAKE_CURRENT_BINARY_DIR}/
${CMAKE_CURRENT_BINARY_DIR}/../proto_configure ${CMAKE_CURRENT_BINARY_DIR}/../configure
${CMAKE_CURRENT_LIST_DIR}/../proto_configure/include ${CMAKE_CURRENT_LIST_DIR}/../configure/include
${CMAKE_CURRENT_LIST_DIR}/../ullib/include ${CMAKE_CURRENT_LIST_DIR}/../ullib/include
${CMAKE_CURRENT_BINARY_DIR}/../bsl/include) ${CMAKE_CURRENT_BINARY_DIR}/../bsl/include)
target_link_libraries(mapcnn_dense sdk-cpp -lpthread -lcrypto -lm -lrt -lssl target_link_libraries(mapcnn_dense sdk-cpp -lpthread -lcrypto -lm -lrt -lssl
...@@ -38,8 +38,8 @@ add_executable(mapcnn_sparse ${CMAKE_CURRENT_LIST_DIR}/demo/mapcnn_sparse.cpp) ...@@ -38,8 +38,8 @@ add_executable(mapcnn_sparse ${CMAKE_CURRENT_LIST_DIR}/demo/mapcnn_sparse.cpp)
target_include_directories(mapcnn_sparse PUBLIC target_include_directories(mapcnn_sparse PUBLIC
${CMAKE_CURRENT_LIST_DIR}/include ${CMAKE_CURRENT_LIST_DIR}/include
${CMAKE_CURRENT_BINARY_DIR}/ ${CMAKE_CURRENT_BINARY_DIR}/
${CMAKE_CURRENT_BINARY_DIR}/../proto_configure ${CMAKE_CURRENT_BINARY_DIR}/../configure
${CMAKE_CURRENT_LIST_DIR}/../proto_configure/include ${CMAKE_CURRENT_LIST_DIR}/../configure/include
${CMAKE_CURRENT_LIST_DIR}/../ullib/include ${CMAKE_CURRENT_LIST_DIR}/../ullib/include
${CMAKE_CURRENT_BINARY_DIR}/../bsl/include) ${CMAKE_CURRENT_BINARY_DIR}/../bsl/include)
target_link_libraries(mapcnn_sparse sdk-cpp -lpthread -lcrypto -lm -lrt -lssl target_link_libraries(mapcnn_sparse sdk-cpp -lpthread -lcrypto -lm -lrt -lssl
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册