From da60faca1d97a887f23288aee08888059c6741f3 Mon Sep 17 00:00:00 2001 From: KangLin Date: Tue, 6 Apr 2021 14:27:01 +0800 Subject: [PATCH] Modify debug flag --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 11d40c5..76ff6eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,9 +36,10 @@ message("BUILD_VERSION:${BUILD_VERSION}") set(VERSION ${BUILD_VERSION}) if(NOT DEFINED CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Release") + set(CMAKE_BUILD_TYPE "Release") endif(NOT DEFINED CMAKE_BUILD_TYPE) -if("Debug" STREQUAL CMAKE_BUILD_TYPE) +string(TOLOWER "${CMAKE_BUILD_TYPE}" build_type) +if("debug" STREQUAL build_type) add_definitions(-D_DEBUG) endif()