pass OPT in environment variable

quote compiler idemake.cfg, if necessary (issue #1437)

git-svn-id: trunk@8162 -
This commit is contained in:
vincents 2005-11-14 23:27:09 +00:00
parent 0f62ce4223
commit 027479d4e4
3 changed files with 7 additions and 4 deletions

View File

@ -355,7 +355,7 @@ begin
ExtraOptions);
if Result<>mrOk then exit;
if ExtraOptions<>'' then
Tool.CmdLineParams:=Tool.CmdLineParams+' OPT="'+ExtraOptions+'"';
Tool.EnvironmentOverrides.Values['OPT'] := ExtraOptions;
// append target OS
if Options.TargetOS<>'' then
Tool.CmdLineParams:=Tool.CmdLineParams+' OS_TARGET='+Options.TargetOS;
@ -431,7 +431,10 @@ begin
if (blfUseMakeIDECfg in Flags) then begin
MakeIDECfgFilename:=GetMakeIDEConfigFilename;
if (FileExists(MakeIDECfgFilename)) then begin
ExtraOptions:='@'+MakeIDECfgFilename;
if pos(' ', MakeIDECfgFilename)>0 then
ExtraOptions:='@"'+MakeIDECfgFilename+'"'
else
ExtraOptions:='@'+MakeIDECfgFilename;
exit;
end;
end;

View File

@ -3955,7 +3955,7 @@ begin
// add include path to config directory
ConfigDir:=AppendPathDelim(GetPrimaryConfigPath);
AddOption('-Fi'+ConfigDir);
AddOption(PrepareCmdLineOption('-Fi'+ConfigDir));
// add target option
// ToDo

View File

@ -38,7 +38,7 @@ unit PkgOptionsDlg;
interface
uses
Classes, SysUtils, FPCAdds, LCLProc, Forms, Controls, Buttons, LResources,
Classes, SysUtils, LCLProc, Forms, Controls, Buttons, LResources,
ExtCtrls, StdCtrls, Spin, Dialogs, PathEditorDlg, IDEProcs, IDEWindowIntf,
LazarusIDEStrConsts, BrokenDependenciesDlg, PackageDefs, PackageSystem,
CompilerOptions;