Msvc: Determine OneAPI_ROOT from fc compiler path (#43131)
If ONEAPI_ROOT is not set as an environment variable, the current approach will raise an error. Instead we can compute the OneAPI_ROOT from the compiler paths like we do with vcvarsall.
This commit is contained in:
parent
3fed320013
commit
ef0bb6fe6b
1 changed files with 1 additions and 1 deletions
|
@ -199,7 +199,7 @@ def __init__(self, *args, **kwargs):
|
|||
# for a fortran compiler
|
||||
if paths[2]:
|
||||
# If this found, it sets all the vars
|
||||
oneapi_root = os.getenv("ONEAPI_ROOT")
|
||||
oneapi_root = os.path.join(self.cc, "../../..")
|
||||
oneapi_root_setvars = os.path.join(oneapi_root, "setvars.bat")
|
||||
oneapi_version_setvars = os.path.join(
|
||||
oneapi_root, "compiler", str(self.ifx_version), "env", "vars.bat"
|
||||
|
|
Loading…
Reference in a new issue