Package: scantailor / 0.9.12.2-2

buildflags.patch Patch series | download
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
Last-Update: 2013-06-18
Forwarded: yes
Author: Dmitry Smirnov <onlyjob@member.fsf.org>
Description: fix FLAGS override due to incorrect caching
 Read more about similar issue at
  http://www.cmake.org/pipermail/cmake/2008-October/024550.html

--- a/cmake/SetDefaultGccFlags.cmake
+++ b/cmake/SetDefaultGccFlags.cmake
@@ -54,79 +54,79 @@
 			# Flags common for all build configurations.
 			SET(
 				CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${default_flags_}"
-				CACHE STRING "Common C flags for all build configurations." FORCE
+				CACHE STRING "Common C flags for all build configurations."
 			)
 			SET(
 				CMAKE_CXX_FLAGS
 				"${CMAKE_CXX_FLAGS} ${default_flags_} ${stdlibs_shared_static_}"
-				CACHE STRING "Common C++ flags for all build configurations." FORCE
+				CACHE STRING "Common C++ flags for all build configurations."
 			)
 		
 			# Release
 			SET(
 				CMAKE_C_FLAGS_RELEASE
 				"-DNDEBUG -O2 ${visibility_cflags_} ${gc_sections_cflags_}"
-				CACHE STRING "C flags for Release builds." FORCE
+				CACHE STRING "C flags for Release builds."
 			)
 			SET(
 				CMAKE_CXX_FLAGS_RELEASE
 				"-DNDEBUG -O2 ${visibility_cflags_} ${gc_sections_cflags_}"
-				CACHE STRING "C++ flags for Release builds." FORCE
+				CACHE STRING "C++ flags for Release builds."
 			)
 			SET(
 				CMAKE_EXE_LINKER_FLAGS_RELEASE
 				"${gc_sections_ldflags_} ${dead_strip_ldflags_}"
-				CACHE STRING "Link flags for Release builds." FORCE
+				CACHE STRING "Link flags for Release builds."
 			)
 			
 			# MinSizeRel
 			SET(
 				CMAKE_C_FLAGS_MINSIZEREL
 				"-DNDEBUG -Os ${visibility_cflags_} ${gc_sections_cflags_}"
-				CACHE STRING "C flags for MinSizeRel builds." FORCE
+				CACHE STRING "C flags for MinSizeRel builds."
 			)
 			SET(
 				CMAKE_CXX_FLAGS_MINSIZEREL
 				"-DNDEBUG -Os ${visibility_cflags_} ${gc_sections_cflags_}"
-				CACHE STRING "C++ flags for MinSizeRel builds." FORCE
+				CACHE STRING "C++ flags for MinSizeRel builds."
 			)
 			SET(
 				CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
 				"${gc_sections_ldflags_} ${dead_strip_ldflags_}"
-				CACHE STRING "Link flags for MinSizeRel builds." FORCE
+				CACHE STRING "Link flags for MinSizeRel builds."
 			)
 			
 			# RelWithDebInfo
 			SET(
 				CMAKE_C_FLAGS_RELWITHDEBINFO
 				"-DNDEBUG -g -O2 ${visibility_cflags_}"
-				CACHE STRING "C flags for RelWithDebInfo builds." FORCE
+				CACHE STRING "C flags for RelWithDebInfo builds."
 			)
 			SET(
 				CMAKE_CXX_FLAGS_RELWITHDEBINFO
-				"-DNDEBUG -g -O2 ${visibility_cflags_}"
-				CACHE STRING "C++ flags for RelWithDebInfo builds." FORCE
+				"${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DNDEBUG -g -O2 ${visibility_cflags_}"
+				CACHE STRING "C++ flags for RelWithDebInfo builds."
 			)
 			SET(
 				CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO ""
-				CACHE STRING "Link flags for RelWithDebInfo builds." FORCE
+				CACHE STRING "Link flags for RelWithDebInfo builds."
 			)
 			
 			# Debug
 			SET(
 				CMAKE_C_FLAGS_DEBUG "-DDEBUG -g" CACHE STRING
-				"C flags for Debug builds." FORCE
+				"C flags for Debug builds."
 			)
 			SET(
 				CMAKE_CXX_FLAGS_DEBUG "-DDEBUG -g" CACHE STRING
-				"C++ flags for Debug builds." FORCE
+				"C++ flags for Debug builds."
 			)
 			SET(
 				CMAKE_EXE_LINKER_FLAGS_DEBUG ""
-				CACHE STRING "Link flags for Debug builds." FORCE
+				CACHE STRING "Link flags for Debug builds."
 			)
 			
-			SET(COMPILER_FLAGS_OVERRIDDEN YES CACHE INTERNAL "" FORCE)
+			SET(COMPILER_FLAGS_OVERRIDDEN YES CACHE INTERNAL "")
 		
 		ENDIF(NOT COMPILER_FLAGS_OVERRIDDEN)
 		
--- a/cmake/SetDefaultBuildType.cmake
+++ b/cmake/SetDefaultBuildType.cmake
@@ -1,9 +1,9 @@
 MACRO(ST_SET_DEFAULT_BUILD_TYPE TYPE_)
 	IF(NOT CMAKE_BUILD_TYPE AND NOT DEFAULT_BUILD_TYPE_SET)
-		SET(DEFAULT_BUILD_TYPE_SET TRUE CACHE INTERNAL "" FORCE)
+		SET(DEFAULT_BUILD_TYPE_SET TRUE CACHE INTERNAL "")
 		SET(
 			CMAKE_BUILD_TYPE "${TYPE_}" CACHE STRING
-			"Build type (Release Debug RelWithDebInfo MinSizeRel)" FORCE
+			"Build type (Release Debug RelWithDebInfo MinSizeRel)"
 		)
 	ENDIF(NOT CMAKE_BUILD_TYPE AND NOT DEFAULT_BUILD_TYPE_SET)
 ENDMACRO(ST_SET_DEFAULT_BUILD_TYPE)