From eb994adb708ee5eaefbe7a8dec56392317dcd35a Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Wed, 15 Apr 2020 21:54:03 +0900 Subject: [PATCH] force set CMAKE_BUILD_TYPE as Release for default --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3b2dbb50..0822ec71 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,11 @@ cmake_minimum_required(VERSION 2.8.3) project(opencv_apps) +if(NOT CMAKE_BUILD_TYPE) + # Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel + set(CMAKE_BUILD_TYPE Release) +endif() + ## https://stackoverflow.com/questions/10984442/how-to-detect-c11-support-of-a-compiler-with-cmake if(CMAKE_COMPILER_IS_GNUCXX) execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)