From 0e86258748b712a9074ebd67e2bf98fe7748c73f Mon Sep 17 00:00:00 2001 From: Mat Cross <mathewc@nag.co.uk> Date: Fri, 20 Aug 2021 11:55:18 +0100 Subject: Implemented some missing operation for the NAG Fortran Compiler. --- mesonbuild/compilers/detect.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'mesonbuild/compilers/detect.py') diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py index cd0f252..de1845a 100644 --- a/mesonbuild/compilers/detect.py +++ b/mesonbuild/compilers/detect.py @@ -34,6 +34,7 @@ from ..linkers import ( C2000Linker, C2000DynamicLinker, DLinker, + NAGDynamicLinker, NvidiaHPC_DynamicLinker, PGIDynamicLinker, PGIStaticLinker, @@ -774,9 +775,14 @@ def detect_fortran_compiler(env: 'Environment', for_machine: MachineChoice) -> C exe_wrap, full_version=full_version, linker=linker) if 'NAG Fortran' in err: - linker = guess_nix_linker(env, - compiler, NAGFortranCompiler, for_machine) - return NAGFortranCompiler( + full_version = err.split('\n', 1)[0] + version = full_version.split()[-1] + cls = NAGFortranCompiler + env.coredata.add_lang_args(cls.language, cls, for_machine, env) + linker = NAGDynamicLinker( + compiler, for_machine, cls.LINKER_PREFIX, [], + version=version) + return cls( compiler, version, for_machine, is_cross, info, exe_wrap, full_version=full_version, linker=linker) -- cgit v1.1