Skip to content

Commit 752c273

Browse files
authored
Use CMAKE_BUILD_TYPE=Release by default (#238)
1 parent 04a2f6f commit 752c273

3 files changed

Lines changed: 2 additions & 14 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.20)
22

33
project(ITLabAI)
44

5+
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type" FORCE)
6+
57
option(ENABLE_STATISTIC_TENSORS "Enable statistic tensors" OFF)
68

79
if(ENABLE_STATISTIC_TENSORS)

app/Graph/CMakeLists.txt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,12 @@ target_link_libraries(Graph_Build BuildGraph)
2222
add_executable(ACC acc_check.cpp)
2323
target_link_libraries(ACC BuildGraph)
2424

25-
if (NOT CMAKE_BUILD_TYPE)
26-
set(CMAKE_BUILD_TYPE "Debug")
27-
endif()
28-
2925
if (WIN32)
3026
add_custom_command(TARGET Graph_Build POST_BUILD
3127
COMMAND ${CMAKE_COMMAND} -E copy_directory
3228
"${OPENCV_BUILD_DIR}/bin/."
3329
"${CMAKE_BINARY_DIR}/bin/")
3430

35-
if ("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG")
36-
set(CMAKE_BUILD_TYPE "Debug")
37-
endif()
38-
if ("${CMAKE_BUILD_TYPE}" STREQUAL "RELEASE")
39-
set(CMAKE_BUILD_TYPE "Release")
40-
endif()
4131
add_custom_command(TARGET ACC POST_BUILD
4232
COMMAND ${CMAKE_COMMAND} -E copy_directory
4333
"${OPENCV_BUILD_DIR}/bin/."

test/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ target_link_libraries(run_test PUBLIC graphT_lib)
1313
target_include_directories(run_test PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}")
1414
target_include_directories(run_test PRIVATE "${CMAKE_SOURCE_DIR}/app/ReaderImage")
1515

16-
if (NOT CMAKE_BUILD_TYPE)
17-
set(CMAKE_BUILD_TYPE "Debug")
18-
endif()
19-
2016
if (WIN32)
2117
add_custom_command(TARGET run_test POST_BUILD
2218
COMMAND ${CMAKE_COMMAND} -E copy_directory

0 commit comments

Comments
 (0)