octave: better specification of MKL and AMDFFTW libraries (#35935)
This commit is contained in:
parent
ff019f868b
commit
ee1ea1f430
@ -223,14 +223,42 @@ def configure_args(self):
|
||||
|
||||
if "+fftw" in spec:
|
||||
fftw_string = "fftw-api"
|
||||
config_args.extend(
|
||||
[
|
||||
"--with-fftw3-includedir=%s" % spec[fftw_string].prefix.include,
|
||||
"--with-fftw3-libdir=%s" % spec[fftw_string].prefix.lib,
|
||||
"--with-fftw3f-includedir=%s" % spec[fftw_string].prefix.include,
|
||||
"--with-fftw3f-libdir=%s" % spec[fftw_string].prefix.lib,
|
||||
]
|
||||
)
|
||||
if ("^intel-mkl" in spec) or ("^intel-oneapi-mkl" in spec):
|
||||
config_args.extend(
|
||||
[
|
||||
"--with-fftw3={0}".format(spec[fftw_string].libs.ld_flags),
|
||||
"--with-fftw3f={0}".format(spec[fftw_string].libs.ld_flags),
|
||||
]
|
||||
)
|
||||
elif "^amdfftw" in spec:
|
||||
specAmdfftw = spec[fftw_string].token[0]
|
||||
AMD_FFTW3_LIBS = "-lfftw3"
|
||||
AMD_FFTW3F_LIBS = "-lfftw3f"
|
||||
if "+openmp" in specAmdfftw:
|
||||
AMD_FFTW3_LIBS += " -lfftw3_omp"
|
||||
AMD_FFTW3F_LIBS += " -lfftw3f_omp"
|
||||
if "+threads" in specAmdfftw:
|
||||
AMD_FFTW3_LIBS += " -lfftw3_threads"
|
||||
AMD_FFTW3F_LIBS += " -lfftw3f_threads"
|
||||
config_args.extend(
|
||||
[
|
||||
"--with-fftw3=-L{0} {1}".format(
|
||||
spec[fftw_string].libs.directories[0], AMD_FFTW3_LIBS
|
||||
),
|
||||
"--with-fftw3f=-L{0} {1}".format(
|
||||
spec[fftw_string].libs.directories[0], AMD_FFTW3F_LIBS
|
||||
),
|
||||
]
|
||||
)
|
||||
else:
|
||||
config_args.extend(
|
||||
[
|
||||
"--with-fftw3-includedir=%s" % spec[fftw_string].prefix.include,
|
||||
"--with-fftw3-libdir=%s" % spec[fftw_string].prefix.lib,
|
||||
"--with-fftw3f-includedir=%s" % spec[fftw_string].prefix.include,
|
||||
"--with-fftw3f-libdir=%s" % spec[fftw_string].prefix.lib,
|
||||
]
|
||||
)
|
||||
else:
|
||||
config_args.extend(["--without-fftw3", "--without-fftw3f"])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user