From 915a0df0b299fe51a9a27390efbcb86c812f6806 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Sat, 30 May 2026 11:22:16 +0200 Subject: [PATCH] fix default build type init --- CMakeLists.txt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c137110..f912b1f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,17 +3,14 @@ cmake_minimum_required(VERSION 3.25.1) set(CMAKE_C_COMPILER gcc) message(STATUS "CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}") -project(kds-s2000w-net) +set(CMAKE_BUILD_TYPE Release CACHE STRING "build type [Debug|Release]") -set(CMAKE_BUILD_TYPE Release - CACHE STRING "build type [Debug|Release]") +project(kds-s2000w-net) if(CMAKE_BUILD_TYPE STREQUAL Release) set(CMAKE_C_FLAGS "-std=c99 -fPIC -s -Wall -Wextra -Wno-unused-parameter -Werror -pedantic" CACHE STRING "release compiler flags" FORCE) -endif() - -if(CMAKE_BUILD_TYPE STREQUAL Debug) +else() SET(CMAKE_C_FLAGS "-std=c99 -fPIC -Wall -Wextra -Wno-unused-parameter -pedantic -g" CACHE STRING "debug compiler flags" FORCE) endif() -- 2.47.3