update husky to be hpp

This commit is contained in:
wyy 2013-11-30 05:15:51 -08:00
parent bdb645ce69
commit 2e2fc0ff15
3 changed files with 4 additions and 16 deletions

View File

@ -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)

View File

@ -3,7 +3,7 @@
#include <iostream>
#include <string>
#include "Limonp/logger.hpp"
#include "../Limonp/logger.hpp"
namespace Husky
{

View File

@ -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[])