diff --git a/components/codetools/definetemplates.pas b/components/codetools/definetemplates.pas index b298a653fc..5447a56df0 100644 --- a/components/codetools/definetemplates.pas +++ b/components/codetools/definetemplates.pas @@ -100,6 +100,7 @@ const FPCUnitPathMacro = '$('+FPCUnitPathMacroName+')'; TargetOSMacro = '$('+TargetOSMacroName+')'; TargetCPUMacro = '$('+TargetCPUMacroName+')'; + NamespacesMacro = '$('+NamespacesMacroName+')'; // virtual directories @@ -7874,7 +7875,7 @@ var IncPath: String; Params: TStrings; i: Integer; - Param: String; + Param, Namespaces: String; p: PChar; begin Result:=nil; @@ -7883,6 +7884,7 @@ begin CompilerMode:=''; UnitPath:=''; IncPath:=''; + Namespaces:=''; Params:=TStringList.Create; try SplitCmdLineParams(CmdLine,Params); @@ -7935,6 +7937,11 @@ begin CompilerMode:=copy(Param,3,255); end; + 'N': + case p[2] of + 'S': Namespaces:=Namespaces+copy(Param,4,length(Param)) + end; + 'W': case p[2] of 'p': @@ -7960,10 +7967,12 @@ begin end; if AddPaths then begin if UnitPath<>'' then - AddDefine('UnitPath','UnitPath addition',UnitPathMacroName,UnitPathMacro+UnitPath); + AddDefine('UnitPath','UnitPath addition',UnitPathMacroName,UnitPathMacro+';'+UnitPath); if IncPath<>'' then - AddDefine('IncPath','IncPath addition',IncludePathMacroName,IncludePathMacro+IncPath); + AddDefine('IncPath','IncPath addition',IncludePathMacroName,IncludePathMacro+';'+IncPath); end; + if Namespaces<>'' then + AddDefine('Namespaces','Namespaces addition',NamespacesMacroName,NamespacesMacro+';'+Namespaces); Result.SetDefineOwner(Owner,true); end; diff --git a/ide/compileroptions.pp b/ide/compileroptions.pp index 9f78080190..498bf322fd 100644 --- a/ide/compileroptions.pp +++ b/ide/compileroptions.pp @@ -3170,37 +3170,8 @@ function TBaseCompilerOptions.GetSyntaxOptionsString: string; var tempsw: String; begin - { Syntax Options - -S Syntax options: - -Sc Support operators like C (*=,+=,/= and -=) - -Sa Turn on assertions - -Se Error options. is a combination of the following: - : Compiler halts after the errors (default is 1) - w : Compiler also halts after warnings - n : Compiler also halts after notes - h : Compiler also halts after hints - -Sg Enable LABEL and GOTO (default in -Mtp and -Mdelphi) - -Sh Use ansistrings by default instead of shortstrings - -Si Turn on inlining of procedures/functions declared as "inline" - -Sk Load fpcylix unit - -SI Set interface style to - -SIcom COM compatible interface (default) - -SIcorba CORBA compatible interface - -Sm Support macros like C (global) - -Ss Constructor name must be init (destructor must be done) - -St Allow static keyword in objects - -Sx Enable exception keywords (default in Delphi/ObjFPC modes) - - -M Set language mode to - -Mfpc Free Pascal dialect (default) - -Mobjfpc FPC mode with Object Pascal support - -Mdelphi Delphi 7 compatibility mode - -Mtp TP/BP 7.0 compatibility mode - -Mmacpas Macintosh Pascal dialects compatibility mode - - } if SyntaxMode<>'' then - Result:='-M'+SyntaxMode + Result:='-M'+SyntaxMode // -M Set language mode to else Result:='';