diff --git a/.travis.yml b/.travis.yml index 09da1592..b14ac263 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,7 +36,7 @@ install: - export TOKENIZER_ROOT=$HOME/Tokenizer - export SENTENCEPIECE_ROOT=$HOME/sentencepiece-$SENTENCEPIECE_VERSION - mkdir build && cd build - - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$TOKENIZER_ROOT -DCMAKE_PREFIX_PATH=$SENTENCEPIECE_ROOT -DWITH_ICU=$WITH_ICU .. + - cmake -DCMAKE_INSTALL_PREFIX=$TOKENIZER_ROOT -DCMAKE_PREFIX_PATH=$SENTENCEPIECE_ROOT -DWITH_ICU=$WITH_ICU .. - make install - cd $ROOT_TRAVIS_DIR script: diff --git a/CMakeLists.txt b/CMakeLists.txt index f6997985..496ab2ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,10 @@ option(BUILD_SHARED_LIBS "Build shared libraries" ON) set(CMAKE_CXX_STANDARD 11) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Release) +endif(NOT CMAKE_BUILD_TYPE) + if(MSVC) if(NOT BUILD_SHARED_LIBS) if(CMAKE_VERSION VERSION_LESS "3.15.0") diff --git a/README.md b/README.md index ca4f3139..5752e2db 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ See the `-h` flag to list the available options. ``` mkdir build cd build -cmake -DCMAKE_BUILD_TYPE= .. +cmake .. make ``` diff --git a/bindings/python/tools/build_wheel.sh b/bindings/python/tools/build_wheel.sh index 87b19924..26182347 100644 --- a/bindings/python/tools/build_wheel.sh +++ b/bindings/python/tools/build_wheel.sh @@ -35,7 +35,7 @@ cd $ROOT_DIR # Build Tokenizer. mkdir build cd build -cmake -DCMAKE_BUILD_TYPE=Release -DLIB_ONLY=ON -DWITH_ICU=ON .. +cmake -DLIB_ONLY=ON -DWITH_ICU=ON .. make -j2 install cd $ROOT_DIR