interpreter/compiler: Fortran.run() has always worked

This incorrectly warns that `compiler.run()` is new in 1.5.0 for
Fortran, but that works fine for older versions (noted with 1.2.3). This
makes sense, as FortranCompiler inherits CLikeCompiler
pull/13047/head
Dylan Baker 7 months ago committed by Xavier Claessens
parent d86fce9594
commit e455cb0948
  1. 4
      mesonbuild/interpreter/compiler.py

@ -1,6 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2012-2021 The Meson development team
# Copyright © 2021 Intel Corporation
# Copyright © 2021-2024 Intel Corporation
from __future__ import annotations
import collections
@ -302,7 +302,7 @@ class CompilerHolder(ObjectHolder['Compiler']):
@typed_pos_args('compiler.run', (str, mesonlib.File))
@typed_kwargs('compiler.run', *_COMPILES_KWS)
def run_method(self, args: T.Tuple['mesonlib.FileOrString'], kwargs: 'CompileKW') -> 'RunResult':
if self.compiler.language not in {'d', 'c', 'cpp', 'objc', 'objcpp'}:
if self.compiler.language not in {'d', 'c', 'cpp', 'objc', 'objcpp', 'fortran'}:
FeatureNew.single_use(f'compiler.run for {self.compiler.get_display_language()} language',
'1.5.0', self.subproject, location=self.current_node)
code = args[0]

Loading…
Cancel
Save