Set default build type to release

Summary: Closes https://github.com/caffe2/caffe2/pull/89

Reviewed By: bwasti

Differential Revision: D4392954

Pulled By: Yangqing

fbshipit-source-id: 00ec72838e5e7dd9ff96449a8589273c68d0cef5
This commit is contained in:
Simon Layton 2017-01-09 10:49:51 -08:00 committed by Facebook Github Bot
parent 73fe3d5f59
commit b99ea43c9a

View file

@ -52,6 +52,12 @@ option(BUILD_PYTHON "Build python binaries" ON)
# options that do not affect the main binaries, but affects testing binaries
option(BUILD_TEST "Build C++ test binaries (need gtest and gbenchmark)" ON)
# Set default build type
if(NOT CMAKE_BUILD_TYPE)
message(STATUS "Build type not set - defaulting to Release")
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build from: Debug Release RelWithDebInfo MinSizeRel Coverage." FORCE)
endif()
# ---[ Dependencies
include(cmake/Dependencies.cmake)