default build type is release

This commit is contained in:
Gagik Hakobyan 2018-12-29 22:39:06 +04:00
parent eff4207fc1
commit 047cc2c3a6

View File

@ -3,7 +3,6 @@ cmake_minimum_required(VERSION 3.8)
set(GPU ON)
set(CUDNN ON)
set(OPENCV ON)
set(DEBUG OFF)
#add_definitions(-DOPENMP)
cmake_policy(SET CMP0054 NEW)
@ -12,6 +11,18 @@ cmake_policy(SET CMP0046 NEW)
project(darknet)
if (NOT EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
endif()
endif()
string(ASCII 27 Esc)
set(ColourReset "${Esc}[m")
set(Green "${Esc}[32m")
message("${Green}-- Project build-type: ${CMAKE_BUILD_TYPE}${ColourReset}")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
@ -183,10 +194,6 @@ if (OPENCV AND GPU)
set(OpenCV_CUDA ON)
endif()
if (DEBUG)
add_definitions(-DDEBUG)
endif()
set_runtime(STATIC)
add_library(darknet_cpp STATIC ${CPP_SOURCES})