Skip to content

Commit

Permalink
arch: fix lookup command for custom compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
mloubout committed Nov 3, 2023
1 parent ea3ff45 commit cf9d7e5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions devito/arch/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,7 @@ def __new__(cls, *args, **kwargs):
obj = super().__new__(cls)
# Keep base to initialize accordingly
obj._base = _base
obj._cpp = _base._cpp

return obj

Expand All @@ -874,10 +875,11 @@ def __init_finalize__(self, **kwargs):
self.ldflags = filter_ordered(self.ldflags + extrald)

def __lookup_cmds__(self):
self.CC = environ.get('CC', 'gcc')
self.CXX = environ.get('CXX', 'g++')
self.MPICC = environ.get('MPICC', 'mpicc')
self.MPICXX = environ.get('MPICXX', 'mpicxx')
self._base.__lookup_cmds__()
self.CC = environ.get('CC', self.CC)
self.CXX = environ.get('CXX', self.CXX)
self.MPICC = environ.get('MPICC', self.MPICC)
self.MPICXX = environ.get('MPICXX', self.MPICXX)


compiler_registry = {
Expand Down

0 comments on commit cf9d7e5

Please sign in to comment.