From 6877a72a6ca81b57bee64814901d6d9e5feded40 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 1 Apr 2024 09:55:48 -0700 Subject: [PATCH] tests/fortran: use fs.copyfile Since the comment saying we need a generic way to do this is a little outdated. --- test cases/fortran/7 generated/meson.build | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/test cases/fortran/7 generated/meson.build b/test cases/fortran/7 generated/meson.build index 8f3b3d45d4d2..257ea1e2207f 100644 --- a/test cases/fortran/7 generated/meson.build +++ b/test cases/fortran/7 generated/meson.build @@ -8,20 +8,7 @@ conf_data = configuration_data() conf_data.set('ONE', 1) conf_data.set('TWO', 2) -mod3_f = custom_target( - 'mod3.f', - input : 'mod3.f90', - output : 'mod3.f90', - # We need a platform agnostic way to do a copy a file, using a custom_target - # and we need to use the @OUTDIR@, not @OUTPUT@ in order to exercise - # https://github.com/mesonbuild/meson/issues/9258 - command : [ - find_program('python', 'python3'), '-c', - 'import sys, shutil; shutil.copy(sys.argv[1], sys.argv[2])', - '@INPUT@', '@OUTDIR@', - ], -) - +mod3_f = import('fs').copyfile('mod3.f90', 'mod3.f90') three = library('mod3', mod3_f) templates_basenames = ['mod2', 'mod1']