Fix loading both icc and icpc at the same time

This commit is contained in:
Waf Project 2023-10-26 17:20:51 +02:00
parent 3306d33352
commit 61ff2ac19c
2 changed files with 7 additions and 7 deletions

View File

@ -23,7 +23,7 @@ def find_icc(conf):
conf.env.INTEL_CLANG_COMPILER = True
conf.env.CC = conf.env.ICXCL
if not conf.env.INTEL_CLANG_COMPILER:
if not conf.env.ICXCL:
cc = conf.find_program(['icx', 'icc', 'ICL'], var='CC')
conf.get_cc_version(cc, icc=True)
@ -31,7 +31,7 @@ def find_icc(conf):
def configure(conf):
conf.find_icc()
if conf.env.INTEL_CLANG_COMPILER and Utils.is_win32:
if conf.env.ICXCL and Utils.is_win32:
conf.find_msvc()
conf.find_program('MT', var='MT')
conf.env.MTFLAGS = ['/nologo']

View File

@ -17,12 +17,12 @@ def find_icpc(conf):
Finds the program icpc, and execute it to ensure it really is icpc
"""
if Utils.is_win32:
conf.find_program(['icx-cl'], var='ICXCL', mandatory=False)
if conf.env.ICXCL:
conf.find_program(['icx-cl'], var='ICPXCL', mandatory=False)
if conf.env.ICPXCL:
conf.env.INTEL_CLANG_COMPILER = True
conf.env.CXX = conf.env.ICXCL
conf.env.CXX = conf.env.ICPXCL
if not conf.env.INTEL_CLANG_COMPILER:
if not conf.env.ICPXCL:
cc = conf.find_program(['icpx', 'icpc', 'ICL'], var='CXX')
conf.get_cc_version(cc, icc=True)
@ -30,7 +30,7 @@ def find_icpc(conf):
def configure(conf):
conf.find_icpc()
if conf.env.INTEL_CLANG_COMPILER and Utils.is_win32:
if conf.env.ICPXCL and Utils.is_win32:
conf.find_msvc()
conf.find_program('MT', var='MT')
conf.env.MTFLAGS = ['/nologo']