Author: faridz
Date: Wed Sep 12 08:54:21 2007
New Revision: 575000
URL: http://svn.apache.org/viewvc?rev=575000&view=rev
Log:
2007-09-12 Farid Zaripov <[EMAIL PROTECTED]>
* build.wsf (build): Select proper Intel compiler if
more than one has installed.
* projectdef.js (InitVSObjects): Get through all installed
intel compilers when detecting path to the ICProjConvertxx
utility.
* utilities.js: Added config variable ICCVER (version of the
Interl C++ compiler).
* msvc-7.0.config: Ditto.
* icc-9.0.config: Ditto.
* icc-9.1.config: Ditto.
* icc-10.0.config: Ditto.
* icc-10.0-x64.config: Ditto.
* icc-9.1-x64.config: New configuration file for
64-bit Intel 9.1 compiler.
Added:
incubator/stdcxx/trunk/etc/config/windows/icc-9.1-x64.config (with props)
Modified:
incubator/stdcxx/trunk/etc/config/windows/build.wsf
incubator/stdcxx/trunk/etc/config/windows/icc-10.0-x64.config
incubator/stdcxx/trunk/etc/config/windows/icc-10.0.config
incubator/stdcxx/trunk/etc/config/windows/icc-9.0.config
incubator/stdcxx/trunk/etc/config/windows/icc-9.1.config
incubator/stdcxx/trunk/etc/config/windows/msvc-7.0.config
incubator/stdcxx/trunk/etc/config/windows/projectdef.js
incubator/stdcxx/trunk/etc/config/windows/utilities.js
Modified: incubator/stdcxx/trunk/etc/config/windows/build.wsf
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/build.wsf?rev=575000&r1=574999&r2=575000&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/build.wsf (original)
+++ incubator/stdcxx/trunk/etc/config/windows/build.wsf Wed Sep 12 08:54:21 2007
@@ -258,6 +258,9 @@
var prop = null;
var propVal;
var oldLogging = null;
+ var iSettings = null;
+ var oldIccIdx = null;
+ var oldPlatIdx = null;
var projectEngine = null;
var events = null;
@@ -332,6 +335,69 @@
prop = null;
}
+ if ("" != ICCVER)
+ {
+ // select proper Intel C++ compiler
+ try
+ {
+ iSettings = dte.GetObject("IntelOptions");
+ }
+ catch (e)
+ {
+ WScript.StdErr.WriteLine(
+ "Build: Intel C++ not installed or installed
incorrectly.");
+ retCode = 1;
+ break;
+ }
+
+ oldIccIdx = iSettings.CurrentCompilerIndex;
+ oldPlatIdx = iSettings.CurrentPlatformIndex;
+ WScript.Echo("Current compiler: " +
+ iSettings.Compiler(oldIccIdx).Name);
+
+ var ICPlatform = "IA32";
+ if ("x64" == PLATFORM)
+ ICPlatform = "EM64T";
+
+ for (var i = 0; i < iSettings.PlatformsCount; ++i)
+ {
+ iSettings.CurrentPlatformIndex = i;
+ if (ICPlatform == iSettings.CurrentPlatformName)
+ break;
+ }
+
+ if (i >= iSettings.PlatformsCount)
+ {
+ WScript.StdErr.WriteLine(
+ "Build: Installed ICC does not support " + PLATFORM + "
platform.");
+ retCode = 1;
+ break;
+ }
+
+ var rx = new RegExp("(^.*C\\+\\+ " + ICCVER + ".*)");
+
+ for (var i = 1; i <= iSettings.CompilersCount; ++i)
+ {
+ var compname = iSettings.Compiler(i).Name;
+ if (null != rx.exec(compname))
+ break;
+ }
+
+ if (i <= iSettings.CompilersCount)
+ {
+ iSettings.CurrentCompilerIndex = i;
+ WScript.Echo("Selected compiler: " +
+ iSettings.Compiler(i).Name);
+ }
+ else
+ {
+ WScript.StdErr.WriteLine(
+ "Build: ICC " + ICCVER + " not found.");
+ retCode = 1;
+ break;
+ }
+ }
+
// save BuildLogging property value
oldLogging = projectEngine.BuildLogging;
projectEngine.BuildLogging = true;
@@ -397,6 +463,16 @@
BuildProject(solutionBuild, ".stdcxx_testlocales");
}
while (false);
+
+ if (null != iSettings)
+ {
+ if (null != oldIccIdx)
+ iSettings.CurrentCompilerIndex = oldIccIdx;
+ if (null != oldPlatIdx)
+ iSettings.CurrentPlatformIndex = oldPlatIdx;
+
+ iSettings = null;
+ }
if (null != oldLogging)
projectEngine.BuildLogging = oldLogging;
Modified: incubator/stdcxx/trunk/etc/config/windows/icc-10.0-x64.config
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/icc-10.0-x64.config?rev=575000&r1=574999&r2=575000&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/icc-10.0-x64.config (original)
+++ incubator/stdcxx/trunk/etc/config/windows/icc-10.0-x64.config Wed Sep 12
08:54:21 2007
@@ -8,3 +8,4 @@
AR=xilib
CLVARSBAT=%ICPP_COMPILER10%\EM64T\Bin\iclvars.bat
ICCCONVERT=ICProjConvert100.exe
+ICCVER=10.0
Modified: incubator/stdcxx/trunk/etc/config/windows/icc-10.0.config
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/icc-10.0.config?rev=575000&r1=574999&r2=575000&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/icc-10.0.config (original)
+++ incubator/stdcxx/trunk/etc/config/windows/icc-10.0.config Wed Sep 12
08:54:21 2007
@@ -8,3 +8,4 @@
AR=xilib
CLVARSBAT=%ICPP_COMPILER10%\IA32\Bin\iclvars.bat
ICCCONVERT=ICProjConvert100.exe
+ICCVER=10.0
Modified: incubator/stdcxx/trunk/etc/config/windows/icc-9.0.config
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/icc-9.0.config?rev=575000&r1=574999&r2=575000&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/icc-9.0.config (original)
+++ incubator/stdcxx/trunk/etc/config/windows/icc-9.0.config Wed Sep 12
08:54:21 2007
@@ -7,3 +7,4 @@
LD=icl
AR=xilib
CLVARSBAT=%ICPP_COMPILER90%\IA32\Bin\iclvars.bat
+ICCVER=9.0
Added: incubator/stdcxx/trunk/etc/config/windows/icc-9.1-x64.config
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/icc-9.1-x64.config?rev=575000&view=auto
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/icc-9.1-x64.config (added)
+++ incubator/stdcxx/trunk/etc/config/windows/icc-9.1-x64.config Wed Sep 12
08:54:21 2007
@@ -0,0 +1,10 @@
+#include msvc-8.0-x64
+DEVENVFLAGS=/useenv
+CPPFLAGS=
+LDFLAGS=
+CONVERT=1
+CXX=icl
+LD=icl
+AR=xilib
+CLVARSBAT=%ICPP_COMPILER91%\EM64T\Bin\iclvars.bat
+ICCVER=9.1
Propchange: incubator/stdcxx/trunk/etc/config/windows/icc-9.1-x64.config
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/stdcxx/trunk/etc/config/windows/icc-9.1-x64.config
------------------------------------------------------------------------------
svn:keywords = Id
Modified: incubator/stdcxx/trunk/etc/config/windows/icc-9.1.config
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/icc-9.1.config?rev=575000&r1=574999&r2=575000&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/icc-9.1.config (original)
+++ incubator/stdcxx/trunk/etc/config/windows/icc-9.1.config Wed Sep 12
08:54:21 2007
@@ -7,3 +7,4 @@
LD=icl
AR=xilib
CLVARSBAT=%ICPP_COMPILER91%\IA32\Bin\iclvars.bat
+ICCVER=9.1
Modified: incubator/stdcxx/trunk/etc/config/windows/msvc-7.0.config
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/msvc-7.0.config?rev=575000&r1=574999&r2=575000&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/msvc-7.0.config (original)
+++ incubator/stdcxx/trunk/etc/config/windows/msvc-7.0.config Wed Sep 12
08:54:21 2007
@@ -31,10 +31,12 @@
// additional flags for the linker
LDFLAGS=
-// CXX, LD, AD used only at configure build step
+// CXX, LD, AR used only at configure build step
// CXX - command invoked to compile the test source file
// LD - command invoked to link the test
// AR - command invoked to make library
+// AS will be used at solution generation build step
+// to initialize Custom Build Rule for compiling .asm files
CXX=cl
LD=cl
AR=lib
@@ -71,3 +73,7 @@
// Path to the ICC iclvars.bat
// Should be empty for MSVC
CLVARSBAT=
+
+// Version of the Intel C++
+// Should be empty for MSVC
+ICCVER=
Modified: incubator/stdcxx/trunk/etc/config/windows/projectdef.js
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/projectdef.js?rev=575000&r1=574999&r2=575000&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/projectdef.js (original)
+++ incubator/stdcxx/trunk/etc/config/windows/projectdef.js Wed Sep 12 08:54:21
2007
@@ -82,11 +82,12 @@
try
{
var isettings = dte.GetObject("IntelOptions");
- var icompiler =
isettings.Compiler(isettings.CurrentCompilerIndex);
- var path = icompiler.ExecutablePath.split(";");
- for (var i = 0; i < path.length; ++i)
- arrPath.push("\"" + path[i] + "\\" + ICConvertTool +
"\"");
- icompiler = null;
+ for (var i = 1; i <= isettings.CompilersCount; ++i)
+ {
+ var paths =
isettings.Compiler(i).ExecutablePath.split(";");
+ for (var j = 0; j < paths.length; ++j)
+ arrPath.push("\"" + isettings.Evaluate(paths[j]) +
"\\" + ICConvertTool + "\"");
+ }
isettings = null;
}
catch (e) {}
Modified: incubator/stdcxx/trunk/etc/config/windows/utilities.js
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/utilities.js?rev=575000&r1=574999&r2=575000&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/utilities.js (original)
+++ incubator/stdcxx/trunk/etc/config/windows/utilities.js Wed Sep 12 08:54:21
2007
@@ -41,6 +41,7 @@
var ICCCONVERT = "";
var PLATFORM = "";
var CLVARSBAT = "";
+var ICCVER="";
// timeout for exec utility in seconds
var EXEC_TIMEOUT = 300;
@@ -172,6 +173,9 @@
case "CLVARSBAT":
CLVARSBAT = arr[2];
break;
+ case "ICCVER":
+ ICCVER = arr[2];
+ break;
}
}
}
@@ -198,6 +202,7 @@
ICCCONVERT = "";
PLATFORM = "";
CLVARSBAT = "";
+ ICCVER = "";
parseConfig(config);
@@ -244,6 +249,7 @@
stream.WriteLine(" ICCCONVERT=" + ICCCONVERT);
stream.WriteLine(" PLATFORM=" + PLATFORM);
stream.WriteLine(" CLVARSBAT=" + CLVARSBAT);
+ stream.WriteLine(" ICCVER=" + ICCVER);
stream.WriteLine("");
}