mirror of
https://github.com/yanyiwu/cppjieba.git
synced 2025-07-18 00:00:12 +08:00
source code layout change:
1. src/ -> include/cppjieba/ 2. src/limonp/ -> deps/limonp/ 3. server/husky -> deps/husky/ 4. test/unittest/gtest -> deps/gtest
This commit is contained in:
parent
a07a22e9c4
commit
3c5ad24260
@ -2,6 +2,9 @@ PROJECT(CPPJIEBA)
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED (VERSION 2.6)
|
||||
|
||||
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/deps
|
||||
${PROJECT_SOURCE_DIR}/include)
|
||||
|
||||
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
set (CMAKE_INSTALL_PREFIX "/usr/local/cppjieba" CACHE PATH "default install path" FORCE )
|
||||
endif()
|
||||
@ -16,6 +19,7 @@ endif()
|
||||
# ADD_DEFINITIONS(-DCPPJIEBA_${ENC})
|
||||
# ENDIF()
|
||||
|
||||
ADD_SUBDIRECTORY(deps)
|
||||
ADD_SUBDIRECTORY(server)
|
||||
ADD_SUBDIRECTORY(dict)
|
||||
ADD_SUBDIRECTORY(script)
|
||||
|
@ -1,5 +1,14 @@
|
||||
# CppJieba ChangeLog
|
||||
|
||||
## next version
|
||||
|
||||
源码目录布局调整:
|
||||
|
||||
1. src/ -> include/cppjieba/
|
||||
2. src/limonp/ -> deps/limonp/
|
||||
3. server/husky -> deps/husky/
|
||||
4. test/unittest/gtest -> deps/gtest
|
||||
|
||||
## v4.2.1
|
||||
|
||||
1. Upgrade [limonp] to version v0.4.1, [husky] to version v0.2.0
|
||||
|
1
deps/CMakeLists.txt
vendored
Normal file
1
deps/CMakeLists.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
ADD_SUBDIRECTORY(gtest)
|
3
deps/gtest/CMakeLists.txt
vendored
Normal file
3
deps/gtest/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
INCLUDE_DIRECTORIES(./ include)
|
||||
ADD_LIBRARY(gtest STATIC src/gtest-all.cc)
|
||||
TARGET_LINK_LIBRARIES(gtest pthread)
|
@ -1,7 +1,5 @@
|
||||
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
||||
|
||||
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src)
|
||||
|
||||
ADD_EXECUTABLE(cjserver server.cpp)
|
||||
TARGET_LINK_LIBRARIES(cjserver pthread)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "../src/Jieba.hpp"
|
||||
#include "Jieba.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
#include <iostream>
|
||||
#include <ctime>
|
||||
#include <fstream>
|
||||
#include "../src/MPSegment.hpp"
|
||||
#include "../src/HMMSegment.hpp"
|
||||
#include "../src/MixSegment.hpp"
|
||||
#include "../src/KeywordExtractor.hpp"
|
||||
#include "../src/limonp/Colors.hpp"
|
||||
#include "cppjieba/MPSegment.hpp"
|
||||
#include "cppjieba/HMMSegment.hpp"
|
||||
#include "cppjieba/MixSegment.hpp"
|
||||
#include "cppjieba/KeywordExtractor.hpp"
|
||||
#include "limonp/Colors.hpp"
|
||||
|
||||
using namespace cppjieba;
|
||||
|
||||
|
@ -1,11 +1,9 @@
|
||||
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/test)
|
||||
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
|
||||
|
||||
SET(GTEST_ROOT_DIR gtest)
|
||||
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/deps/gtest/include)
|
||||
|
||||
ADD_DEFINITIONS(-DLOGGER_LEVEL=LL_WARN)
|
||||
INCLUDE_DIRECTORIES(${GTEST_ROOT_DIR} ${GTEST_ROOT_DIR}/include ${PROJECT_SOURCE_DIR})
|
||||
ADD_LIBRARY(gtest STATIC ${GTEST_ROOT_DIR}/src/gtest-all.cc)
|
||||
|
||||
ADD_EXECUTABLE(test.run
|
||||
gtest_main.cpp
|
||||
@ -16,6 +14,5 @@ ADD_EXECUTABLE(test.run
|
||||
jieba_test.cpp
|
||||
pre_filter_test.cpp
|
||||
)
|
||||
TARGET_LINK_LIBRARIES(gtest pthread)
|
||||
TARGET_LINK_LIBRARIES(test.run gtest pthread)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "src/Jieba.hpp"
|
||||
#include "cppjieba/Jieba.hpp"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
using namespace cppjieba;
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "src/KeywordExtractor.hpp"
|
||||
#include "cppjieba/KeywordExtractor.hpp"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
using namespace cppjieba;
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "src/PosTagger.hpp"
|
||||
#include "cppjieba/PosTagger.hpp"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
using namespace cppjieba;
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "gtest/gtest.h"
|
||||
#include "src/PreFilter.hpp"
|
||||
#include "cppjieba/PreFilter.hpp"
|
||||
|
||||
using namespace cppjieba;
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
#include "src/SegmentBase.hpp"
|
||||
#include "src/MixSegment.hpp"
|
||||
#include "src/MPSegment.hpp"
|
||||
#include "src/HMMSegment.hpp"
|
||||
#include "src/FullSegment.hpp"
|
||||
#include "src/QuerySegment.hpp"
|
||||
#include "src/LevelSegment.hpp"
|
||||
#include "cppjieba/SegmentBase.hpp"
|
||||
#include "cppjieba/MixSegment.hpp"
|
||||
#include "cppjieba/MPSegment.hpp"
|
||||
#include "cppjieba/HMMSegment.hpp"
|
||||
#include "cppjieba/FullSegment.hpp"
|
||||
#include "cppjieba/QuerySegment.hpp"
|
||||
#include "cppjieba/LevelSegment.hpp"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
using namespace cppjieba;
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "src/DictTrie.hpp"
|
||||
#include "src/MPSegment.hpp"
|
||||
#include "cppjieba/DictTrie.hpp"
|
||||
#include "cppjieba/MPSegment.hpp"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
using namespace cppjieba;
|
||||
|
Loading…
x
Reference in New Issue
Block a user