File: disable-cflags.patch

package info (click to toggle)
arpon 3.0-ng%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 728 kB
  • sloc: ansic: 3,416; sh: 166; makefile: 6
file content (57 lines) | stat: -rw-r--r-- 2,544 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Description: Disable additional CFLAGS
 CMAKE's default flags for build type release and also those added by the
 maintainer should not be added for the debian version, disabling them
Author: Lukas Schwaighofer <lukas@schwaighofer.name>
Forwarded: not-needed

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,7 +32,6 @@
 #
 # The following variables can be modified:
 #
-# CMAKE_BUILD_TYPE     - Set build type: release or debug
 # CMAKE_INCLUDE_PATH   - Set the include path
 # CMAKE_LIBRARY_PATH   - Set the library path
 # CMAKE_C_FLAGS        - Set flags for the C compiler
@@ -76,26 +75,6 @@
 
 find_package(System)
 
-if(NOT CMAKE_BUILD_TYPE)
-    set(CMAKE_BUILD_TYPE Release
-        CACHE STRING "Choose the type of build, options are: Debug Release"
-        FORCE)
-endif(NOT CMAKE_BUILD_TYPE)
-
-string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_tolower)
-
-if(cmake_build_type_tolower STREQUAL "debug")
-    message(STATUS "Build type: Debug")
-
-    set(CMAKE_BUILD_TYPE "Debug")
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -Wextra -Wformat=2 -Winit-self -Wreturn-type -Wswitch-default -Wswitch-enum -Wunused-parameter -Wuninitialized -Wstrict-aliasing=3 -Wstrict-overflow=5 -Wdeclaration-after-statement -Wundef -Wpointer-arith -Wunsafe-loop-optimizations -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wsizeof-pointer-memaccess -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wold-style-declaration -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wlong-long -Wvariadic-macros -Wvarargs -Wvla -Wdisabled-optimization -Woverlength-strings -O0 -g -ggdb")
-else(cmake_build_type_tolower STREQUAL "debug")
-    message(STATUS "Build type: Release")
-
-    set(CMAKE_BUILD_TYPE "Release")
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -Wextra -O3 -DNDEBUG")
-endif(cmake_build_type_tolower STREQUAL "debug")
-
 find_package(Headers)
 find_package(Pthreads)
 find_package(Librt)
@@ -107,13 +86,6 @@
     set(CMAKE_INSTALL_PREFIX "/" CACHE PATH "ArpON install prefix" FORCE)
 endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
 
-if(cmake_build_type_tolower STREQUAL "debug")
-    message(STATUS "Include path: ${CMAKE_INCLUDE_PATH}")
-    message(STATUS "Library path: ${CMAKE_LIBRARY_PATH}")
-    message(STATUS "C compiler flags: ${CMAKE_C_FLAGS}")
-    message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}")
-endif(cmake_build_type_tolower STREQUAL "debug")
-
 add_subdirectory(src)
 #add_subdirectory(doc)
 add_subdirectory(man8)