libint: add link option for fujitsu compiler (#42233)
Co-authored-by: inada-yoshie <inada.yoshie@fujitsu.com>
This commit is contained in:
parent
8ff7a20320
commit
c218ee50e9
@ -117,6 +117,9 @@ def setup_build_environment(self, env):
|
|||||||
env.set("CFLAGS", self.optflags)
|
env.set("CFLAGS", self.optflags)
|
||||||
env.set("CXXFLAGS", self.optflags)
|
env.set("CXXFLAGS", self.optflags)
|
||||||
|
|
||||||
|
if self.spec.satisfies("%fj"):
|
||||||
|
env.set("LDFLAGS", "--linkfortran")
|
||||||
|
|
||||||
# Change AR to xiar if we compile with Intel and we
|
# Change AR to xiar if we compile with Intel and we
|
||||||
# find the executable
|
# find the executable
|
||||||
if "%intel" in self.spec and which("xiar"):
|
if "%intel" in self.spec and which("xiar"):
|
||||||
@ -238,11 +241,18 @@ def check(self):
|
|||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
with working_dir(os.path.join(self.build_directory, "generated")):
|
with working_dir(os.path.join(self.build_directory, "generated")):
|
||||||
make("install")
|
make("install")
|
||||||
|
if "+fortran" in self.spec:
|
||||||
|
mkdirp(prefix.include)
|
||||||
|
install(join_path("fortran", "*.mod"), prefix.include)
|
||||||
|
|
||||||
def patch(self):
|
def patch(self):
|
||||||
# Use Fortran compiler to link the Fortran example, not the C++
|
# Use Fortran compiler to link the Fortran example, not the C++
|
||||||
# compiler
|
# compiler
|
||||||
if "+fortran" in self.spec:
|
if "+fortran" in self.spec:
|
||||||
filter_file(
|
if not self.spec.satisfies("%fj"):
|
||||||
"$(CXX) $(CXXFLAGS)", "$(FC) $(FCFLAGS)", "export/fortran/Makefile", string=True
|
filter_file(
|
||||||
)
|
"$(CXX) $(CXXFLAGS)",
|
||||||
|
"$(FC) $(FCFLAGS)",
|
||||||
|
"export/fortran/Makefile",
|
||||||
|
string=True,
|
||||||
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user