cmake: Build release build by default
Release build uses "-O3 -DNDEBUG" flags. Also updated tools/cmake/README.md PiperOrigin-RevId: 343415907 Change-Id: If8bc6b15febc79d7d982e972e9fc14ab8f8dbbff
This commit is contained in:
parent
289ba7f54b
commit
5d44405066
tensorflow/lite
@ -27,6 +27,12 @@
|
||||
# - Host Tools (i.e conversion / analysis tools etc.)
|
||||
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
message(STATUS "Setting build type to Release, for debug builds use"
|
||||
"'-DCMAKE_BUILD_TYPE=Debug'.")
|
||||
set(CMAKE_BUILD_TYPE "Release")
|
||||
endif()
|
||||
|
||||
# Double colon in target name means ALIAS or IMPORTED target.
|
||||
cmake_policy(SET CMP0028 NEW)
|
||||
# Enable MACOSX_RPATH (@rpath) for built dynamic libraries.
|
||||
|
@ -40,6 +40,13 @@ cd tflite_build
|
||||
cmake ../tensorflow_src/tensorflow/lite
|
||||
```
|
||||
|
||||
It generates release binary by default. If you need to produce debug builds, you
|
||||
need to provide '-DCMAKE_BUILD_TYPE=Debug' option.
|
||||
|
||||
```sh
|
||||
cmake ../tensorflow_src/tensorflow/lite -DCMAKE_BUILD_TYPE=Debug
|
||||
```
|
||||
|
||||
If you want to configure Android build with GPU delegate support,
|
||||
|
||||
```sh
|
||||
|
Loading…
Reference in New Issue
Block a user