mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
default build type is release
This commit is contained in:
parent
eff4207fc1
commit
047cc2c3a6
@ -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})
|
||||
|
Loading…
Reference in New Issue
Block a user