Skip to content

Commit

Permalink
Compile in Release mode by default (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumekln authored Sep 4, 2020
1 parent 8af11d7 commit 83a5dda
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ See the `-h` flag to list the available options.
```
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=<Release or Debug> ..
cmake ..
make
```

Expand Down
2 changes: 1 addition & 1 deletion bindings/python/tools/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 83a5dda

Please sign in to comment.