Skip to content

Commit 43a7c84

Browse files
committed
numeric literal only for gcc I guess
1 parent 1fc111d commit 43a7c84

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

quaddtype/meson.build

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,21 @@ incdir_numpy = run_command(py,
2323
check : true
2424
).stdout().strip()
2525

26-
# Add OpenMP dependency (optional, for threading)
26+
# OpenMP dependency (optional, for threading)
2727
openmp_dep = dependency('openmp', required: false)
2828
qblas_dep = dependency('qblas', fallback: ['qblas', 'qblas_dep'])
2929
dependencies = [sleef_dep, py_dep, qblas_dep]
3030
if openmp_dep.found()
3131
dependencies += openmp_dep
3232
endif
3333

34-
# compiler flags for QBLAS compatibility
34+
# compiler flags for QBLAS compatibility
3535
if not is_windows
3636
# QBLAS requires extended numeric literals for Q suffix support
37-
add_project_arguments('-fext-numeric-literals', language: 'cpp')
37+
# if compiler supports (usually gcc)
38+
if cpp.has_argument('-fext-numeric-literals')
39+
add_project_arguments('-fext-numeric-literals', language: 'cpp')
40+
endif
3841
endif
3942

4043
# Thread-local storage detection (borrowed from NumPy)

0 commit comments

Comments
 (0)