Skip to content

Commit

Permalink
Explicitly set the compatible tools set priority order on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
langmm committed Feb 20, 2024
1 parent 19b2c4c commit 942d2c8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions yggdrasil/drivers/FortranModelDriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class GFortranCompiler(FortranCompilerBase):
('module-search-path', '-I%s'),
('standard', '-std=%s')])
toolset = 'gnu'
compatible_toolsets = ['msvc', 'llvm']
compatible_toolsets = ['llvm', 'msvc']
default_archiver = 'ar'
# GNU ASAN not currently installed with gfortran on osx
# asan_flags = ['-fsanitize=address']
Expand All @@ -119,8 +119,8 @@ def before_registration(cls, **kwargs):
"""
# Put gnu at end of compatible toolset list on windows so that
# msvc libraries are preferred (Python assumes MSVC)
if platform._is_win and cls.toolset not in cls.compatible_toolsets:
cls.compatible_toolsets.append(cls.toolset)
if platform._is_win:
cls.compatible_toolsets = ['msvc', 'cl', 'llvm']
FortranCompilerBase.before_registration(cls, **kwargs)


Expand Down

0 comments on commit 942d2c8

Please sign in to comment.