File tree Expand file tree Collapse file tree 1 file changed +26
-58
lines changed Expand file tree Collapse file tree 1 file changed +26
-58
lines changed Original file line number Diff line number Diff line change 19
19
# OTHER DEALINGS IN THE SOFTWARE.
20
20
21
21
#this file should contain only compiler and linker flags
22
- if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^aarch" )
23
- SET (GMMLIB_COMPILER_FLAGS_COMMON
24
- #general warnings
25
- #-Wall
26
- -Winit-self
27
- -Winvalid-pch
28
- -Wpointer-arith
29
- -Wno-unused
30
- -Wno-unknown-pragmas
31
- -Wno-comments
32
- -Wno-narrowing
33
- -Wno-overflow
34
- -Wno-parentheses
35
- -Wno-missing-braces
36
- -Wno-sign-compare
37
- -Werror=address
38
- -Werror=format-security
39
- -Werror=return-type
40
22
41
- # General optimization options
42
- -march=${GMMLIB_MARCH}
43
- -finline-functions
44
- -fno-short-enums
45
- -Wa,--noexecstack
46
- -fno-strict-aliasing
47
- # Common defines
48
- -DUSE_NEON
49
- # Other common flags
50
- -fstack-protector
51
- -fdata-sections
52
- -ffunction-sections
53
- -fmessage-length=0
54
- -fvisibility=hidden
55
- -fPIC
56
- -g
57
- )
58
- else ()
59
- SET (GMMLIB_COMPILER_FLAGS_COMMON
60
- #general warnings
61
- -Wall
23
+ SET (GMMLIB_COMPILER_FLAGS_COMMON
62
24
-Winit-self
63
25
-Winvalid-pch
64
26
-Wpointer-arith
@@ -70,32 +32,16 @@ else()
70
32
-Wno-parentheses
71
33
-Wno-missing-braces
72
34
-Wno-sign-compare
73
- -Wno-enum-compare
74
35
-Werror=address
75
36
-Werror=format-security
76
37
-Werror=return-type
77
38
78
39
# General optimization options
79
40
-march=${GMMLIB_MARCH}
80
- -mpopcnt
81
- -msse
82
- -msse2
83
- -msse3
84
- -mssse3
85
- -msse4
86
- -msse4.1
87
- -msse4.2
88
- -mfpmath=sse
89
41
-finline-functions
90
42
-fno-short-enums
91
43
-Wa,--noexecstack
92
44
-fno-strict-aliasing
93
- # Common defines
94
- -DUSE_MMX
95
- -DUSE_SSE
96
- -DUSE_SSE2
97
- -DUSE_SSE3
98
- -DUSE_SSSE3
99
45
# Other common flags
100
46
-fstack-protector
101
47
-fdata-sections
@@ -104,9 +50,31 @@ else()
104
50
-fvisibility=hidden
105
51
-fPIC
106
52
-g
107
- # -m32 or -m64
108
- -m${GMMLIB_ARCH}
109
- )
53
+ )
54
+
55
+ if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^aarch" )
56
+ list (APPEND GMMLIB_COMPILER_FLAGS_COMMON "-DUSE_NEON" )
57
+ else ()
58
+ list (APPEND GMMLIB_COMPILER_FLAGS_COMMON
59
+ -Wall
60
+ -Wno-enum-compare
61
+ -mpopcnt
62
+ -msse
63
+ -msse2
64
+ -msse3
65
+ -mssse3
66
+ -msse4
67
+ -msse4.1
68
+ -msse4.2
69
+ -mfpmath=sse
70
+ -DUSE_MMX
71
+ -DUSE_SSE
72
+ -DUSE_SSE2
73
+ -DUSE_SSE3
74
+ -DUSE_SSSE3
75
+ # -m32 or -m64
76
+ -m${GMMLIB_ARCH}
77
+ )
110
78
endif ()
111
79
112
80
if ("${CMAKE_CXX_COMPILER_ID} " STREQUAL "GNU" )
You can’t perform that action at this time.
0 commit comments