Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

可能存在内存泄漏? #53

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
language: cpp
addons:
apt:
sources:
- llvm-toolchain-precise-3.6
- ubuntu-toolchain-r-test
packages:
- clang-3.6
- g++-5
- gcc-5

before_install:
- if [ $TRAVIS_OS_NAME == linux ]; then sudo apt-get install cmake; fi
- if [ $TRAVIS_OS_NAME == osx ]; then brew install cmake; fi
install:
- if [ "$CXX" = "g++" ]; then export CXX="g++-5" CC="gcc-5"; fi
- if [ "$CXX" = "clang++" ]; then export CXX="clang++-3.6" CC="clang-3.6"; fi
script:
- mkdir build
- cd build
Expand All @@ -10,13 +22,10 @@ script:
- make test
os:
- linux
- osx
compiler:
- clang
- gcc
notifications:
recipients:
- i@yanyiwu.com
email:
on_success: change
on_failure: always
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@ PROJECT(CPPJIEBA)

CMAKE_MINIMUM_REQUIRED (VERSION 2.6)

SET( CMAKE_VERBOSE_MAKEFILE on )

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

ADD_DEFINITIONS(-O3 -Wall -g)
ADD_DEFINITIONS(-O3 -Wall -g -fsanitize=address,undefined -std=c++0x)

set(CMAKE_EXE_LINKER_FLAGS "-O3 -Wall -g -fsanitize=address,undefined -std=c++0x")

IF(APPLE) # mac os
ADD_DEFINITIONS(-std=c++0x)
endif()
Expand Down