Update compiler flags in bigdft-core

This commit is contained in:
iamashwin99 2024-01-09 15:21:32 +01:00
parent 569de750d5
commit f7524ed784

View File

@ -59,9 +59,17 @@ def configure_args(self):
python_version = spec["python"].version.up_to(2)
pyyaml = join_path(spec["py-pyyaml"].prefix.lib, f"python{python_version}")
openmp_flag = []
fcflags = []
cflags = []
cxxflags = []
if "+openmp" in spec:
openmp_flag.append(self.compiler.openmp_flag)
fcflags.append(self.compiler.openmp_flag)
if spec.satisfies("+shared"):
fcflags.append("-fPIC")
cflags.append("-fPIC")
cxxflags.append("-fPIC")
linalg = []
if "+scalapack" in spec:
@ -70,7 +78,9 @@ def configure_args(self):
linalg.append(spec["blas"].libs.ld_flags)
args = [
f"FCFLAGS={' '.join(openmp_flag)}",
f"FCFLAGS={' '.join(fcflags)}",
f"CFLAGS={' '.join(cflags)}",
f"CXXFLAGS={' '.join(cxxflags)}",
f"--with-ext-linalg={' '.join(linalg)}",
f"--with-pyyaml-path={pyyaml}",
f"--with-futile-libs={spec['bigdft-futile'].libs.ld_flags}",