You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by fa...@apache.org on 2006/10/06 14:16:33 UTC
svn commit: r453570 [1/3] - /incubator/stdcxx/trunk/etc/config/windows/
Author: faridz
Date: Fri Oct 6 05:16:32 2006
New Revision: 453570
URL: http://svn.apache.org/viewvc?view=rev&rev=453570
Log:
2006-10-06 Farid Zaripov <fa...@kyiv.vdiweb.com>
* icc-9.0.config: New configuration file for ICC-9.0
* icc-9.1.config: New configuration file for ICC-9.1
* msvc-7.0.config: New configuration file for MSVC-7.0
* msvc-7.1.config: New configuration file for MSVC-7.1
* msvc-8.0.config: New configuration file for MSVC-8.0
* msvcex-8.0.config: New config file for MSVCExpress-8.0
* config.js: Removed definitions of the classes: Solution,
SolutionConfiguration, ProjectConfiguration, Project, Filter,
Platform, Configuration, Tool, Compiler, Linker, Librarian,
CustomBuild, PostBuild
* data.js: Removed variables of types which was removed from config.js
(ConfigInfo): New class for storing information about build
configuration
* devenv_consts.js: New file with constant variables for
VisualStudio Automation objects
* filterdef.js: New script file with FilterDef class definition
* projectdef.js: New script file with ProjectDef class definition
* projects.js: New script file with definitions of the projects
for solution
* summary.js (saveSummaryHeaderMulti): Modified according to the new
directory structure
(saveBuildSummaryMulti): Modified according to the new directory
structure, added checking of source folder presence
(saveBuildSummariesFromFolder): Added checking of folder presence
* utilities.js: Removed functions: convertSolutionImpl,
setCompilerEnvironment, compile, compileFiles, link, linkFiles,
preprocess, preprocessFile, buildLibrary, makeLibrary
(createUUID): Get new UUID using the "scriptlet.typelib" COM object
instead of executing uuidgen utility
(getCompilerOpts): New function for parsing the configuration file
of the specified compiler
(getExtension): New function for obtain extension of filename
(changeFileExt): New function for get new filename with specified
extension
(arrayIndexOf): New function for obtain index of item in array
(generateSolution): New function for create the solution file
* configure.wsf (checkHeaders): Removed checking of the wctomb,
wcstombs functions in wchar.h header. Added missing break keyword.
(joinArray): New function to get string from array of strings
(preprocessFile): New function to preprocess the specified file
(compileFiles): New function to compile the specified files
(linkFiles): New function to link targets in specified executable
(makeLibrary): New function to build C++ library file
(logLine): New function to append the line to log file
* generate.wsf: Removed function generateUpdateBatch
(generate): Modified to use the new objects for generate project files
(LogMessage): New function to print message to the stdout and logfile
(generateUpdateBatch): Modified to create separate build batch for
each compiler configuration instead of common build.bat
(createBuildDirs): Modified according to the new directory structure
(readAndCheckArguments): Added checking of the new script parameters:
/LOCALES and /LOCALETESTS
* makelog.wsf: Modified according to the new directory structure
* runall.wsf: Removed functions: inspectProcesses
(runexamples): Get type of buildlog file from compiler
configuration file
(readAndCheckArguments): Added new option COPYRWTESTDLL
(runAllExamples): Modified according to the new directory
structure; added code for copying and deleting the rwtest.dll
if COPYRWTESTDLL option is specified
(runNoChecks): Used exec utility to run example instead of
WshShell::Exec method
(runWithChecks): Used exec utility to run example instead of
WshShell::Exec method
(parseStatus): New function to obtain the exit code of the example
* run_locale_utils.wsf: New script file which implements
functionality of the run_locale_utils.sh script
Added:
incubator/stdcxx/trunk/etc/config/windows/devenv_consts.js (with props)
incubator/stdcxx/trunk/etc/config/windows/filterdef.js (with props)
incubator/stdcxx/trunk/etc/config/windows/icc-9.0.config (with props)
incubator/stdcxx/trunk/etc/config/windows/icc-9.1.config (with props)
incubator/stdcxx/trunk/etc/config/windows/msvc-7.0.config (with props)
incubator/stdcxx/trunk/etc/config/windows/msvc-7.1.config (with props)
incubator/stdcxx/trunk/etc/config/windows/msvc-8.0.config (with props)
incubator/stdcxx/trunk/etc/config/windows/msvcex-8.0.config (with props)
incubator/stdcxx/trunk/etc/config/windows/projectdef.js (with props)
incubator/stdcxx/trunk/etc/config/windows/projects.js (with props)
incubator/stdcxx/trunk/etc/config/windows/run_locale_utils.wsf (with props)
Removed:
incubator/stdcxx/trunk/etc/config/windows/generate.js
incubator/stdcxx/trunk/etc/config/windows/icc-config.js
incubator/stdcxx/trunk/etc/config/windows/icc-config_classes.js
incubator/stdcxx/trunk/etc/config/windows/msvc-config.js
incubator/stdcxx/trunk/etc/config/windows/msvc-config_classes.js
incubator/stdcxx/trunk/etc/config/windows/runexe.wsf
incubator/stdcxx/trunk/etc/config/windows/update.wsf
Modified:
incubator/stdcxx/trunk/etc/config/windows/config.js
incubator/stdcxx/trunk/etc/config/windows/configure.wsf
incubator/stdcxx/trunk/etc/config/windows/data.js
incubator/stdcxx/trunk/etc/config/windows/generate.wsf
incubator/stdcxx/trunk/etc/config/windows/makelog.wsf
incubator/stdcxx/trunk/etc/config/windows/runall.wsf
incubator/stdcxx/trunk/etc/config/windows/summary.js
incubator/stdcxx/trunk/etc/config/windows/utilities.js
Modified: incubator/stdcxx/trunk/etc/config/windows/config.js
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/config.js?view=diff&rev=453570&r1=453569&r2=453570
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/config.js (original)
+++ incubator/stdcxx/trunk/etc/config/windows/config.js Fri Oct 6 05:16:32 2006
@@ -4,6 +4,25 @@
// config.js - base classes for configurations support
//
//////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed
+// with this work for additional information regarding copyright
+// ownership. The ASF licenses this file to you under the Apache
+// License, Version 2.0 (the "License"); you may not use this file
+// except in compliance with the License. You may obtain a copy of
+// the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+// implied. See the License for the specific language governing
+// permissions and limitations under the License.
+//
+//////////////////////////////////////////////////////////////////////
+
//------------------------------------------------
//
@@ -84,284 +103,6 @@
Collection.prototype.get = getElement;
//------------------------------------------------
-// Solution class
-//------------------------------------------------
-
-// Solution .ctor
-function Solution(name)
-{
- this.name = String(name);
- this.configurations = new Collection();
- this.projects = new Collection();
- this.version = "7.10";
- this.formatVersion = "8.00";
-}
-
-// perform shallow cloning of a solution
-function solutionShallowClone()
-{
- return new Solution(this.name);
-}
-
-// Solution class methods
-Solution.prototype.cloneTo = genericCloneTo;
-Solution.prototype.clone = genericClone;
-Solution.prototype.shallowClone = solutionShallowClone;
-
-//------------------------------------------------
-// SolutionConfiguration class
-//------------------------------------------------
-
-// SolutionConfiguration .ctor
-function SolutionConfiguration(name)
-{
- this.name = String(name);
- this.projectConfigurations = new Collection();
-}
-
-// SolutionConfiguration class methods
-SolutionConfiguration.prototype.cloneTo = genericCloneTo;
-SolutionConfiguration.prototype.clone = genericClone;
-
-//------------------------------------------------
-// ProjectConfiguration class
-//------------------------------------------------
-
-// ProjectConfiguration .ctor
-function ProjectConfiguration(projectName, platform, configuration)
-{
- this.projectName = String(projectName);
- this.platform = String(platform);
- this.configuration = String(configuration);
-}
-
-// ProjectConfiguration class methods
-ProjectConfiguration.prototype.cloneTo = genericCloneTo;
-ProjectConfiguration.prototype.clone = genericClone;
-
-//------------------------------------------------
-// Project class
-//------------------------------------------------
-
-// Project .ctor
-function Project(name)
-{
- this.name = String(name);
- this.dependencies = new Collection();
- this.platforms = new Collection();
- this.id = "";
- this.sourceFiles = new Collection();
- this.folder = "";
-}
-
-// creates a shallow copy of a project
-function projectShallowClone()
-{
- var result = new Project(this.name);
- result.id = this.id;
- result.dependencies = this.dependencies.clone();
- result.sourceFiles = this.sourceFiles.clone();
- result.folder = this.folder;
- return result;
-}
-
-// Project class methods
-Project.prototype.cloneTo = genericCloneTo;
-Project.prototype.clone = genericClone;
-Project.prototype.shallowClone = projectShallowClone;
-
-
-// Filter class
-function Filter(name)
-{
- this.name = String(name);
- this.sourceFiles = new Collection();
- this.filter = "";
- this.id = "";
-}
-
-Filter.prototype.cloneTo = genericCloneTo;
-Filter.prototype.clone = genericClone;
-
-//------------------------------------------------
-// Platform class
-//------------------------------------------------
-
-// Platform .ctor
-function Platform(name)
-{
- this.name = String(name);
- this.configurations = new Collection();
-}
-
-// creates a shallow copy of a platform
-function platformShallowClone()
-{
- return new Platform(this.name);
-}
-
-// Platform class methods
-Platform.prototype.cloneTo = genericCloneTo;
-Platform.prototype.clone = genericClone;
-Platform.prototype.shallowClone = platformShallowClone;
-
-//------------------------------------------------
-// Configuration class
-//------------------------------------------------
-
-// possible configuration types are EXE, LIB and DLL
-var configTypeExe = "EXE";
-var configTypeDll = "DLL";
-var configTypeLib = "LIB";
-
-
-// Configuration .ctor
-function Configuration(name, type, outputDir, intermDir)
-{
- this.name = String(name);
- this.type = type;
- this.tools = new Collection();
-
- if (! outputDir || outputDir == "")
- this.outputDir = String(name);
- else
- this.outputDir = String(outputDir);
-
- if (! intermDir || intermDir == "")
- this.intermDir = String(name);
- else
- this.intermDir = String(intermDir);
-}
-
-// creates a shallow copy of Configuration
-function configurationShallowClone()
-{
- return new Configuration(this.name, this.type,
- this.outputDir, this.intermDir);
-}
-
-// Configuration class methods
-Configuration.prototype.cloneTo = genericCloneTo;
-Configuration.prototype.clone = genericClone;
-Configuration.prototype.shallowClone = configurationShallowClone;
-
-//------------------------------------------------
-// Tool class
-//------------------------------------------------
-
-// Tool .ctor
-function Tool(name)
-{
- this.name = String(name);
- this.inputFiles = new Collection();
- this.outputDirectory = "";
- this.intermDirectory = "";
- this.outputFile = "";
-}
-
-// getCommandLine could not be implemented here
-
-// Tool class methods
-Tool.prototype.cloneTo = genericCloneTo;
-Tool.prototype.clone = genericClone;
-
-// Tools names
-var compilerToolName = "compiler";
-var linkerToolName = "linker";
-var librarianToolName = "librarian";
-var customBuildToolName = "custom";
-var postBuildToolName = "postbuild";
-
-//------------------------------------------------
-// Compiler class
-//------------------------------------------------
-
-// Compiler .ctor
-function Compiler()
-{
- this.base = Tool;
- this.base(compilerToolName);
- this.isDebug = false;
- this.defines = new Collection();
- this.includeDirectories = new Collection();
-}
-
-// getPreprocessCommandLine could not be implemented here
-
-// Compiler class methods
-Compiler.prototype.cloneTo = genericCloneTo;
-Compiler.prototype.clone = genericClone;
-
-//------------------------------------------------
-// Linker class
-//------------------------------------------------
-
-// Linker .ctor
-function Linker()
-{
- this.base = Tool;
- this.base(linkerToolName);
- this.libraries = new Collection();
- this.libdirs = new Collection();
-}
-
-// Linker class methods
-Linker.prototype.cloneTo = genericCloneTo;
-Linker.prototype.clone = genericClone;
-
-//------------------------------------------------
-// Librarian class
-//------------------------------------------------
-
-// Librarian .ctor
-function Librarian()
-{
- this.base = Tool;
- this.base(librarianToolName);
- this.libraries = new Collection();
-}
-
-// Librarian class methods
-Librarian.prototype.cloneTo = genericCloneTo;
-Librarian.prototype.clone = genericClone;
-
-//------------------------------------------------
-// CustomBuild class
-//------------------------------------------------
-
-//CustomBuild .ctor
-function CustomBuild()
-{
- this.base = Tool;
- this.base(customBuildToolName);
- this.command = "";
- this.output = "";
- this.dependencies = new Collection();
-}
-
-//CustomBuild class methods
-CustomBuild.prototype.cloneTo = genericCloneTo;
-CustomBuild.prototype.clone = genericClone;
-
-
-//------------------------------------------------
-// PostBuild class
-//------------------------------------------------
-
-//PostBuild .ctor
-function PostBuild()
-{
- this.base = Tool;
- this.base(postBuildToolName);
- this.commands = new Collection();
-}
-
-//PostBuild class methods
-PostBuild.prototype.cloneTo = genericCloneTo;
-PostBuild.prototype.clone = genericClone;
-
-
-//------------------------------------------------
// ItemBuildInfo class
//------------------------------------------------
@@ -384,4 +125,3 @@
// ItemBuildInfo class methods
ItemBuildInfo.prototype.cloneTo = genericCloneTo;
ItemBuildInfo.prototype.clone = genericClone;
-
Modified: incubator/stdcxx/trunk/etc/config/windows/configure.wsf
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/configure.wsf?view=diff&rev=453570&r1=453569&r2=453570
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/configure.wsf (original)
+++ incubator/stdcxx/trunk/etc/config/windows/configure.wsf Fri Oct 6 05:16:32 2006
@@ -1,7 +1,22 @@
<?xml version="1.0" ?><!-- -*- SGML -*- -->
<package>
<comment>
- PrimalCode wizard generated file.
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
</comment>
<job id="configure" prompt="no">
<?job error="false" debug="false" ?>
@@ -40,11 +55,7 @@
<object id="fso" progid="Scripting.FileSystemObject"/>
<object id="WshShell" progid="WScript.Shell"/>
<script language="JScript" src="config.js"/>
- <script language="JScript" src="msvc-config_classes.js"/>
- <script language="JScript" src="icc-config_classes.js"/>
<script language="JScript" src="data.js"/>
- <script language="JScript" src="msvc-config.js"/>
- <script language="JScript" src="icc-config.js"/>
<script language="JScript" src="utilities.js"/>
<script id="configure" language="JScript">
<![CDATA[
@@ -63,13 +74,13 @@
var srcDir = slnDir + "\\etc\\config\\src";
var includeDir = slnDir + "\\include";
var logFileName = "config.log";
-var runWindowMode = 7;
+var runWindowMode = 0;
var timeOut = 30000; // 30 sec
-
-var isShared = true;
+var logFileName = "config.log";
var description = new configure; // run
+// the main function of the script
function configure()
{
if (!WScript.Arguments.Named.Exists("SolutionName")
@@ -82,9 +93,8 @@
}
if (WScript.Arguments.Named.Exists("LogFile"))
- {
logFileName = WScript.Arguments.Named("LogFile");
- }
+
// check that log file is writable
if (!touchFile(logFileName))
{
@@ -93,23 +103,8 @@
+ logFileName);
WScript.Quit(2);
}
-
- try
- {
- // configure activeCompiler, activeLinker and activeLibrarian options
- setCompileEnvironment(WScript.Arguments.Named("SolutionName")
- , WScript.Arguments.Named("ConfigurationName")
- , projectConfigureName, logFileName);
- }
- catch (e)
- {
- WScript.StdErr.WriteLine(
- "Configure: Fatal error: \
- Invalid SolutionName or ConfigurationName.");
- WScript.Quit(2);
- }
- if (WScript.Arguments.Named.Exists("SrcDir"))
+ if (WScript.Arguments.Named.Exists("SrcDir"))
{
srcDir = WScript.Arguments.Named("SrcDir");
if (!fso.FolderExists(srcDir))
@@ -119,10 +114,9 @@
+ srcDir);
WScript.Quit(2);
}
-
}
- if (WScript.Arguments.Named.Exists("IncludeDir"))
+ if (WScript.Arguments.Named.Exists("IncludeDir"))
{
includeDir = WScript.Arguments.Named("IncludeDir");
if (!fso.FolderExists(includeDir))
@@ -133,12 +127,9 @@
WScript.Quit(2);
}
}
-
- if (WScript.Arguments.Named.Exists("OutFile"))
- {
+ if (WScript.Arguments.Named.Exists("OutFile"))
configFile = WScript.Arguments.Named("OutFile");
- }
// check that config file is writable
if (!touchFile(configFile))
@@ -189,9 +180,7 @@
// save previous file
if (fso.FileExists(configFile))
- {
fso.MoveFile(configFile, configFile + ".bak");
- }
var msg = "for " + WScript.Arguments.Named("SolutionName")
+ " - " + WScript.Arguments.Named("ConfigurationName");
@@ -199,28 +188,40 @@
appendLineToOutFile("// Configured " + msg);
- activeCompiler.includeDirectories.add(stageDir);
- activeCompiler.includeDirectories.add(slnDir + "\\include");
- activeCompiler.includeDirectories.add(includeDir);
-
- activeCompiler.outputDirectory = stageDir;
- activeLinker.outputDirectory = stageDir;
- activeCompiler.intermDirectory = stageDir;
- activeLinker.intermDirectory = stageDir;
- if (activeLibrarian)
- {
- activeLibrarian.outputDirectory = stageDir;
- activeLibrarian.intermDirectory = stageDir;
- isShared = false;
- }
+ var logFileNameURI = "file://" + logFileName.replace(/\\/mg, "/");
+
+ getCompilerOpts(WScript.Arguments.Named("SolutionName"));
+
+ var confInfo = configs.get(WScript.Arguments.Named("ConfigurationName"));
+
+ CPPFLAGS += " /GR"; // enable RTTI for tests
+
+ CPPFLAGS += " /M";
+
+ if (!confInfo.mt)
+ CPPFLAGS += NOSTCRT ? "T" : "L";
else
+ CPPFLAGS += confInfo.dll ? "D" : "T";
+
+ if (confInfo.debug)
{
- activeCompiler.defines.add("_RWSHARED");
- activeCompiler.defines.add("_RWBUILD_std");
+ CPPFLAGS += "d /Zi /Gm";
+ LDFLAGS += " /DEBUG";
}
+
+ CPPFLAGS += joinArray(new Array(stageDir, slnDir + "\\include", includeDir), "/I");
- var logFileNameURI = "file://" + logFileName.replace(/\\/mg, "/");
+ var defines = new Array("_RWSTD_USE_CONFIG");
+ if (confInfo.dll)
+ defines.push("_RWSHARED");
+
+ CPPFLAGS += joinArray(defines, "/D");
+
+ LDFLAGS += " /NODEFAULTLIB:libcp /NODEFAULTLIB:libcpd" +
+ " /NODEFAULTLIB:libcpmt /NODEFAULTLIB:libcpmtd" +
+ " /NODEFAULTLIB:msvcprt /NODEFAULTLIB:msvcprtd";
+
// sanity check
if (0 == checkSanity())
{
@@ -402,7 +403,7 @@
// for some strange reasons Intel C++ 9.0 Compiler
// crashes when '*' symbol presents in compiler defines
// or do another strange things
- var useStarInDefines = (currentCfg != icc90SolutionName);
+ var useStarInDefines = (currentCfg != "icc-9.0");
var hdrs = "assert ctype errno float iso646 limits locale math setjmp";
hdrs += " signal stdarg stddef stdio stdlib string time wchar wctype";
@@ -437,54 +438,54 @@
{
WScript.StdOut.WriteLine("\tno (" + defstring +")");
appendLineToOutFile("#define " + defstring);
- // <ciso646> is a bogus header, ignore if missing
- if (hdr != "ciso646")
+ // <ciso646> is a bogus header, ignore if missing
+ if (hdr != "ciso646")
+ {
+ noNewHeaders = true;
+ }
+ }
+ }
+ // check for (deprecated C++) C library headers
+ // or for any headers specified with the .h suffix
+ hdr = hdr_base + ".h";
+ WScript.StdOut.Write("Checking for <" + hdr + ">... ");
+ var sym = hdr_base.toUpperCase();
+ var defstring = "_RWSTD_NO_" + sym + "_H";
+ if (checkHeader(hdr) == 0)
+ {
+ var text = readTextFile(stageDir + "\\hdrcheck.i");
+ var rxInternalHdrName =
+ new RegExp("^[^\"]* (\".*[/\\\\]" + hdr_base + "\\.h\")", "im");
+ var matches = rxInternalHdrName.exec(text);
+
+ // handle headers implemented internally by some compilers
+ // (such as <stdarg.h> with the vanilla EDG eccp)
+ var path = hdr;
+ if (matches != null)
+ {
+ path = matches[1];
+ }
+ WScript.StdOut.WriteLine(" ok (" + path + ")");
+ if (hdr_base == h)
{
- noNewHeaders = true;
+ appendLineToOutFile("#define _RWSTD_ANSI_C_" +
+ sym + "_H " + path);
}
+ //TODO: it looks like original script has a problem with
+ // dependencies here however it looks like it simply drops
+ // unresolved dependencies
+ // else
+ // {
+ appendLineToOutFile("// #define " + defstring +
+ " /* " + path + " */");
+ // }
+ }
+ else
+ {
+ WScript.StdOut.WriteLine("\tno (" + defstring +")");
+ appendLineToOutFile("#define " + defstring);
}
}
- // check for (deprecated C++) C library headers
- // or for any headers specified with the .h suffix
- hdr = hdr_base + ".h";
- WScript.StdOut.Write("Checking for <" + hdr + ">... ");
- var sym = hdr_base.toUpperCase();
- var defstring = "_RWSTD_NO_" + sym + "_H";
- if (checkHeader(hdr) == 0)
- {
- var text = readTextFile(stageDir + "\\hdrcheck.i");
- var rxInternalHdrName =
- new RegExp("^[^\"]* (\".*[/\\\\]" + hdr_base + "\\.h\")", "im");
- var matches = rxInternalHdrName.exec(text);
-
- // handle headers implemented internally by some compilers
- // (such as <stdarg.h> with the vanilla EDG eccp)
- var path = hdr;
- if (matches != null)
- {
- path = matches[1];
- }
- WScript.StdOut.WriteLine(" ok (" + path + ")");
- if (hdr_base == h)
- {
- appendLineToOutFile("#define _RWSTD_ANSI_C_" +
- sym + "_H " + path);
- }
- //TODO: it looks like original script has a problem with
- // dependencies here however it looks like it simply drops
- // unresolved dependencies
- // else
- // {
- appendLineToOutFile("// #define " + defstring +
- " /* " + path + " */");
- // }
- }
- else
- {
- WScript.StdOut.WriteLine("\tno (" + defstring +")");
- appendLineToOutFile("#define " + defstring);
- }
-}
// determine the support for namespaces
WScript.StdOut.Write("Checking for namespaces");
@@ -589,7 +590,7 @@
funs = c90_funs.concat(c99_funs, posix_funs);
lib = "c";
break;
- case "string":
+ case "string":
funs =
useStarInDefines ? "memchr((char*)0,0,0)" : "memchr(0,0,0)";
funs += " memcmp memcpy memmove memset strcat";
@@ -597,12 +598,12 @@
useStarInDefines ? " strchr((char*)0,0)" : " strchr(0,0)";
funs +=
" strcmp strcoll strcpy strcspn strerror strlen";
- funs += " strncat strncmp strncpy"
+ funs += " strncat strncmp strncpy";
funs += useStarInDefines ?
" strpbrk((char*)0,(char*)0)" : " strpbrk(0,0)";
funs +=
useStarInDefines ? " strrchr((char*)0,0)" : " strrchr(0,0)";
- funs += " strspn"
+ funs += " strspn";
funs += useStarInDefines ?
" strstr((char*)0,(char*)0)" : " strstr(0,0)";
funs += " strtok strxfrm";
@@ -615,11 +616,11 @@
"btowc fgetwc fgetws fputwc fputws fwide fwprintf fwscanf";
funs += " getwc getwchar mbrlen mbrtowc mbsinit mbsrtowcs putwc";
funs += " putwchar swprintf swscanf ungetwc vfwprintf vswprintf";
- funs += " vwprintf vwscanf wcrtomb wcscat"
+ funs += " vwprintf vwscanf wcrtomb wcscat";
funs +=
useStarInDefines ? " wcschr((wchar_t*)0,0)" : " wcschr(t,0)";
funs += " wcscmp wcscoll wcscpy wcscspn wcsftime wcslen wcsncat";
- funs += " wcsncmp wcsncpy"
+ funs += " wcsncmp wcsncpy";
funs += useStarInDefines ?
" wcspbrk((wchar_t*)0,(wchar_t*)0)" : " wcspbrk(t,0)";
funs += useStarInDefines ?
@@ -630,8 +631,8 @@
funs +=
" wcstod wcstod wcstof wcstok";
funs +=
- " wcstol wcstold wcstoll wcstombs wcstoul wcstoull wcsxfrm";
- funs += " wctob wctomb"
+ " wcstol wcstold wcstoll wcstoul wcstoull wcsxfrm";
+ funs += " wctob";
funs += useStarInDefines ?
" wmemchr((wchar_t*)0,0,0)" : " wmemchr(t,0,0)";
funs += " wmemcmp wmemcpy";
@@ -639,13 +640,14 @@
funs = funs.split(" ");
lib = "c";
break;
- case "wctype":
+ case "wctype":
// 7.15 of ISO/IEC 9899:1990/Amendment 1:1995
- funs += "iswalpha iswalnum iswcntrl iswdigit iswgraph iswlower";
+ funs = "iswalpha iswalnum iswcntrl iswdigit iswgraph iswlower";
funs += " iswprint iswpunct iswspace iswupper iswxdigit wctype";
funs += " iswctype towlower towupper wctrans towctrans";
funs = funs.split(" ");
lib = "c";
+ break;
default:
continue;
}
@@ -795,10 +797,8 @@
{
continue; //not a library file
}
- var outLibName = file.Name.replace(/\.cpp/i,
- isShared ? ".dll" : ".lib");
- if (makeLibrary(srcDir + "\\" + file.Name, stageDir
- , outLibName, isShared) != 0)
+ var outLibName = file.Name.replace(/\.cpp/i, ".lib");
+ if (makeLibrary(srcDir + "\\" + file.Name, outLibName) != 0)
{
WScript.StdErr.WriteLine(
"Configure: Fatal error: Failed to build library "
@@ -903,8 +903,7 @@
{
// remove first "./" and replace $(LIBSUFFIX) with .lib
modules += " " + ldopts[1].replace(/^\.\//,
- activeCompiler.outputDirectory +
- "\\").replace(/\$\(LIBSUFFIX\)/, ".lib");
+ stageDir + "\\").replace(/\$\(LIBSUFFIX\)/, ".lib");
}
var exeFile = base + ".exe";
var fullExeName = fileBase + ".exe";
@@ -1032,8 +1031,102 @@
}
return true;
}
+
+// returns string contains quoted all array items prefixed
+// by prefix and delimited with space
+function joinArray(arr, prefix)
+{
+ var res = "";
+ for (var i = 0; i < arr.length; ++i)
+ res += " " + prefix + "\"" + arr[i] + "\"";
+ return res;
+}
+
+// performs preprocessing the source file
+// src - source file to preprocess
+// preprocFile - preprocessed file
+function preprocessFile(src, preprocFile)
+{
+ var command = CXX + " /E \"" + src + "\"";
+
+ var message = "Preprocessing with command \"" + command + "\"";
+ logLine(message);
+ return WshShell.Run("cmd /c \"" + command +"\" > "
+ + preprocFile + " 2>> " + logFileName, runWindowMode, true);
+}
+
+// performs compilation of the the source files
+// src - string with source file names delimited by space
+// defines - additional defines (string or array of strings)
+function compileFiles(srcs, defines)
+{
+ var srcsArr = srcs.split(" ");
+
+ if (typeof(defines) == "string")
+ defines = new Array(defines);
+
+ var command = CXX + " /c /EHsc /GS " + CPPFLAGS +
+ " /Fo\"" + stageDir + "\\\\\"" +
+ " /Fd\"" + stageDir + "\\" +
+ changeFileExt(getFileName(srcsArr[0]), "pdb") + "\"";
+
+ if (defines instanceof Array)
+ command += joinArray(defines, "/D")
+
+ command += joinArray(srcs.split(" "), "");
+
+ var message = "Compiling with command \"" + command + "\"";
+ logLine(message);
+ return WshShell.Run("cmd /c \"" + command +"\" >> " +
+ logFileName + " 2>&1", runWindowMode, true);
+}
+
+// performs linking of the files
+// srcs - string with object file names and libraries delimited by space
+// outName - filename of the resulting file
+function linkFiles(srcs, outName)
+{
+ var command = LD + " ";
+
+ command += joinArray(srcs.split(" "), "");
+
+ command += " /Fe\"" + stageDir + "\\" + outName + "\"" +
+ " /link " + LDFLAGS;
+
+ var message = "Linking with command \"" + command + "\"";
+ logLine(message);
+ return WshShell.Run("cmd /c \"" + command +"\" >> "
+ + logFileName + " 2>&1", runWindowMode, true);
+}
+
+// performs compilation of the source files to the library file
+// src - string with source file names delimited by space
+// outFile - filename of the library file
+function makeLibrary(srcFiles, outFile)
+{
+ var ret = compileFiles(srcFiles);
+ if (ret != 0)
+ return ret;
+
+ var objNames = srcFiles.replace(/(?:[\S]+[/\\\\])?([^/\\\\]+\.)cpp/gi,
+ stageDir + "/$1obj");
+
+ var command = AR + "/OUT:\"" + stageDir + "\\" + outFile + "\"" +
+ joinArray(objNames.split(" "), "");
+ var message = "Making library with command \"" + command + "\"";
+ logLine(message);
+ return WshShell.Run("cmd /c \"" + command +"\" >> "
+ + logFileName + " 2>&1", runWindowMode, true);
+}
+
+// append line to the log file
+function logLine(line)
+{
+ var stream = fso.OpenTextFile(logFileName, 8, true, 0);
+ stream.WriteLine(line);
+ stream.Close();
+}
]]>
</script>
</job>
</package>
-
Modified: incubator/stdcxx/trunk/etc/config/windows/data.js
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/data.js?view=diff&rev=453570&r1=453569&r2=453570
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/data.js (original)
+++ incubator/stdcxx/trunk/etc/config/windows/data.js Fri Oct 6 05:16:32 2006
@@ -1,14 +1,42 @@
//
// $Id$
//
-// file should be included after base_config_classes
+//////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed
+// with this work for additional information regarding copyright
+// ownership. The ASF licenses this file to you under the Apache
+// License, Version 2.0 (the "License"); you may not use this file
+// except in compliance with the License. You may obtain a copy of
+// the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+// implied. See the License for the specific language governing
+// permissions and limitations under the License.
+//
+//////////////////////////////////////////////////////////////////////
// base configuration settings
//------------------------------------------------
-// global object storing all configurations
+// object storing info about configuration
//------------------------------------------------
-var configurations = new Collection();
+
+function ConfigInfo(debug, mt, dll, out)
+{
+ this.debug = debug;
+ this.mt = mt;
+ this.dll = dll;
+ this.out = out;
+}
+
+// platform names
+var platformWin32Name = "Win32";
// configuration names
var confDebugStaticName = "11s Debug Static";
@@ -30,822 +58,30 @@
var confMTDebugDllOut = "15d";
var confMTReleaseDllOut = "12d";
-// map between short and long configuration names
-var configsShortToLong = new Collection();
-configsShortToLong.add(confDebugStaticOut, confDebugStaticName);
-configsShortToLong.add(confReleaseStaticOut, confReleaseStaticName);
-configsShortToLong.add(confMTDebugStaticOut, confMTDebugStaticName);
-configsShortToLong.add(confMTReleaseStaticOut, confMTReleaseStaticName);
-configsShortToLong.add(confDebugDllOut, confDebugDllName);
-configsShortToLong.add(confReleaseDllOut, confReleaseDllName);
-configsShortToLong.add(confMTDebugDllOut, confMTDebugDllName);
-configsShortToLong.add(confMTReleaseDllOut, confMTReleaseDllName);
-
-// platform names
-var platformWin32Name = "Win32";
-
-// projects configurations
-
-///////////////////////////////////////////////////////////////////
-// Configure project
-var projectConfigureName = ".configure";
-
-var projectConfConfigureDebugStatic =
- new ProjectConfiguration(projectConfigureName, platformWin32Name
- , confDebugStaticName);
-
-var projectConfConfigureReleaseStatic =
- new ProjectConfiguration(projectConfigureName, platformWin32Name
- , confReleaseStaticName);
-
-var projectConfConfigureMTDebugStatic =
- new ProjectConfiguration(projectConfigureName, platformWin32Name
- , confMTDebugStaticName);
-
-var projectConfConfigureMTReleaseStatic =
- new ProjectConfiguration(projectConfigureName, platformWin32Name
- , confMTReleaseStaticName);
-
-var projectConfConfigureDebugDll =
- new ProjectConfiguration(projectConfigureName, platformWin32Name
- , confDebugDllName);
-
-var projectConfConfigureReleaseDll =
- new ProjectConfiguration(projectConfigureName, platformWin32Name
- , confReleaseDllName);
-
-var projectConfConfigureMTDebugDll =
- new ProjectConfiguration(projectConfigureName, platformWin32Name
- , confMTDebugDllName);
-
-var projectConfConfigureMTReleaseDll =
- new ProjectConfiguration(projectConfigureName, platformWin32Name
- , confMTReleaseDllName);
-
-///////////////////////////////////////////////////////////////////
-// Examples template project
-var projectExamplesName = "Examples";
-
-var projectConfExamplesDebugStatic =
- new ProjectConfiguration(projectExamplesName, platformWin32Name
- , confDebugStaticName);
-
-var projectConfExamplesReleaseStatic =
- new ProjectConfiguration(projectExamplesName, platformWin32Name
- , confReleaseStaticName);
-
-var projectConfExamplesMTDebugStatic =
- new ProjectConfiguration(projectExamplesName, platformWin32Name
- , confMTDebugStaticName);
-
-var projectConfExamplesMTReleaseStatic =
- new ProjectConfiguration(projectExamplesName, platformWin32Name
- , confMTReleaseStaticName);
-
-var projectConfExamplesDebugDll =
- new ProjectConfiguration(projectExamplesName, platformWin32Name
- , confDebugDllName);
-
-var projectConfExamplesReleaseDll =
- new ProjectConfiguration(projectExamplesName, platformWin32Name
- , confReleaseDllName);
-
-var projectConfExamplesMTDebugDll =
- new ProjectConfiguration(projectExamplesName, platformWin32Name
- , confMTDebugDllName);
-
-var projectConfExamplesMTReleaseDll =
- new ProjectConfiguration(projectExamplesName, platformWin32Name
- , confMTReleaseDllName);
-
-
-///////////////////////////////////////////////////////////////////
-// Tests template project
-var projectTestsName = "Tests";
-
-var projectConfTestsDebugStatic =
- new ProjectConfiguration(projectTestsName, platformWin32Name
- , confDebugStaticName);
-
-var projectConfTestsReleaseStatic =
- new ProjectConfiguration(projectTestsName, platformWin32Name
- , confReleaseStaticName);
-
-var projectConfTestsMTDebugStatic =
- new ProjectConfiguration(projectTestsName, platformWin32Name
- , confMTDebugStaticName);
-
-var projectConfTestsMTReleaseStatic =
- new ProjectConfiguration(projectTestsName, platformWin32Name
- , confMTReleaseStaticName);
-
-var projectConfTestsDebugDll =
- new ProjectConfiguration(projectTestsName, platformWin32Name
- , confDebugDllName);
-
-var projectConfTestsReleaseDll =
- new ProjectConfiguration(projectTestsName, platformWin32Name
- , confReleaseDllName);
-
-var projectConfTestsMTDebugDll =
- new ProjectConfiguration(projectTestsName, platformWin32Name
- , confMTDebugDllName);
-
-var projectConfTestsMTReleaseDll =
- new ProjectConfiguration(projectTestsName, platformWin32Name
- , confMTReleaseDllName);
-
-///////////////////////////////////////////////////////////////////
-// rwtest project
-var projectRwTestName = ".rwtest";
-
-var projectConfRwTestDebugStatic =
- new ProjectConfiguration(projectRwTestName, platformWin32Name
- , confDebugStaticName);
-
-var projectConfRwTestReleaseStatic =
- new ProjectConfiguration(projectRwTestName, platformWin32Name
- , confReleaseStaticName);
-
-var projectConfRwTestMTDebugStatic =
- new ProjectConfiguration(projectRwTestName, platformWin32Name
- , confMTDebugStaticName);
-
-var projectConfRwTestMTReleaseStatic =
- new ProjectConfiguration(projectRwTestName, platformWin32Name
- , confMTReleaseStaticName);
-
-var projectConfRwTestDebugDll =
- new ProjectConfiguration(projectRwTestName, platformWin32Name
- , confDebugDllName);
-
-var projectConfRwTestReleaseDll =
- new ProjectConfiguration(projectRwTestName, platformWin32Name
- , confReleaseDllName);
-
-var projectConfRwTestMTDebugDll =
- new ProjectConfiguration(projectRwTestName, platformWin32Name
- , confMTDebugDllName);
-
-var projectConfRwTestMTReleaseDll =
- new ProjectConfiguration(projectRwTestName, platformWin32Name
- , confMTReleaseDllName);
-
-
-///////////////////////////////////////////////////////////////////
-// run_examples project
-var projectRunExamplesName = ".stdlib_examples";
-
-var projectConfRunExamplesDebugStatic =
- new ProjectConfiguration(projectRunExamplesName, platformWin32Name
- , confDebugStaticName);
-
-var projectConfRunExamplesReleaseStatic =
- new ProjectConfiguration(projectRunExamplesName, platformWin32Name
- , confReleaseStaticName);
-
-var projectConfRunExamplesMTDebugStatic =
- new ProjectConfiguration(projectRunExamplesName, platformWin32Name
- , confMTDebugStaticName);
-
-var projectConfRunExamplesMTReleaseStatic =
- new ProjectConfiguration(projectRunExamplesName, platformWin32Name
- , confMTReleaseStaticName);
-
-var projectConfRunExamplesDebugDll =
- new ProjectConfiguration(projectRunExamplesName, platformWin32Name
- , confDebugDllName);
-
-var projectConfRunExamplesReleaseDll =
- new ProjectConfiguration(projectRunExamplesName, platformWin32Name
- , confReleaseDllName);
-
-var projectConfRunExamplesMTDebugDll =
- new ProjectConfiguration(projectRunExamplesName, platformWin32Name
- , confMTDebugDllName);
-
-var projectConfRunExamplesMTReleaseDll =
- new ProjectConfiguration(projectRunExamplesName, platformWin32Name
- , confMTReleaseDllName);
-
-///////////////////////////////////////////////////////////////////
-// run_tests project
-var projectRunTestsName = ".stdlib_tests";
-
-var projectConfRunTestsDebugStatic =
- new ProjectConfiguration(projectRunTestsName, platformWin32Name
- , confDebugStaticName);
-
-var projectConfRunTestsReleaseStatic =
- new ProjectConfiguration(projectRunTestsName, platformWin32Name
- , confReleaseStaticName);
-
-var projectConfRunTestsMTDebugStatic =
- new ProjectConfiguration(projectRunTestsName, platformWin32Name
- , confMTDebugStaticName);
-
-var projectConfRunTestsMTReleaseStatic =
- new ProjectConfiguration(projectRunTestsName, platformWin32Name
- , confMTReleaseStaticName);
-
-var projectConfRunTestsDebugDll =
- new ProjectConfiguration(projectRunTestsName, platformWin32Name
- , confDebugDllName);
-
-var projectConfRunTestsReleaseDll =
- new ProjectConfiguration(projectRunTestsName, platformWin32Name
- , confReleaseDllName);
-
-var projectConfRunTestsMTDebugDll =
- new ProjectConfiguration(projectRunTestsName, platformWin32Name
- , confMTDebugDllName);
-
-var projectConfRunTestsMTReleaseDll =
- new ProjectConfiguration(projectRunTestsName, platformWin32Name
- , confMTReleaseDllName);
-
-////////////////////////////////////////////////////////////////////////
-// solution configurations
-
-// debug static configuration
-var solutionConfDebugStatic =
- new SolutionConfiguration(confDebugStaticName);
-
-solutionConfDebugStatic.projectConfigurations.add(
- projectConfConfigureDebugStatic.projectName,
- projectConfConfigureDebugStatic);
-
-solutionConfDebugStatic.projectConfigurations.add(
- projectConfExamplesDebugStatic.projectName,
- projectConfExamplesDebugStatic);
-
-solutionConfDebugStatic.projectConfigurations.add(
- projectConfRwTestDebugStatic.projectName,
- projectConfRwTestDebugStatic);
-
-solutionConfDebugStatic.projectConfigurations.add(
- projectConfTestsDebugStatic.projectName,
- projectConfTestsDebugStatic);
-
-solutionConfDebugStatic.projectConfigurations.add(
- projectConfRunExamplesDebugStatic.projectName,
- projectConfRunExamplesDebugStatic);
-
-solutionConfDebugStatic.projectConfigurations.add(
- projectConfRunTestsDebugStatic.projectName,
- projectConfRunTestsDebugStatic);
-
-
-// release static configuration
-var solutionConfReleaseStatic =
- new SolutionConfiguration(confReleaseStaticName);
-
-solutionConfReleaseStatic.projectConfigurations.add(
- projectConfConfigureReleaseStatic.projectName,
- projectConfConfigureReleaseStatic);
-
-solutionConfReleaseStatic.projectConfigurations.add(
- projectConfExamplesReleaseStatic.projectName,
- projectConfExamplesReleaseStatic);
-
-solutionConfReleaseStatic.projectConfigurations.add(
- projectConfRwTestReleaseStatic.projectName,
- projectConfRwTestReleaseStatic);
-
-solutionConfReleaseStatic.projectConfigurations.add(
- projectConfTestsReleaseStatic.projectName,
- projectConfTestsReleaseStatic);
-
-solutionConfReleaseStatic.projectConfigurations.add(
- projectConfRunExamplesReleaseStatic.projectName,
- projectConfRunExamplesReleaseStatic);
-
-solutionConfReleaseStatic.projectConfigurations.add(
- projectConfRunTestsReleaseStatic.projectName,
- projectConfRunTestsReleaseStatic);
-
-// debug multi-threaded static configuration
-var solutionConfMTDebugStatic =
- new SolutionConfiguration(confMTDebugStaticName);
-
-solutionConfMTDebugStatic.projectConfigurations.add(
- projectConfConfigureMTDebugStatic.projectName,
- projectConfConfigureMTDebugStatic);
-
-solutionConfMTDebugStatic.projectConfigurations.add(
- projectConfExamplesMTDebugStatic.projectName,
- projectConfExamplesMTDebugStatic);
-
-solutionConfMTDebugStatic.projectConfigurations.add(
- projectConfRwTestMTDebugStatic.projectName,
- projectConfRwTestMTDebugStatic);
-
-solutionConfMTDebugStatic.projectConfigurations.add(
- projectConfTestsMTDebugStatic.projectName,
- projectConfTestsMTDebugStatic);
-
-solutionConfMTDebugStatic.projectConfigurations.add(
- projectConfRunExamplesMTDebugStatic.projectName,
- projectConfRunExamplesMTDebugStatic);
-
-solutionConfMTDebugStatic.projectConfigurations.add(
- projectConfRunTestsMTDebugStatic.projectName,
- projectConfRunTestsMTDebugStatic);
-
-// release multi-threaded static configuration
-var solutionConfMTReleaseStatic =
- new SolutionConfiguration(confMTReleaseStaticName);
-
-solutionConfMTReleaseStatic.projectConfigurations.add(
- projectConfConfigureMTReleaseStatic.projectName,
- projectConfConfigureMTReleaseStatic);
-
-solutionConfMTReleaseStatic.projectConfigurations.add(
- projectConfExamplesMTReleaseStatic.projectName,
- projectConfExamplesMTReleaseStatic);
-
-solutionConfMTReleaseStatic.projectConfigurations.add(
- projectConfRwTestMTReleaseStatic.projectName,
- projectConfRwTestMTReleaseStatic);
-
-solutionConfMTReleaseStatic.projectConfigurations.add(
- projectConfTestsMTReleaseStatic.projectName,
- projectConfTestsMTReleaseStatic);
-
-solutionConfMTReleaseStatic.projectConfigurations.add(
- projectConfRunExamplesMTReleaseStatic.projectName,
- projectConfRunExamplesMTReleaseStatic);
-
-solutionConfMTReleaseStatic.projectConfigurations.add(
- projectConfRunTestsMTReleaseStatic.projectName,
- projectConfRunTestsMTReleaseStatic);
-
-// debug dll configuration
-var solutionConfDebugDll =
- new SolutionConfiguration(confDebugDllName);
-
-solutionConfDebugDll.projectConfigurations.add(
- projectConfConfigureDebugDll.projectName,
- projectConfConfigureDebugDll);
-
-solutionConfDebugDll.projectConfigurations.add(
- projectConfExamplesDebugDll.projectName,
- projectConfExamplesDebugDll);
-
-solutionConfDebugDll.projectConfigurations.add(
- projectConfRwTestDebugDll.projectName,
- projectConfRwTestDebugDll);
-
-solutionConfDebugDll.projectConfigurations.add(
- projectConfTestsDebugDll.projectName,
- projectConfTestsDebugDll);
-
-solutionConfDebugDll.projectConfigurations.add(
- projectConfRunExamplesDebugDll.projectName,
- projectConfRunExamplesDebugDll);
-
-solutionConfDebugDll.projectConfigurations.add(
- projectConfRunTestsDebugDll.projectName,
- projectConfRunTestsDebugDll);
-
-// release dll configuration
-var solutionConfReleaseDll =
- new SolutionConfiguration(confReleaseDllName);
-
-solutionConfReleaseDll.projectConfigurations.add(
- projectConfConfigureReleaseDll.projectName,
- projectConfConfigureReleaseDll);
-
-solutionConfReleaseDll.projectConfigurations.add(
- projectConfExamplesReleaseDll.projectName,
- projectConfExamplesReleaseDll);
-
-solutionConfReleaseDll.projectConfigurations.add(
- projectConfRwTestReleaseDll.projectName,
- projectConfRwTestReleaseDll);
-
-solutionConfReleaseDll.projectConfigurations.add(
- projectConfTestsReleaseDll.projectName,
- projectConfTestsReleaseDll);
-
-solutionConfReleaseDll.projectConfigurations.add(
- projectConfRunExamplesReleaseDll.projectName,
- projectConfRunExamplesReleaseDll);
-
-solutionConfReleaseDll.projectConfigurations.add(
- projectConfRunTestsReleaseDll.projectName,
- projectConfRunTestsReleaseDll);
-
-
-// debug multi-threaded dll configuration
-var solutionConfMTDebugDll =
- new SolutionConfiguration(confMTDebugDllName);
-
-solutionConfMTDebugDll.projectConfigurations.add(
- projectConfConfigureMTDebugDll.projectName,
- projectConfConfigureMTDebugDll);
-
-solutionConfMTDebugDll.projectConfigurations.add(
- projectConfExamplesMTDebugDll.projectName,
- projectConfExamplesMTDebugDll);
-
-solutionConfMTDebugDll.projectConfigurations.add(
- projectConfRwTestMTDebugDll.projectName,
- projectConfRwTestMTDebugDll);
-
-solutionConfMTDebugDll.projectConfigurations.add(
- projectConfTestsMTDebugDll.projectName,
- projectConfTestsMTDebugDll);
-
-solutionConfMTDebugDll.projectConfigurations.add(
- projectConfRunExamplesMTDebugDll.projectName,
- projectConfRunExamplesMTDebugDll);
-
-solutionConfMTDebugDll.projectConfigurations.add(
- projectConfRunTestsMTDebugDll.projectName,
- projectConfRunTestsMTDebugDll);
-
-// release multi-threaded dll configuration
-var solutionConfMTReleaseDll =
- new SolutionConfiguration(confMTReleaseDllName);
-
-solutionConfMTReleaseDll.projectConfigurations.add(
- projectConfConfigureMTReleaseDll.projectName,
- projectConfConfigureMTReleaseDll);
-
-solutionConfMTReleaseDll.projectConfigurations.add(
- projectConfExamplesMTReleaseDll.projectName,
- projectConfExamplesMTReleaseDll);
-
-solutionConfMTReleaseDll.projectConfigurations.add(
- projectConfRwTestMTReleaseDll.projectName,
- projectConfRwTestMTReleaseDll);
-
-solutionConfMTReleaseDll.projectConfigurations.add(
- projectConfTestsMTReleaseDll.projectName,
- projectConfTestsMTReleaseDll);
-
-solutionConfMTReleaseDll.projectConfigurations.add(
- projectConfRunExamplesMTReleaseDll.projectName,
- projectConfRunExamplesMTReleaseDll);
-
-solutionConfMTReleaseDll.projectConfigurations.add(
- projectConfRunTestsMTReleaseDll.projectName,
- projectConfRunTestsMTReleaseDll);
-
-//////////////////////////////////////////////////////////////////
-// base solution
-var solution = new Solution("Solution");
-
-solution.configurations.add(
- solutionConfDebugStatic.name, solutionConfDebugStatic);
-
-solution.configurations.add(
- solutionConfReleaseStatic.name, solutionConfReleaseStatic);
-
-solution.configurations.add(
- solutionConfMTDebugStatic.name, solutionConfMTDebugStatic);
-
-solution.configurations.add(
- solutionConfMTReleaseStatic.name, solutionConfMTReleaseStatic);
-
-solution.configurations.add(
- solutionConfDebugDll.name, solutionConfDebugDll);
-
-solution.configurations.add(
- solutionConfReleaseDll.name, solutionConfReleaseDll);
-
-solution.configurations.add(
- solutionConfMTDebugDll.name, solutionConfMTDebugDll);
-
-solution.configurations.add(
- solutionConfMTReleaseDll.name, solutionConfMTReleaseDll);
-
-/////////////////////////////////////////////////////////////////
-// projects
-var projectConfigure = new Project(projectConfigureName);
-solution.projects.add(projectConfigure.name, projectConfigure);
-
-var projectExamples = new Project(projectExamplesName);
-solution.projects.add(projectExamples.name, projectExamples);
-
-var projectRwTest = new Project(projectRwTestName);
-projectRwTest.dependencies.add(projectConfigure.name, projectConfigure);
-solution.projects.add(projectRwTest.name, projectRwTest);
-
-var projectTests = new Project(projectTestsName);
-projectTests.dependencies.add(projectRwTestName, projectRwTest);
-solution.projects.add(projectTests.name, projectTests);
-
-var projectRunExamples = new Project(projectRunExamplesName);
-solution.projects.add(projectRunExamples.name, projectRunExamples);
-
-var projectRunTests = new Project(projectRunTestsName);
-solution.projects.add(projectRunTests.name, projectRunTests);
-
-/////////////////////////////////////////////////////////////////
-// platforms
-var platformWin32 = new Platform(platformWin32Name);
-
-var platformWin32Conf = platformWin32.clone();
-var platformWin32Ex = platformWin32.clone();
-var platformWin32Tst = platformWin32.clone();
-var platformWin32Rw = platformWin32.clone();
-
-//////////////////////////////////////////////////////////////////
-// platform configurations
-
-// for configure
-projectConfigure.platforms.add(platformWin32Conf.name, platformWin32Conf);
-
-var confConfDebugStatic =
- new Configuration(
- confDebugStaticName, configTypeLib,
- confDebugStaticOut, confDebugStaticOut);
-platformWin32Conf.configurations.add(
- confConfDebugStatic.name, confConfDebugStatic);
-
-var confConfReleaseStatic =
- new Configuration(
- confReleaseStaticName, configTypeLib,
- confReleaseStaticOut, confReleaseStaticOut);
-platformWin32Conf.configurations.add(
- confConfReleaseStatic.name, confConfReleaseStatic);
-
-var confConfMTDebugStatic =
- new Configuration(
- confMTDebugStaticName, configTypeLib,
- confMTDebugStaticOut, confMTDebugStaticOut);
-platformWin32Conf.configurations.add(
- confConfMTDebugStatic.name, confConfMTDebugStatic);
-
-var confConfMTReleaseStatic =
- new Configuration(
- confMTReleaseStaticName, configTypeLib,
- confMTReleaseStaticOut, confMTReleaseStaticOut);
-platformWin32Conf.configurations.add(
- confConfMTReleaseStatic.name, confConfMTReleaseStatic);
-
-var confConfDebugDll =
- new Configuration(
- confDebugDllName, configTypeDll,
- confDebugDllOut, confDebugDllOut);
-platformWin32Conf.configurations.add(
- confConfDebugDll.name, confConfDebugDll);
-
-var confConfReleaseDll =
- new Configuration(
- confReleaseDllName, configTypeDll,
- confReleaseDllOut, confReleaseDllOut);
-platformWin32Conf.configurations.add(
- confConfReleaseDll.name, confConfReleaseDll);
-
-var confConfMTDebugDll =
- new Configuration(
- confMTDebugDllName, configTypeDll,
- confMTDebugDllOut, confMTDebugDllOut);
-platformWin32Conf.configurations.add(
- confConfMTDebugDll.name, confConfMTDebugDll);
-
-var confConfMTReleaseDll =
- new Configuration(
- confMTReleaseDllName, configTypeDll,
- confMTReleaseDllOut, confMTReleaseDllOut);
-platformWin32Conf.configurations.add(
- confConfMTReleaseDll.name, confConfMTReleaseDll);
-
-
-// for examples
-projectExamples.platforms.add(platformWin32Ex.name, platformWin32Ex);
-
-var confExDebugStatic =
- new Configuration(
- confDebugStaticName, configTypeExe,
- confDebugStaticOut, confDebugStaticOut);
-platformWin32Ex.configurations.add(
- confExDebugStatic.name, confExDebugStatic);
-
-var confExReleaseStatic =
- new Configuration(
- confReleaseStaticName, configTypeExe,
- confReleaseStaticOut, confReleaseStaticOut);
-platformWin32Ex.configurations.add(
- confExReleaseStatic.name, confExReleaseStatic);
-
-var confExMTDebugStatic =
- new Configuration(
- confMTDebugStaticName, configTypeExe,
- confMTDebugStaticOut, confMTDebugStaticOut);
-platformWin32Ex.configurations.add(
- confExMTDebugStatic.name, confExMTDebugStatic);
-
-var confExMTReleaseStatic =
- new Configuration(
- confMTReleaseStaticName, configTypeExe,
- confMTReleaseStaticOut, confMTReleaseStaticOut);
-platformWin32Ex.configurations.add(
- confExMTReleaseStatic.name, confExMTReleaseStatic);
-
-var confExDebugDll =
- new Configuration(
- confDebugDllName, configTypeExe,
- confDebugDllOut, confDebugDllOut);
-platformWin32Ex.configurations.add(
- confExDebugDll.name, confExDebugDll);
-
-var confExReleaseDll =
- new Configuration(
- confReleaseDllName, configTypeExe,
- confReleaseDllOut, confReleaseDllOut);
-platformWin32Ex.configurations.add(
- confExReleaseDll.name, confExReleaseDll);
-
-var confExMTDebugDll =
- new Configuration(
- confMTDebugDllName, configTypeExe,
- confMTDebugDllOut, confMTDebugDllOut);
-platformWin32Ex.configurations.add(
- confExMTDebugDll.name, confExMTDebugDll);
-
-var confExMTReleaseDll =
- new Configuration(
- confMTReleaseDllName, configTypeExe,
- confMTReleaseDllOut, confMTReleaseDllOut);
-platformWin32Ex.configurations.add(
- confExMTReleaseDll.name, confExMTReleaseDll);
-
-
-// for tests
-projectTests.platforms.add(platformWin32Tst.name, platformWin32Tst);
-
-var confTstDebugStatic =
- new Configuration(
- confDebugStaticName, configTypeExe,
- confDebugStaticOut, confDebugStaticOut);
-platformWin32Tst.configurations.add(
- confTstDebugStatic.name, confTstDebugStatic);
-
-var confTstReleaseStatic =
- new Configuration(
- confReleaseStaticName, configTypeExe,
- confReleaseStaticOut, confReleaseStaticOut);
-platformWin32Tst.configurations.add(
- confTstReleaseStatic.name, confTstReleaseStatic);
-
-var confTstMTDebugStatic =
- new Configuration(
- confMTDebugStaticName, configTypeExe,
- confMTDebugStaticOut, confMTDebugStaticOut);
-platformWin32Tst.configurations.add(
- confTstMTDebugStatic.name, confTstMTDebugStatic);
-
-var confTstMTReleaseStatic =
- new Configuration(
- confMTReleaseStaticName, configTypeExe,
- confMTReleaseStaticOut, confMTReleaseStaticOut);
-platformWin32Tst.configurations.add(
- confTstMTReleaseStatic.name, confTstMTReleaseStatic);
-
-var confTstDebugDll =
- new Configuration(
- confDebugDllName, configTypeExe,
- confDebugDllOut, confDebugDllOut);
-platformWin32Tst.configurations.add(
- confTstDebugDll.name, confTstDebugDll);
-
-var confTstReleaseDll =
- new Configuration(
- confReleaseDllName, configTypeExe,
- confReleaseDllOut, confReleaseDllOut);
-platformWin32Tst.configurations.add(
- confTstReleaseDll.name, confTstReleaseDll);
-
-var confTstMTDebugDll =
- new Configuration(
- confMTDebugDllName, configTypeExe,
- confMTDebugDllOut, confMTDebugDllOut);
-platformWin32Tst.configurations.add(
- confTstMTDebugDll.name, confTstMTDebugDll);
-
-var confTstMTReleaseDll =
- new Configuration(
- confMTReleaseDllName, configTypeExe,
- confMTReleaseDllOut, confMTReleaseDllOut);
-platformWin32Tst.configurations.add(
- confTstMTReleaseDll.name, confTstMTReleaseDll);
-
-
-// for rwtest
-projectRwTest.platforms.add(platformWin32Rw.name, platformWin32Rw);
-
-var confRwDebugStatic =
- new Configuration(
- confDebugStaticName, configTypeLib,
- confDebugStaticOut, confDebugStaticOut);
-platformWin32Rw.configurations.add(
- confRwDebugStatic.name, confRwDebugStatic);
-
-var confRwReleaseStatic =
- new Configuration(
- confReleaseStaticName, configTypeLib,
- confReleaseStaticOut, confReleaseStaticOut);
-platformWin32Rw.configurations.add(
- confRwReleaseStatic.name, confRwReleaseStatic);
-
-var confRwMTDebugStatic =
- new Configuration(
- confMTDebugStaticName, configTypeLib,
- confMTDebugStaticOut, confMTDebugStaticOut);
-platformWin32Rw.configurations.add(
- confRwMTDebugStatic.name, confRwMTDebugStatic);
-
-var confRwMTReleaseStatic =
- new Configuration(
- confMTReleaseStaticName, configTypeLib,
- confMTReleaseStaticOut, confMTReleaseStaticOut);
-platformWin32Rw.configurations.add(
- confRwMTReleaseStatic.name, confRwMTReleaseStatic);
-
-var confRwDebugDll =
- new Configuration(
- confDebugDllName, configTypeLib,
- confDebugDllOut, confDebugDllOut);
-platformWin32Rw.configurations.add(
- confRwDebugDll.name, confRwDebugDll);
-
-var confRwReleaseDll =
- new Configuration(
- confReleaseDllName, configTypeLib,
- confReleaseDllOut, confReleaseDllOut);
-platformWin32Rw.configurations.add(
- confRwReleaseDll.name, confRwReleaseDll);
-
-var confRwMTDebugDll =
- new Configuration(
- confMTDebugDllName, configTypeLib,
- confMTDebugDllOut, confMTDebugDllOut);
-platformWin32Rw.configurations.add(
- confRwMTDebugDll.name, confRwMTDebugDll);
-
-var confRwMTReleaseDll =
- new Configuration(
- confMTReleaseDllName, configTypeLib,
- confMTReleaseDllOut, confMTReleaseDllOut);
-platformWin32Rw.configurations.add(
- confRwMTReleaseDll.name, confRwMTReleaseDll);
-
-// for RunExamples
-var platformWin32RunEx = platformWin32Conf.clone();
-projectRunExamples.platforms.add(platformWin32RunEx.name,
- platformWin32RunEx);
-
-// for RunTests
-var platformWin32RunTests = platformWin32Conf.clone();
-projectRunTests.platforms.add(platformWin32RunTests.name,
- platformWin32RunTests);
-
-/////////////////////////////////////////////////////////////////////////
-// tools
-
-// compilers
-var compiler = new Compiler();
-compiler.defines.add("_RWSTD_USE_CONFIG");
-
-var compilerWin32 = compiler.clone();
-// compilerWin32.defines.add("WIN32");
-
-// linkers
-var linker = new Linker();
-
-// librarians
-var librarian = new Librarian();
-
-////////////////////////////////////////////////////////////////////////
-// functions
-
-// returns solution by its name
-function getSolution(name)
-{
- return configurations.get(name);
-}
-
-////////////////////////////////////////////////////////////////////////
-// solution names
-
-// VC71 solution
-var vc71SolutionName = "msvc-7.1";
-
-// VC80 solution
-var vc80SolutionName = "msvc-8.0";
-
-// ICC90 solution
-var icc90SolutionName = "icc-9.0";
-
-// ICC90 configuration solution
-var icc90CfgSolutionName = icc90SolutionName + "_config";
-
-// ICC91 solution
-var icc91SolutionName = "icc-9.1";
+var configs = new Collection();
+configs.add(confDebugStaticName, new ConfigInfo(true, false, false, confDebugStaticOut));
+configs.add(confReleaseStaticName, new ConfigInfo(false, false, false, confReleaseStaticOut));
+configs.add(confMTDebugStaticName, new ConfigInfo(true, true, false, confMTDebugStaticOut));
+configs.add(confMTReleaseStaticName, new ConfigInfo(false, true, false, confMTReleaseStaticOut));
+configs.add(confDebugDllName, new ConfigInfo(true, false, true, confDebugDllOut));
+configs.add(confReleaseDllName, new ConfigInfo(false, false, true, confReleaseDllOut));
+configs.add(confMTDebugDllName, new ConfigInfo(true, true, true, confMTDebugDllOut));
+configs.add(confMTReleaseDllName, new ConfigInfo(false, true, true, confMTReleaseDllOut));
+
+var confStaticNames = new Array(
+ confDebugStaticName, confReleaseStaticName,
+ confMTDebugStaticName, confMTReleaseStaticName);
+
+var confDllNames = new Array(
+ confDebugDllName, confReleaseDllName,
+ confMTDebugDllName, confMTReleaseDllName);
+
+var confDebugNames = new Array(
+ confDebugStaticName, confMTDebugStaticName,
+ confDebugDllName, confMTDebugDllName);
+
+var confReleaseNames = new Array(
+ confReleaseStaticName, confMTReleaseStaticName,
+ confReleaseDllName, confMTReleaseDllName);
-// ICC91 configuration solution
-var icc91CfgSolutionName = icc91SolutionName + "_config";
+var confNames = confStaticNames.concat(confDllNames);
Added: incubator/stdcxx/trunk/etc/config/windows/devenv_consts.js
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/devenv_consts.js?view=auto&rev=453570
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/devenv_consts.js (added)
+++ incubator/stdcxx/trunk/etc/config/windows/devenv_consts.js Fri Oct 6 05:16:32 2006
@@ -0,0 +1,134 @@
+//
+// $Id$
+//
+// devenv_consts.js - constants for VisualStudio Automation objects
+//
+//////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed
+// with this work for additional information regarding copyright
+// ownership. The ASF licenses this file to you under the Apache
+// License, Version 2.0 (the "License"); you may not use this file
+// except in compliance with the License. You may obtain a copy of
+// the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+// implied. See the License for the specific language governing
+// permissions and limitations under the License.
+//
+//////////////////////////////////////////////////////////////////////
+
+var typeUnknown = 0;
+var typeApplication = 1;
+var typeDynamicLibrary = 2;
+var typeStaticLibrary = 4;
+var typeGeneric = 10;
+var typeLibrary = -1;
+
+var charSetNotSet = 0;
+var charSetUnicode = 1;
+var charSetMBCS = 2;
+
+var eFileTypeDefault = -1;
+var eFileTypeCppCode = 0;
+var eFileTypeCppClass = 1;
+var eFileTypeCppHeader = 2;
+var eFileTypeCppForm = 3;
+var eFileTypeCppControl = 4;
+var eFileTypeText = 5;
+var eFileTypeDEF = 6;
+var eFileTypeIDL = 7;
+var eFileTypeMakefile = 8;
+var eFileTypeRGS = 9;
+var eFileTypeRC = 10;
+var eFileTypeRES = 11;
+var eFileTypeXSD = 12;
+var eFileTypeXML = 13;
+var eFileTypeHTML = 14;
+var eFileTypeCSS = 15;
+var eFileTypeBMP = 16;
+var eFileTypeICO = 17;
+var eFileTypeResx = 18;
+var eFileTypeScript = 19;
+var eFileTypeBSC = 20;
+var eFileTypeXSX = 21;
+var eFileTypeCppWebService = 22;
+var eFileTypeAsax = 23;
+var eFileTypeAspPage = 24;
+var eFileTypeDocument = 25;
+var eFileTypeDiscomap = 26;
+
+var debugDisabled = 0;
+var debugOldStyleInfo = 1;
+var debugLineInfoOnly = 2;
+var debugEnabled = 3;
+var debugEditAndContinue = 4;
+
+var warningLevel_0 = 0;
+var warningLevel_1 = 1;
+var warningLevel_2 = 2;
+var warningLevel_3 = 3;
+var warningLevel_4 = 4;
+
+var optimizeDisabled = 0;
+var optimizeMinSpace = 1;
+var optimizeMaxSpeed = 2;
+var optimizeFull = 3;
+var optimizeCustom = 4;
+
+var rtMultiThreaded = 0;
+var rtMultiThreadedDebug = 1;
+var rtMultiThreadedDLL = 2;
+var rtMultiThreadedDebugDLL = 3;
+var rtSingleThreaded = 4;
+var rtSingleThreadedDebug = 5;
+
+var pchNone = 0;
+var pchCreateUsingSpecific = 1;
+var pchGenerateAuto = 2;
+var pchUseUsingSpecific = 3;
+
+var linkIncrementalDefault = 0;
+var linkIncrementalNo = 1;
+var linkIncrementalYes = 2;
+
+var optReferencesDefault = 0;
+var optNoReferences = 1;
+var optReferences = 2;
+
+var optFoldingDefault = 0;
+var optNoFolding = 1;
+var optFolding = 2;
+
+var machineNotSet = 0;
+var machineX86 = 1;
+
+var subSystemNotSet = 0;
+var subSystemConsole = 1;
+var subSystemWindows = 2;
+
+var cppExceptionHandlingNo = 0;
+var cppExceptionHandlingYes = 1;
+var cppExceptionHandlingYesWithSEH = 2;
+
+var preprocessNo = 0;
+var preprocessYes = 1;
+var preprocessNoLineNumbers = 2;
+
+var vsWindowStateNormal = 0;
+var vsWindowStateMinimize = 1;
+var vsWindowStateMaximize = 2;
+
+var vsSaveChangesYes = 1;
+var vsSaveChangesNo = 2;
+var vsSaveChangesPrompt = 3;
+
+var runtimeBasicCheckNone = 0;
+var runtimeCheckStackFrame = 1;
+var runtimeCheckUninitVariables = 2;
+var runtimeBasicCheckAll = 3;
Propchange: incubator/stdcxx/trunk/etc/config/windows/devenv_consts.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/stdcxx/trunk/etc/config/windows/devenv_consts.js
------------------------------------------------------------------------------
svn:keywords = Id
Added: incubator/stdcxx/trunk/etc/config/windows/filterdef.js
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/filterdef.js?view=auto&rev=453570
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/filterdef.js (added)
+++ incubator/stdcxx/trunk/etc/config/windows/filterdef.js Fri Oct 6 05:16:32 2006
@@ -0,0 +1,256 @@
+//
+// $Id$
+//
+// filterdef.js - FilterDef class definition
+//
+//////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed
+// with this work for additional information regarding copyright
+// ownership. The ASF licenses this file to you under the Apache
+// License, Version 2.0 (the "License"); you may not use this file
+// except in compliance with the License. You may obtain a copy of
+// the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+// implied. See the License for the specific language governing
+// permissions and limitations under the License.
+//
+//////////////////////////////////////////////////////////////////////
+
+var sourceFilterName = "Source Files";
+var sourceFilterUuid = "{4FC737F1-C7A5-4376-A066-2A32D752A2FF}";
+var sourceFilterExts = ".cpp;.cxx;.s";
+
+var headerFilterName = "Header Files";
+var headerFilterUuid = "{93995380-89BD-4b04-88EB-625FBE52EBFB}";
+var headerFilterExts = ".h;.hpp;.hxx;.c;.cc";
+
+//------------------------------------------------
+// Macro class
+//------------------------------------------------
+
+// Macro .ctor
+function Macro(name, value)
+{
+ this.name = name;
+ this.value = value;
+}
+
+// Replace all macros in str
+// str - string to modify
+// arrMacro - array of Macro objects
+function ReplaceMacros(str, arrMacro)
+{
+ for (var i = 0; i < arrMacro.length; ++i)
+ {
+ var macro = arrMacro[i];
+ str = str.replace(new RegExp("(" + macro.name + ")", "g"), macro.value)
+ }
+
+ return str;
+}
+
+// common macros
+var cmnMacros = new Array();
+
+//------------------------------------------------
+// FilterDef class
+//------------------------------------------------
+
+// FilterDef .ctor
+function FilterDef(name, id, filter, type, exclude)
+{
+ this.Name = name;
+ this.Id = id;
+ this.Filter = filter;
+ this.Type = type;
+ this.Exclude = exclude;
+ this.Folder = null;
+ this.Files = new Array();
+ this.exclFolders = null;
+ this.exclFiles = null;
+ this.FilterDefs = new Array();
+}
+
+FilterDef.prototype.addFilter = filterAddFilter;
+FilterDef.prototype.addFiles = filterAddFiles;
+FilterDef.prototype.addFilesByMask = filterAddFilesByMask;
+FilterDef.prototype.createVCFilter = filterCreateVCFilter;
+
+// add subfilter to object
+function filterAddFilter(filter)
+{
+ this.FilterDefs.push(filter);
+ return this;
+}
+
+// add files to object
+// folder - parent folder
+// files - filename of array if filenames
+function filterAddFiles(folder, files)
+{
+ this.Folder = folder;
+ if (files instanceof Array)
+ this.Files = this.Files.concat(files);
+ else
+ this.Files.push(files);
+ return this;
+}
+
+// add to object files from filder and all subfolders
+// excluding exclFolders and exclFiles
+// folder - start folder
+// exclFolder - regular expression which defines the folders to exclude
+// exclFiles - regular expression which defines the files to exclude
+function filterAddFilesByMask(folder, exclFolders, exclFiles)
+{
+ this.Folder = folder;
+ this.exclFolders = exclFolders;
+ this.exclFiles = exclFiles;
+ return this;
+}
+
+// add file to VCFilter object
+// filter - VCFilter object
+// filename - filename to add
+// filetype - type of file (one of eFileTypexxx)
+// exclude - if true then file will be excluded from build
+function AddFilterFile(filter, filename, filetype, exclude)
+{
+ var VCFile = filter.AddFile(filename);
+ if (null != filetype && typeof(VCFile.FileType) != "undefined")
+ VCFile.FileType = filetype;
+
+ if (exclude)
+ {
+ var cfgs = VCFile.FileConfigurations;
+ for (var i = 1; i <= cfgs.Count; ++i)
+ {
+ var cfg = cfgs.Item(i);
+ if (typeof(cfg.Tool.ToolKind) != "undefined")
+ {
+ if (cfg.Tool.ToolKind != "VCCLCompilerTool")
+ exclude = false;
+ }
+ else if (cfg.Tool.ToolName != "C/C++ Compiler Tool")
+ exclude = false;
+
+ cfg.ExcludedFromBuild = exclude;
+ }
+ }
+}
+
+// create VCFilter object from the FilterDef definition
+// and add to parent
+function filterCreateVCFilter(parent)
+{
+ var VCFilter;
+ if (null == this.Name)
+ VCFilter = parent;
+ else
+ {
+ VCFilter = parent.AddFilter(this.Name);
+ if (null != this.Id)
+ VCFilter.UniqueIdentifier = this.Id;
+ if (null != this.Filter)
+ VCFilter.Filter = this.Filter;
+ }
+
+ if (null != this.Folder)
+ this.Folder = ReplaceMacros(this.Folder, cmnMacros);
+
+ if (0 < this.Files.length)
+ {
+ // add specified files
+ for (var i = 0; i < this.Files.length; ++i)
+ {
+ var filename = this.Files[i];
+ if (null != this.Folder && this.Folder.length > 0)
+ filename = this.Folder + "\\" + filename;
+
+ try
+ {
+ fso.GetFile(filename);
+ }
+ catch (e)
+ {
+ WScript.Echo("File " + filename + " does not exist");
+ WScript.Quit(3);
+ }
+
+ AddFilterFile(VCFilter, filename, this.Type, this.Exclude);
+ }
+ }
+ else
+ {
+ // add files from folder
+
+ // create regexp from extensions
+ var extArray = this.Filter.replace(/\./g, "\\.").split(";");
+ var rxText = "^";
+ if (extArray.length != 0)
+ {
+ rxText += "(?:" + extArray[0];
+ for (i = 1; i < extArray.length; ++i)
+ rxText += "|" + extArray[i];
+ rxText += ")";
+ }
+ rxText += "$";
+
+ var rxExts = new RegExp(rxText, "i");
+
+ var folder;
+
+ try
+ {
+ folder = fso.GetFolder(this.Folder);
+ }
+ catch (e)
+ {
+ WScript.Echo("Folder " + this.Folder + " does not exist");
+ WScript.Quit(3);
+ }
+
+ // add subfolders as own filters
+ var enumSubFolders = new Enumerator(folder.SubFolders);
+ for (; !enumSubFolders.atEnd(); enumSubFolders.moveNext())
+ {
+ var subFolder = enumSubFolders.item();
+ if (null == this.exclFolders || !this.exclFolders.test(subFolder.Name))
+ {
+ var filterDef = new FilterDef(subFolder.Name, this.Id,
+ this.Filter, this.Type, this.Exclude);
+ filterDef.Folder = subFolder.Path;
+ filterDef.exclFolders = this.exclFolders;
+ filterDef.exclFiles = this.exclFiles;
+ filterDef.createVCFilter(VCFilter);
+ }
+ }
+
+ // add files
+ var nfiles = 0;
+ var enumFiles = new Enumerator(folder.Files);
+ for (; !enumFiles.atEnd(); enumFiles.moveNext())
+ {
+ var file = enumFiles.item();
+ var fileext = getExtension(file.Name);
+ if (rxExts.test(fileext) && (null == this.exclFiles || !this.exclFiles.test(file.Name)))
+ {
+ ++nfiles;
+ AddFilterFile(VCFilter, file.Path, this.Type, this.Exclude);
+ }
+ }
+
+ // remove filter if it is empty
+ if (0 == nfiles)
+ parent.RemoveFilter(VCFilter);
+ }
+ for (var i = 0; i < this.FilterDefs.length; ++i)
+ this.FilterDefs[i].createVCFilter(VCFilter);
+}
Propchange: incubator/stdcxx/trunk/etc/config/windows/filterdef.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/stdcxx/trunk/etc/config/windows/filterdef.js
------------------------------------------------------------------------------
svn:keywords = Id