提交 66ae4ef3 编写于 作者: W wangguibao

compile pdserving_exe

上级 058b3919
add_custom_target(copy_bsl_headers)
add_custom_command(TARGET copy_bsl_headers
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/include/
COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/include/bsl/ && cp ${CMAKE_CURRENT_LIST_DIR}/*.h ${CMAKE_CURRENT_BINARY_DIR}/include/bsl/
COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/include/bsl/utils && cp ${CMAKE_CURRENT_LIST_DIR}/utils/*.h ${CMAKE_CURRENT_BINARY_DIR}/include/bsl/utils
COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/include/bsl/alloc && cp ${CMAKE_CURRENT_LIST_DIR}/alloc/*.h ${CMAKE_CURRENT_BINARY_DIR}/include/bsl/alloc
......@@ -13,6 +13,9 @@ add_custom_command(TARGET copy_bsl_headers
COMMAND cp ${CMAKE_CURRENT_LIST_DIR}/check_cast/*.h ${CMAKE_CURRENT_BINARY_DIR}/include/bsl
COMMAND cp ${CMAKE_CURRENT_LIST_DIR}/ResourcePool/*.h ${CMAKE_CURRENT_BINARY_DIR}/include/bsl/
)
add_custom_target(copy_bsl_headers
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/include/)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include)
add_subdirectory(utils)
add_subdirectory(alloc)
......@@ -26,6 +29,9 @@ add_subdirectory(ResourcePool)
add_subdirectory(var/interface)
add_subdirectory(var/utils)
add_subdirectory(var/implement)
add_custom_target(bsl)
add_library(bsl)
add_dependencies(bsl utils alloc archive containers pool buffer exception
check_cast ResourcePool interface var_utils implement)
target_link_libraries(bsl
utils archive pool buffer exception check_cast
ResourcePool var_utils implement)
......@@ -55,7 +55,7 @@ namespace comcfg{
virtual int check(const confIDL::cons_func_t&, const confIDL::var_t &, ConfigGroup*, ConfigUnit*);
void setLevel(int lv);
int getLevel();
virtual ~ConstraintFunction();
virtual ~ConstraintFunction() {}
};
typedef bsl::hashmap<str_t, ConstraintFunction*> CFMAP_T;
......@@ -238,7 +238,7 @@ namespace comcfg{
_cf = cf;
}
WrapFunction(){}
virtual ~WrapFunction();
virtual ~WrapFunction() {}
protected:
CF_T _cf;
};
......
......@@ -16,7 +16,8 @@ set_source_files_properties(
${pdserving_srcs}
PROPERTIES
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 pdcodegen)
add_dependencies(pdserving protobuf boost brpc leveldb bsl pdcodegen configure
ullib spreg mempool)
target_include_directories(pdserving PUBLIC
${CMAKE_CURRENT_LIST_DIR}/
......@@ -28,6 +29,24 @@ target_include_directories(pdserving PUBLIC
${CMAKE_CURRENT_BINARY_DIR}/../bsl/include)
target_link_libraries(pdserving -lpthread -lcrypto -lm -lrt -lssl -ldl -lz)
add_executable(pdserving_exe ${pdserving_srcs})
set_source_files_properties(
${pdserving_srcs}
PROPERTIES
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 protobuf boost brpc leveldb bsl pdcodegen
configure ullib spreg mempool)
target_include_directories(pdserving_exe PUBLIC
${CMAKE_CURRENT_LIST_DIR}/
${CMAKE_CURRENT_BINARY_DIR}/
${CMAKE_CURRENT_LIST_DIR}/../configure
${CMAKE_CURRENT_LIST_DIR}/../mempool
${CMAKE_CURRENT_LIST_DIR}/../spreg
${CMAKE_CURRENT_LIST_DIR}/../ullib/include
${CMAKE_CURRENT_BINARY_DIR}/../bsl/include)
target_link_libraries(pdserving_exe brpc protobuf leveldb bsl configure ullib
spreg mempool -lpthread -lcrypto -lm -lrt -lssl -ldl -lz)
add_library(pdclient ${pdclient_srcs})
set_source_files_properties(
......
......@@ -28,6 +28,7 @@ DEFINE_int32(reload_interval_s, 10, "");
DEFINE_bool(enable_model_toolkit, false, "enable model toolkit");
DEFINE_string(enable_protocol_list, "baidu_std nshead", "set protocol list");
const char* START_OP_NAME = "startup_op";
} // predictor
} // paddle_serving
} // baidu
......
......@@ -30,7 +30,7 @@ DECLARE_bool(enable_model_toolkit);
DECLARE_string(enable_protocol_list);
// STATIC Variables
const char* START_OP_NAME = "startup_op";
extern const char* START_OP_NAME;
// ERRORCODE
enum {
......
FILE(GLOB spreg_srcs ${CMAKE_CURRENT_LIST_DIR}/*.cpp)
add_library(spreg ${spreg_srcs})
add_dependencies(spreg pcre)
target_link_libraries(spreg pcre)
include_directories(${CMAKE_CURRENT_LIST_DIR}/include)
message(STATUS ${CMAKE_CURRENT_LIST_DIR}/include)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册