From 7a15d4c74c48981fe8d635e612aa9a4f3090e6dc Mon Sep 17 00:00:00 2001 From: Waf Project Date: Mon, 18 Mar 2024 23:34:44 +0100 Subject: [PATCH] Add the script path to OneApi Fortran compilers --- waflib/Tools/ifort.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/waflib/Tools/ifort.py b/waflib/Tools/ifort.py index 30230f5c..6b7f2131 100644 --- a/waflib/Tools/ifort.py +++ b/waflib/Tools/ifort.py @@ -137,9 +137,13 @@ def gather_ifort_versions(conf, versions): except OSError: pass else: - batch_file=os.path.join(path,'bin','ifortvars.bat') + batch_file = os.path.join(path, 'bin', 'ifortvars.bat') if os.path.isfile(batch_file): targets[target] = target_compiler(conf, 'intel', arch, version, target, batch_file) + else: + batch_file = os.path.join(path, 'env', 'vars.bat') + if os.path.isfile(batch_file): + targets[target] = target_compiler(conf, 'oneapi', arch, version, target, batch_file) for target,arch in all_ifort_platforms: try: @@ -308,7 +312,11 @@ def get_ifort_versions(self, eval_and_save=True): return dct def _get_prog_names(self, compiler): - if compiler=='intel': + if compiler == 'oneapi': + compiler_name = 'ifx' + linker_name = 'XILINK' + lib_name = 'XILIB' + elif compiler == 'intel': compiler_name = 'ifort' linker_name = 'XILINK' lib_name = 'XILIB'