From 6da992966dd2b5af01abbf102ff1faedaafb7d91 Mon Sep 17 00:00:00 2001 From: Juha Date: Thu, 22 Jun 2023 01:47:59 +0300 Subject: [PATCH] IDE: Remove "Note: passing compiler option -M twice with different values" message, many -M options are allowed. --- packager/packagesystem.pas | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packager/packagesystem.pas b/packager/packagesystem.pas index 019f3ea373..b64b73e183 100644 --- a/packager/packagesystem.pas +++ b/packager/packagesystem.pas @@ -713,8 +713,10 @@ begin Param:=TFPCParamValue(ParsedParams[i]); if fpfValueChanged in Param.Flags then begin Msg:=''; - if Param.Kind in [fpkBoolean,fpkValue] then - Msg:=Format(lisPassingCompilerOptionTwiceWithDifferentValues, [Param.Name]) + if Param.Kind in [fpkBoolean,fpkValue] then begin + if Param.Name<>'M' then // Many -M options are allowed. + Msg:=Format(lisPassingCompilerOptionTwiceWithDifferentValues, [Param.Name]); + end else if Param.Kind=fpkDefine then Msg:=Format(lisPassingCompilerDefineTwiceWithDifferentValues, [Param.Name]); if Msg='' then continue;