Skip to content

Commit

Permalink
only take into account oneapi_c_cxx/oneapi_fortran toolchain options …
Browse files Browse the repository at this point in the history
…if oneapi toolchain option is not set to True or False
  • Loading branch information
boegel committed Dec 24, 2022
1 parent 848293d commit 63099bf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions easybuild/toolchains/compiler/intel_compilers.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class IntelCompilers(IntelIccIfort):
COMPILER_MODULE_NAME = ['intel-compilers']
COMPILER_UNIQUE_OPTS = dict(IntelIccIfort.COMPILER_UNIQUE_OPTS)
COMPILER_UNIQUE_OPTS.update({
'oneapi': (False, "Use oneAPI compilers icx/icpx/ifx instead of classic compilers"),
'oneapi': (None, "Use oneAPI compilers icx/icpx/ifx instead of classic compilers"),
'oneapi_c_cxx': (None, "Use oneAPI C/C++ compilers icx/icpx instead of classic Intel C/C++ compilers "
"(auto-enabled for Intel compilers version 2022.2.0, or newer)"),
'oneapi_fortran': (False, "Use oneAPI Fortran compiler ifx instead of classic Intel Fortran compiler"),
Expand Down Expand Up @@ -76,7 +76,8 @@ def set_variables(self):
if self.options.get('oneapi_c_cxx', None) is None:
self.options['oneapi_c_cxx'] = True

if self.options.get('oneapi', False):
oneapi_tcopt = self.options.get('oneapi')
if oneapi_tcopt:
oneapi = True
self.COMPILER_CXX = 'icpx'
self.COMPILER_CC = 'icx'
Expand All @@ -85,7 +86,7 @@ def set_variables(self):
self.COMPILER_FC = 'ifx'

# if both 'oneapi' and 'oneapi_*' are set, the latter are ignored
else:
elif oneapi_tcopt is None:
if self.options.get('oneapi_c_cxx', False):
oneapi = True
self.COMPILER_CC = 'icx'
Expand Down

0 comments on commit 63099bf

Please sign in to comment.