]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
add config type
authorBastian Dehn <hhaalo@arcor.de>
Mon, 1 Apr 2024 17:36:43 +0000 (19:36 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Mon, 1 Apr 2024 17:36:43 +0000 (19:36 +0200)
CMakeLists.txt

index 018925814a5be7cd97005a40b5b5e940e86af272..571cbb40a7ea5255b10b6c9d1a17d67a67ad4f4c 100644 (file)
@@ -2,8 +2,10 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.25.1)
 
 SET(CMAKE_C_COMPILER gcc CACHE STRING "compiler")
 IF (NOT RUN_TESTS)
+       SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "release" FORCE)
        SET(CMAKE_C_FLAGS "-Wall -Werror" CACHE STRING "compiler flags" FORCE)
 ELSE()
+       SET(CMAKE_BUILD_TYPE "DEBUG" CACHE STRING "release" FORCE)
        SET(CMAKE_C_FLAGS "-fPIC \
 -fprofile-arcs \
 -ftest-coverage \
@@ -25,6 +27,7 @@ ELSE()
 --wrap,usleep" CACHE STRING "test coverage compiler flags" FORCE)
 ENDIF()
 
+MESSAGE(STATUS "CMAKE_BUILD_TYPE " ${CMAKE_BUILD_TYPE})
 MESSAGE(STATUS "CMAKE_C_FLAGS " ${CMAKE_C_FLAGS})
 
 PROJECT("kds_s2000w_net" VERSION "0.0.1")