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(cjsegment segment.cpp)
|
||||||
ADD_EXECUTABLE(cjserver server.cpp)
|
ADD_EXECUTABLE(cjserver server.cpp)
|
||||||
TARGET_LINK_LIBRARIES(cjserver husky pthread)
|
TARGET_LINK_LIBRARIES(cjserver pthread)
|
||||||
|
|
||||||
LINK_DIRECTORIES(Husky)
|
|
||||||
|
|
||||||
INSTALL(TARGETS cjsegment RUNTIME DESTINATION bin)
|
INSTALL(TARGETS cjsegment RUNTIME DESTINATION bin)
|
||||||
INSTALL(TARGETS cjserver RUNTIME DESTINATION bin)
|
INSTALL(TARGETS cjserver RUNTIME DESTINATION bin)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "Limonp/logger.hpp"
|
#include "../Limonp/logger.hpp"
|
||||||
|
|
||||||
namespace Husky
|
namespace Husky
|
||||||
{
|
{
|
||||||
|
@ -5,8 +5,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "Limonp/ArgvContext.hpp"
|
#include "Limonp/ArgvContext.hpp"
|
||||||
#include "Limonp/Config.hpp"
|
#include "Limonp/Config.hpp"
|
||||||
#include "Husky/Daemon.h"
|
#include "Husky/ServerFrame.hpp"
|
||||||
#include "Husky/ServerFrame.h"
|
|
||||||
#include "MPSegment.hpp"
|
#include "MPSegment.hpp"
|
||||||
#include "HMMSegment.hpp"
|
#include "HMMSegment.hpp"
|
||||||
#include "MixSegment.hpp"
|
#include "MixSegment.hpp"
|
||||||
@ -92,16 +91,7 @@ bool run(int argc, char** argv)
|
|||||||
|
|
||||||
ReqHandler reqHandler(dictPath, modelPath);
|
ReqHandler reqHandler(dictPath, modelPath);
|
||||||
ServerFrame sf(port, threadNum, &reqHandler);
|
ServerFrame sf(port, threadNum, &reqHandler);
|
||||||
Daemon daemon(&sf, pidFile.c_str());
|
return sf.init() && sf.run();
|
||||||
if(arg["-k"] == "start")
|
|
||||||
{
|
|
||||||
return daemon.start();
|
|
||||||
}
|
|
||||||
else if(arg["-k"] == "stop")
|
|
||||||
{
|
|
||||||
return daemon.stop();
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user