mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-03 13:59:35 +01:00
codetools: ParseFPCParameters: case insensitive defines
git-svn-id: trunk@53183 -
This commit is contained in:
parent
bd2ab5c7bc
commit
94d76f9a59
@ -2740,11 +2740,15 @@ const
|
||||
aKind:=fpkValue;
|
||||
end;
|
||||
|
||||
if not (aKind in [fpkUnknown,fpkConfig,fpkNonOption,fpkMultiValue]) then
|
||||
if (aKind in [fpkBoolean,fpkValue,fpkDefine]) then
|
||||
// check for duplicates
|
||||
for i:=0 to ParsedParams.Count-1 do begin
|
||||
Param:=TFPCParamValue(ParsedParams[i]);
|
||||
if (Param.Name<>aName) then continue;
|
||||
if aKind=fpkDefine then begin
|
||||
if CompareText(Param.Name,aName)<>0 then continue;
|
||||
end else begin
|
||||
if (Param.Name<>aName) then continue;
|
||||
end;
|
||||
if (aKind=fpkDefine) <> (Param.Kind=fpkDefine) then continue;
|
||||
// was already set
|
||||
Include(Param.Flags,fpfSetTwice);
|
||||
|
||||
@ -511,6 +511,7 @@ begin
|
||||
t('-Tfoo','T','foo',fpkValue,[]);
|
||||
t('-uMacro','Macro','',fpkDefine,[fpfUnset]);
|
||||
t('-dMacro -uMacro','Macro','',fpkDefine,[fpfUnset,fpfSetTwice,fpfValueChanged]);
|
||||
t('-dmacro -uMACRO','macro','',fpkDefine,[fpfUnset,fpfSetTwice,fpfValueChanged]);
|
||||
t('-Uns-','Us','',fpkBoolean,[fpfUnset]);
|
||||
t('-vwne','ve',FPCParamEnabled,fpkBoolean,[]);
|
||||
t('-vmfoo','vm','foo',fpkMultiValue,[]);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user