File tree Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,13 @@ if (X86_64)
70
70
set (GETARCH_FLAGS "${GETARCH_FLAGS} -march=native" )
71
71
endif ()
72
72
73
+ # On x86 no AVX support is available
74
+ if (X86 OR X86_64 )
75
+ if ((DEFINED BINARY AND BINARY EQUAL 32 ) OR ("$CMAKE_SIZEOF_VOID_P}" EQUAL "4" ))
76
+ set (GETARCH_FLAGS "${GETARCH_FLAGS} -DNO_AVX -DNO_AVX2 -DNO_AVX512" )
77
+ endif ()
78
+ endif ()
79
+
73
80
if (INTERFACE64 )
74
81
message (STATUS "Using 64-bit integers." )
75
82
set (GETARCH_FLAGS "${GETARCH_FLAGS} -DUSE64BITINT" )
@@ -148,7 +155,9 @@ else()
148
155
endif ()
149
156
150
157
include ("${PROJECT_SOURCE_DIR} /cmake/prebuild.cmake" )
151
-
158
+ if (DEFINED BINARY )
159
+ message (STATUS "Compiling a ${BINARY} -bit binary." )
160
+ endif ()
152
161
if (NOT DEFINED NEED_PIC )
153
162
set (NEED_PIC 1 )
154
163
endif ()
@@ -165,6 +174,9 @@ include("${PROJECT_SOURCE_DIR}/cmake/cc.cmake")
165
174
if (NOT NOFORTRAN )
166
175
# Fortran Compiler dependent settings
167
176
include ("${PROJECT_SOURCE_DIR} /cmake/fc.cmake" )
177
+ else ()
178
+ set (NO_LAPACK 1 )
179
+ set (NO_LAPACKE 1 )
168
180
endif ()
169
181
170
182
if (BINARY64 )
@@ -190,9 +202,14 @@ if (NEED_PIC)
190
202
endif ()
191
203
192
204
if (DYNAMIC_ARCH )
193
- set (CCOMMON_OPT "${CCOMMON_OPT} -DDYNAMIC_ARCH" )
194
- if (DYNAMIC_OLDER )
195
- set (CCOMMON_OPT "${CCOMMON_OPT} -DDYNAMIC_OLDER" )
205
+ if (X86 OR X86_64 OR ARM64 OR PPC )
206
+ set (CCOMMON_OPT "${CCOMMON_OPT} -DDYNAMIC_ARCH" )
207
+ if (DYNAMIC_OLDER )
208
+ set (CCOMMON_OPT "${CCOMMON_OPT} -DDYNAMIC_OLDER" )
209
+ endif ()
210
+ else ()
211
+ unset (DYNAMIC_ARCH )
212
+ message (STATUS "DYNAMIC_ARCH is not supported on the target architecture, removing" )
196
213
endif ()
197
214
endif ()
198
215
You can’t perform that action at this time.
0 commit comments