From e0fe39b856c198dd4922085375c5d8ac7da48ce2 Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Fri, 3 May 2024 11:23:15 -0500 Subject: [PATCH] * update meson.build file --- meson.build | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index e8fdd60cdca..c2ac0fec232 100644 --- a/meson.build +++ b/meson.build @@ -29,6 +29,16 @@ message('The fc_id is:', fc_id) compile_args = [] link_args = [] +if build_machine.system() == 'windows' + if fc_id == 'gcc' + c_runtime_flag = 'false' + else + c_runtime_flag = 'true' + endif +else + c_runtime_flag = 'false' +endif + # Command line options for gfortran if fc_id == 'gcc' # General options @@ -105,7 +115,7 @@ elif fc_id == 'intel-llvm-cl' endif # add the correct C/C++ CRT runtime on Windows based on profile -if build_machine.system() == 'windows' +if c_runtime_flag == 'true' if get_option('debug') == 'true' compile_args += ['/MTd'] else