mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-06 22:17:24 +01:00
IDE: parse custom compiler option -FN for default namespaces
git-svn-id: trunk@57801 -
This commit is contained in:
parent
a72feba2c2
commit
65f9818baa
@ -1713,7 +1713,7 @@ begin
|
|||||||
Result:=Evaluator[NamespacesMacroName]
|
Result:=Evaluator[NamespacesMacroName]
|
||||||
else begin
|
else begin
|
||||||
FPCFullVersion:=StrToIntDef(Evaluator['FPC_FULLVERSION'],0);
|
FPCFullVersion:=StrToIntDef(Evaluator['FPC_FULLVERSION'],0);
|
||||||
if FPCFullVersion>30101 then
|
if FPCFullVersion>=30101 then
|
||||||
Result:=Evaluator[NamespacesMacroName];
|
Result:=Evaluator[NamespacesMacroName];
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -3037,7 +3037,7 @@ begin
|
|||||||
'e': Add('e',PChar(@p[1]),fpkValue);
|
'e': Add('e',PChar(@p[1]),fpkValue);
|
||||||
'F':
|
'F':
|
||||||
case p[1] of
|
case p[1] of
|
||||||
'a','f','i','l','o','u': Add('Fa',PChar(@p[2]),fpkMultiValue);
|
'a','f','i','l','N','o','u': Add('F'+p[1],PChar(@p[2]),fpkMultiValue);
|
||||||
'c','C','D','e','E','L','m','M','r','R','U','W','w': Add('F'+p[1],PChar(@p[2]),fpkValue);
|
'c','C','D','e','E','L','m','M','r','R','U','W','w': Add('F'+p[1],PChar(@p[2]),fpkValue);
|
||||||
else AddBooleanFlag(p,2);
|
else AddBooleanFlag(p,2);
|
||||||
end;
|
end;
|
||||||
@ -8006,10 +8006,12 @@ begin
|
|||||||
case p[1] of
|
case p[1] of
|
||||||
'F':
|
'F':
|
||||||
case p[2] of
|
case p[2] of
|
||||||
'u':
|
|
||||||
UnitPath+=';'+copy(Param,4,length(Param));
|
|
||||||
'i':
|
'i':
|
||||||
IncPath+=';'+copy(Param,4,length(Param));
|
IncPath+=';'+copy(Param,4,length(Param));
|
||||||
|
'u':
|
||||||
|
UnitPath+=';'+copy(Param,4,length(Param));
|
||||||
|
'N':
|
||||||
|
Namespaces+=';'+copy(Param,4,length(Param));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
'd':
|
'd':
|
||||||
@ -8048,7 +8050,7 @@ begin
|
|||||||
|
|
||||||
'N':
|
'N':
|
||||||
case p[2] of
|
case p[2] of
|
||||||
'S': Namespaces:=Namespaces+copy(Param,4,length(Param))
|
'S': Namespaces+=';'+copy(Param,4,length(Param))
|
||||||
end;
|
end;
|
||||||
|
|
||||||
'W':
|
'W':
|
||||||
|
|||||||
@ -600,7 +600,7 @@ begin
|
|||||||
writeln(' -e <errormessage>, --error=<error message>');
|
writeln(' -e <errormessage>, --error=<error message>');
|
||||||
writeln(' Change the message of the error directive added to the units.');
|
writeln(' Change the message of the error directive added to the units.');
|
||||||
writeln(' You can add this multiple times to add multiple directives.');
|
writeln(' You can add this multiple times to add multiple directives.');
|
||||||
writeln(' The default error messages are:');
|
writeln(' The default error message is:');
|
||||||
for i:=0 to FClosedSrcError.Count-1 do
|
for i:=0 to FClosedSrcError.Count-1 do
|
||||||
writeln(' ',FClosedSrcError[i]);
|
writeln(' ',FClosedSrcError[i]);
|
||||||
writeln;
|
writeln;
|
||||||
|
|||||||
@ -1807,6 +1807,7 @@ begin
|
|||||||
Add('CHAR' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
Add('CHAR' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||||
Add('CONTINUE' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
Add('CONTINUE' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||||
Add('COPY' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
Add('COPY' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||||
|
Add('DEFAULT' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||||
Add('DOUBLE' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
Add('DOUBLE' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||||
Add('EXIT' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
Add('EXIT' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||||
Add('FALSE' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
Add('FALSE' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||||
@ -1829,6 +1830,7 @@ begin
|
|||||||
Add('SUCC' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
Add('SUCC' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||||
Add('TRUE' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
Add('TRUE' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||||
Add('TYPEINFO' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
Add('TYPEINFO' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||||
|
Add('UNICODESTRING',{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||||
Add('WORD' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
Add('WORD' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||||
Add('WORDBOOL' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
Add('WORDBOOL' ,{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -886,10 +886,10 @@ begin
|
|||||||
Result := Result + ' ' + ConvertSearchPathToCmdLine('-Fl', CurLibraryPath);
|
Result := Result + ' ' + ConvertSearchPathToCmdLine('-Fl', CurLibraryPath);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// library path
|
// namespaces
|
||||||
CurNamespaces:=InheritedOptionStrings[icoNamespaces];
|
CurNamespaces:=InheritedOptionStrings[icoNamespaces];
|
||||||
if CurNamespaces <> '' then
|
if CurNamespaces <> '' then
|
||||||
Result := Result + ' -NS'+CurNamespaces;
|
Result := Result + ' -FN'+CurNamespaces;
|
||||||
|
|
||||||
// object path
|
// object path
|
||||||
CurObjectPath:=InheritedOptionStrings[icoObjectPath];
|
CurObjectPath:=InheritedOptionStrings[icoObjectPath];
|
||||||
@ -3153,7 +3153,7 @@ begin
|
|||||||
// namespaces
|
// namespaces
|
||||||
CurNamespaces:=GetNamespacesParsed(coptParsed);
|
CurNamespaces:=GetNamespacesParsed(coptParsed);
|
||||||
if CurNamespaces<>'' then
|
if CurNamespaces<>'' then
|
||||||
switches := switches +' -NS'+CurNamespaces;
|
switches := switches +' -FN'+CurNamespaces;
|
||||||
|
|
||||||
// object path
|
// object path
|
||||||
CurObjectPath:=GetObjectPath(not (ccloAbsolutePaths in Flags),
|
CurObjectPath:=GetObjectPath(not (ccloAbsolutePaths in Flags),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user