File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -532,7 +532,9 @@ if(MI_TRACK_ASAN)
532
532
endif ()
533
533
string (TOLOWER "${CMAKE_BUILD_TYPE} " CMAKE_BUILD_TYPE_LC )
534
534
list (APPEND mi_defines "MI_CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE_LC} " ) #todo: multi-config project needs $<CONFIG> ?
535
- if (NOT (CMAKE_BUILD_TYPE_LC MATCHES "^(release|relwithdebinfo|minsizerel|none)$" ))
535
+ if (CMAKE_BUILD_TYPE_LC MATCHES "^(release|relwithdebinfo|minsizerel|none)$" )
536
+ list (APPEND mi_defines MI_BUILD_RELEASE )
537
+ else ()
536
538
set (mi_libname "${mi_libname} -${CMAKE_BUILD_TYPE_LC} " ) #append build type (e.g. -debug) if not a release version
537
539
endif ()
538
540
Original file line number Diff line number Diff line change @@ -66,10 +66,10 @@ terms of the MIT license. A copy of the license can be found in the file
66
66
// #define MI_DEBUG 2 // + internal assertion checks
67
67
// #define MI_DEBUG 3 // + extensive internal invariant checking (cmake -DMI_DEBUG_FULL=ON)
68
68
#if !defined(MI_DEBUG )
69
- #if !defined(NDEBUG ) || defined(_DEBUG )
70
- #define MI_DEBUG 2
71
- #else
69
+ #if defined(MI_BUILD_RELEASE ) || defined(NDEBUG )
72
70
#define MI_DEBUG 0
71
+ #else
72
+ #define MI_DEBUG 2
73
73
#endif
74
74
#endif
75
75
You can’t perform that action at this time.
0 commit comments