mirror of
https://github.com/yanyiwu/cppjieba.git
synced 2025-07-18 00:00:12 +08:00
update husky to be hpp
This commit is contained in:
parent
bdb645ce69
commit
2e2fc0ff15
@ -3,9 +3,7 @@ SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
|
||||
|
||||
ADD_EXECUTABLE(cjsegment segment.cpp)
|
||||
ADD_EXECUTABLE(cjserver server.cpp)
|
||||
TARGET_LINK_LIBRARIES(cjserver husky pthread)
|
||||
|
||||
LINK_DIRECTORIES(Husky)
|
||||
TARGET_LINK_LIBRARIES(cjserver pthread)
|
||||
|
||||
INSTALL(TARGETS cjsegment RUNTIME DESTINATION bin)
|
||||
INSTALL(TARGETS cjserver RUNTIME DESTINATION bin)
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include "Limonp/logger.hpp"
|
||||
#include "../Limonp/logger.hpp"
|
||||
|
||||
namespace Husky
|
||||
{
|
||||
|
@ -5,8 +5,7 @@
|
||||
#include <string.h>
|
||||
#include "Limonp/ArgvContext.hpp"
|
||||
#include "Limonp/Config.hpp"
|
||||
#include "Husky/Daemon.h"
|
||||
#include "Husky/ServerFrame.h"
|
||||
#include "Husky/ServerFrame.hpp"
|
||||
#include "MPSegment.hpp"
|
||||
#include "HMMSegment.hpp"
|
||||
#include "MixSegment.hpp"
|
||||
@ -92,16 +91,7 @@ bool run(int argc, char** argv)
|
||||
|
||||
ReqHandler reqHandler(dictPath, modelPath);
|
||||
ServerFrame sf(port, threadNum, &reqHandler);
|
||||
Daemon daemon(&sf, pidFile.c_str());
|
||||
if(arg["-k"] == "start")
|
||||
{
|
||||
return daemon.start();
|
||||
}
|
||||
else if(arg["-k"] == "stop")
|
||||
{
|
||||
return daemon.stop();
|
||||
}
|
||||
return false;
|
||||
return sf.init() && sf.run();
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
|
Loading…
x
Reference in New Issue
Block a user