]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
fix default build type init
authorBastian Dehn <hhaalo@arcor.de>
Sat, 30 May 2026 09:22:16 +0000 (11:22 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 30 May 2026 09:22:16 +0000 (11:22 +0200)
CMakeLists.txt

index c1371102acae7601f0f006e888be7c7656a116ba..f912b1f139ad03f9d0a6e52950bbab6323509ad7 100644 (file)
@@ -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()