@@ -2,122 +2,6 @@ option(GLM_QUIET "No CMake Message" OFF)
2
2
3
3
option (GLM_TEST_ENABLE "Build unit tests" ON )
4
4
option (GLM_PERF_TEST_ENABLE "Build perf tests" OFF )
5
- <<<<<<< HEAD
6
- =======
7
- option (GLM_TEST_ENABLE_SIMD_SSE2 "Enable SSE2 optimizations" OFF )
8
- option (GLM_TEST_ENABLE_SIMD_SSE3 "Enable SSE3 optimizations" OFF )
9
- option (GLM_TEST_ENABLE_SIMD_SSSE3 "Enable SSSE3 optimizations" OFF )
10
- option (GLM_TEST_ENABLE_SIMD_SSE4_1 "Enable SSE 4.1 optimizations" OFF )
11
- option (GLM_TEST_ENABLE_SIMD_SSE4_2 "Enable SSE 4.2 optimizations" OFF )
12
- option (GLM_TEST_ENABLE_SIMD_AVX "Enable AVX optimizations" OFF )
13
- option (GLM_TEST_ENABLE_SIMD_AVX2 "Enable AVX2 optimizations" OFF )
14
- option (GLM_TEST_ENABLE_SIMD_NEON "Enable ARM NEON optimizations" OFF )
15
- option (GLM_TEST_ENABLE_SIMD_FMA "Enable FMA optimizations" OFF )
16
- option (GLM_TEST_FORCE_PURE "Force 'pure' instructions" OFF )
17
-
18
- if (GLM_TEST_FORCE_PURE )
19
- add_definitions (-DGLM_FORCE_PURE )
20
-
21
- if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" )
22
- add_compile_options (-mfpmath=387 )
23
- endif ()
24
- message (STATUS "GLM: No SIMD instruction set" )
25
-
26
- elseif (GLM_TEST_ENABLE_SIMD_AVX2 )
27
- add_definitions (-DGLM_FORCE_INTRINSICS )
28
-
29
- if ((CMAKE_CXX_COMPILER_ID MATCHES "GNU" ) OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang" ))
30
- add_compile_options (-mavx2 )
31
- elseif (CMAKE_CXX_COMPILER_ID MATCHES "Intel" )
32
- add_compile_options (/QxAVX2 )
33
- elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
34
- add_compile_options (/arch:AVX2 )
35
- endif ()
36
- message (STATUS "GLM: AVX2 instruction set" )
37
-
38
- elseif (GLM_TEST_ENABLE_SIMD_AVX )
39
- add_definitions (-DGLM_FORCE_INTRINSICS )
40
-
41
- if ((CMAKE_CXX_COMPILER_ID MATCHES "GNU" ) OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang" ))
42
- add_compile_options (-mavx )
43
- elseif (CMAKE_CXX_COMPILER_ID MATCHES "Intel" )
44
- add_compile_options (/QxAVX )
45
- elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
46
- add_compile_options (/arch:AVX )
47
- endif ()
48
- message (STATUS "GLM: AVX instruction set" )
49
-
50
- elseif (GLM_TEST_ENABLE_SIMD_SSE4_2 )
51
- add_definitions (-DGLM_FORCE_INTRINSICS )
52
-
53
- if ((CMAKE_CXX_COMPILER_ID MATCHES "GNU" ) OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang" ))
54
- add_compile_options (-msse4.2 )
55
- elseif (CMAKE_CXX_COMPILER_ID MATCHES "Intel" )
56
- add_compile_options (/QxSSE4.2 )
57
- elseif ((CMAKE_CXX_COMPILER_ID MATCHES "MSVC" ) AND NOT CMAKE_CL_64 )
58
- add_compile_options (/arch:SSE2 ) # VC doesn't support SSE4.2
59
- endif ()
60
- message (STATUS "GLM: SSE4.2 instruction set" )
61
-
62
- elseif (GLM_TEST_ENABLE_SIMD_SSE4_1 )
63
- add_definitions (-DGLM_FORCE_INTRINSICS )
64
-
65
- if ((CMAKE_CXX_COMPILER_ID MATCHES "GNU" ) OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang" ))
66
- add_compile_options (-msse4.1 )
67
- elseif (CMAKE_CXX_COMPILER_ID MATCHES "Intel" )
68
- add_compile_options (/QxSSE4.1 )
69
- elseif ((CMAKE_CXX_COMPILER_ID MATCHES "MSVC" ) AND NOT CMAKE_CL_64 )
70
- add_compile_options (/arch:SSE2 ) # VC doesn't support SSE4.1
71
- endif ()
72
- message (STATUS "GLM: SSE4.1 instruction set" )
73
-
74
- elseif (GLM_TEST_ENABLE_SIMD_SSSE3 )
75
- add_definitions (-DGLM_FORCE_INTRINSICS )
76
-
77
- if ((CMAKE_CXX_COMPILER_ID MATCHES "GNU" ) OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang" ))
78
- add_compile_options (-mssse3 )
79
- elseif (CMAKE_CXX_COMPILER_ID MATCHES "Intel" )
80
- add_compile_options (/QxSSSE3 )
81
- elseif ((CMAKE_CXX_COMPILER_ID MATCHES "MSVC" ) AND NOT CMAKE_CL_64 )
82
- add_compile_options (/arch:SSE2 ) # VC doesn't support SSSE3
83
- endif ()
84
- message (STATUS "GLM: SSSE3 instruction set" )
85
-
86
- elseif (GLM_TEST_ENABLE_SIMD_SSE3 )
87
- add_definitions (-DGLM_FORCE_INTRINSICS )
88
-
89
- if ((CMAKE_CXX_COMPILER_ID MATCHES "GNU" ) OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang" ))
90
- add_compile_options (-msse3 )
91
- elseif (CMAKE_CXX_COMPILER_ID MATCHES "Intel" )
92
- add_compile_options (/QxSSE3 )
93
- elseif ((CMAKE_CXX_COMPILER_ID MATCHES "MSVC" ) AND NOT CMAKE_CL_64 )
94
- add_compile_options (/arch:SSE2 ) # VC doesn't support SSE3
95
- endif ()
96
- message (STATUS "GLM: SSE3 instruction set" )
97
-
98
- elseif (GLM_TEST_ENABLE_SIMD_SSE2 )
99
- add_definitions (-DGLM_FORCE_INTRINSICS )
100
-
101
- if ((CMAKE_CXX_COMPILER_ID MATCHES "GNU" ) OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang" ))
102
- add_compile_options (-msse2 )
103
- elseif (CMAKE_CXX_COMPILER_ID MATCHES "Intel" )
104
- add_compile_options (/QxSSE2 )
105
- elseif ((CMAKE_CXX_COMPILER_ID MATCHES "MSVC" ) AND NOT CMAKE_CL_64 )
106
- add_compile_options (/arch:SSE2 )
107
- endif ()
108
- message (STATUS "GLM: SSE2 instruction set" )
109
- elseif (GLM_TEST_ENABLE_SIMD_NEON )
110
- add_definitions (-DGLM_FORCE_NEON )
111
- message (STATUS "GLM: ARM NEON instruction set" )
112
- endif ()
113
-
114
- if (GLM_TEST_ENABLE_SIMD_FMA )
115
- add_definitions (-DGLM_FORCE_FMA )
116
- if ((CMAKE_CXX_COMPILER_ID MATCHES "GNU" ) OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang" ))
117
- add_compile_options (-mfma )
118
- endif ()
119
- endif ()
120
- >>>>>>> 5c1da05b (Simd improvement )
121
5
122
6
# Compiler and default options
123
7
@@ -130,15 +14,6 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
130
14
if (NOT GLM_DISABLE_AUTO_DETECTION )
131
15
add_compile_options (-Werror -Weverything )
132
16
endif ()
133
- <<<<<<< HEAD
134
- =======
135
- if (NOT APPLE )
136
- add_compile_options (-Wno-unsafe-buffer-usage ) #this option makes MacOS compilation fail but prevent error on windows
137
- endif ()
138
-
139
- add_compile_options (-Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-c++11-long-long -Wno-padded -Wno-gnu-anonymous-struct -Wno-nested-anon-types )
140
- add_compile_options (-Wno-undefined-reinterpret-cast -Wno-sign-conversion -Wno-unused-variable -Wno-missing-prototypes -Wno-unreachable-code -Wno-missing-variable-declarations -Wno-sign-compare -Wno-global-constructors -Wno-unused-macros -Wno-format-nonliteral -Wno-float-equal )
141
- >>>>>>> 5c1da05b (Simd improvement )
142
17
143
18
elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU" )
144
19
if (NOT GLM_QUIET )
0 commit comments