From 442adfbfaa4a040bf07142dd97d71945c87c599a Mon Sep 17 00:00:00 2001 From: redfish Date: Sun, 28 Aug 2016 06:53:46 -0400 Subject: [PATCH] cmake: define a default build type Lets 'cmake .. && make' be sufficient to build. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b382264b..ff1590860 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,6 +45,11 @@ function (die msg) message(FATAL_ERROR "${BoldRed}${msg}${ColourReset}") endfunction () +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE) + message(STATUS "Setting default build type: ${CMAKE_BUILD_TYPE}") +endif() + # ARCH defines the target architecture, either by an explicit identifier or # one of the following two keywords. By default, ARCH a value of 'native': # target arch = host arch, binary is not portable. When ARCH is set to the