Use correct method for selecting compiler names. (#34175)
This commit is contained in:
parent
241a8f6be6
commit
8f5209063d
@ -164,14 +164,13 @@ def set_compiler_options(self, spec):
|
|||||||
if compiler_path:
|
if compiler_path:
|
||||||
compiler_path = compiler_path + "/bin/"
|
compiler_path = compiler_path + "/bin/"
|
||||||
os.environ["PATH"] = ":".join([compiler_path, os.environ["PATH"]])
|
os.environ["PATH"] = ":".join([compiler_path, os.environ["PATH"]])
|
||||||
|
|
||||||
compiler_options = [
|
compiler_options = [
|
||||||
"-c++=%s" % self.compiler.cxx_names[0],
|
"-c++=%s" % os.path.basename(self.compiler.cxx),
|
||||||
"-cc=%s" % self.compiler.cc_names[0],
|
"-cc=%s" % os.path.basename(self.compiler.cc),
|
||||||
]
|
]
|
||||||
|
|
||||||
if "+fortran" in spec and self.compiler.fc:
|
if "+fortran" in spec and self.compiler.fc:
|
||||||
compiler_options.append("-fortran=%s" % self.compiler.fc_names[0])
|
compiler_options.append("-fortran=%s" % os.path.basename(self.compiler.fc))
|
||||||
|
|
||||||
##########
|
##########
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user