From: Bastian Dehn Date: Tue, 16 Jul 2024 17:36:07 +0000 (+0200) Subject: add build release without debug flags X-Git-Tag: 1.0.0^2^2~10 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=7c8a7151e1270fbfe069b04ba04a1347d1205301;p=mv_none_space.git add build release without debug flags --- diff --git a/CMakeLists.txt b/CMakeLists.txt index e10469d..ea2c249 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,10 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.25.1) -SET(CMAKE_C_FLAGS "-g -Wall -fsanitize=address") +IF (CMAKE_BUILD_TYPE STREQUAL "Release") + SET(CMAKE_C_FLAGS "" CACHE STRING "release c flags") +ELSE() + SET(CMAKE_C_FLAGS "-g -Wall -fsanitize=address" CACHE STRING "debug c flags") +ENDIF() MESSAGE(STATUS "CMAKE_C_FLAGS: ${CMAKE_C_FLAGS}") PROJECT(mv_none_space)