Return-Path: Delivered-To: apmail-incubator-stdcxx-commits-archive@www.apache.org Received: (qmail 65405 invoked from network); 25 Nov 2005 22:17:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Nov 2005 22:17:17 -0000 Received: (qmail 10667 invoked by uid 500); 25 Nov 2005 22:17:17 -0000 Delivered-To: apmail-incubator-stdcxx-commits-archive@incubator.apache.org Received: (qmail 10624 invoked by uid 500); 25 Nov 2005 22:17:16 -0000 Mailing-List: contact stdcxx-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-commits@incubator.apache.org Received: (qmail 10567 invoked by uid 500); 25 Nov 2005 22:17:15 -0000 Delivered-To: apmail-incubator-stdcxx-cvs@incubator.apache.org Received: (qmail 10557 invoked by uid 99); 25 Nov 2005 22:17:14 -0000 X-ASF-Spam-Status: No, hits=-8.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME,URI_NOVOWEL X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 25 Nov 2005 14:17:12 -0800 Received: (qmail 65312 invoked by uid 65534); 25 Nov 2005 22:16:51 -0000 Message-ID: <20051125221651.65311.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r349027 [1/4] - in /incubator/stdcxx/trunk: ./ etc/config/windows/ Date: Fri, 25 Nov 2005 22:16:48 -0000 To: stdcxx-cvs@incubator.apache.org From: sebor@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: sebor Date: Fri Nov 25 14:16:34 2005 New Revision: 349027 URL: http://svn.apache.org/viewcvs?rev=349027&view=rev Log: 2005-11-25 Anton Pevtsov Martin Sebor STDCXX-5 * generate.bat: New Windows batch file to invoke the Windows build infrastructure. Invoke like so: > generate /BUILDDIR: /CONFIG:VC71 * configure.wsf: New Windows Script Host (WSH) file implementing the Windows configuration infrastructure. * generate.wsf: New WSH file implementing the part of the Windows infrastructure responsible for generating Visual Studio projects and solution(s). * generate.js: New JScript file invoked from the WSH file above. * runexamples.wsf: New helper WSH file for the batch invocation of example programs. * runexe.wsf: New helper WSH file used by the above to invoke a single example or test program. * update.js: New JScript file to update an already generated Visual Studio solution and add new projects to it. * config.js: New helper JScript file. * msvc-config_classes.js: New MSVC-specific JScript helper file containing definitions of classes and their members. * data.js: New helper JScript file containing definitions of data. * msvc-config.js: New MSVC-specific JScript helper file. * utilities.js: New helper JScript file containing definitions of non-member functions. * summary.js: New helper JScript file to generate a summary build log in HTML format. * makelog.wsf: New helper WSH file invoked to generate a summary build log. * fun_present_check.cpp: New helper C++ source file used by the configuration infrastructure to check for the presence of library functions in dependent libraries. Added: incubator/stdcxx/trunk/etc/config/windows/ incubator/stdcxx/trunk/etc/config/windows/config.js (with props) incubator/stdcxx/trunk/etc/config/windows/configure.wsf (with props) incubator/stdcxx/trunk/etc/config/windows/data.js (with props) incubator/stdcxx/trunk/etc/config/windows/fun_present_check.cpp (with props) incubator/stdcxx/trunk/etc/config/windows/generate.js (with props) incubator/stdcxx/trunk/etc/config/windows/generate.wsf (with props) incubator/stdcxx/trunk/etc/config/windows/makelog.wsf (with props) incubator/stdcxx/trunk/etc/config/windows/msvc-config.js (with props) incubator/stdcxx/trunk/etc/config/windows/msvc-config_classes.js (with props) incubator/stdcxx/trunk/etc/config/windows/runexamples.wsf (with props) incubator/stdcxx/trunk/etc/config/windows/runexe.wsf (with props) incubator/stdcxx/trunk/etc/config/windows/summary.js (with props) incubator/stdcxx/trunk/etc/config/windows/update.wsf (with props) incubator/stdcxx/trunk/etc/config/windows/utilities.js (with props) incubator/stdcxx/trunk/generate.bat (with props) Added: incubator/stdcxx/trunk/etc/config/windows/config.js URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/etc/config/windows/config.js?rev=349027&view=auto ============================================================================== --- incubator/stdcxx/trunk/etc/config/windows/config.js (added) +++ incubator/stdcxx/trunk/etc/config/windows/config.js Fri Nov 25 14:16:34 2005 @@ -0,0 +1,384 @@ +// +// $Id$ +// +// config.js - base classes for configurations support +// +////////////////////////////////////////////////////////////////////// + +//------------------------------------------------ +// +// Common functions +// +//------------------------------------------------ + +// creates a copy of an object +function genericClone() +{ + return this.cloneTo(new Object(), true); +} + +// copy all properties and optionally methods to a target object +function genericCloneTo(target, cloneMethods) +{ + //WScript.Echo(this); + for (i in this) + { + var type = typeof(this[i]); + //WScript.Echo(i + " " + type); + switch (type) + { + case "object": + target[i] = this[i].clone(); + break; + case "number": + case "boolean": + case "undefined": + target[i] = this[i]; + break; + case "function": + if (cloneMethods) + { + target[i] = this[i]; + } + break; + case "string": + target[i] = String(this[i]); + break; + default: + throw "Unknown property type."; + } + } + return target; +} + +//------------------------------------------------ +// Associative Collection class +//------------------------------------------------ + +// Collection class .ctor +function Collection() {} + +// Adds specified element to a collection of solutions +function addElement(name, element) +{ + this[name] = element; +} + +// Removes specified element from a collection of solutions +function removeElement(name) +{ + delete this[name]; +} + +// Gets specified element from a collection of solutions +function getElement(name) +{ + return this[name]; +} + +// Collection class methods +Collection.prototype.cloneTo = genericCloneTo; +Collection.prototype.clone = genericClone; +Collection.prototype.add = addElement; +Collection.prototype.func_remove = removeElement; +Collection.prototype.get = getElement; + +//------------------------------------------------ +// Solution class +//------------------------------------------------ + +// Solution .ctor +function Solution(name) +{ + this.name = String(name); + this.configurations = new Collection(); + this.projects = new Collection(); +} + +// 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(); +} + +// 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 +//------------------------------------------------ + +// ItemBuildInfo .ctor +function ItemBuildInfo(name) +{ + this.name = String(name); + this.buildCmdLog = ""; + this.buildOutLog = ""; + this.errorsCnt = "0"; + this.warningsCnt = "0"; + this.linkerErrors = false; + + this.runOutput = ""; + this.runReqOutput = ""; + this.runDiff = ""; + this.exitCode = 0; +} + +// ItemBuildInfo class methods +ItemBuildInfo.prototype.cloneTo = genericCloneTo; +ItemBuildInfo.prototype.clone = genericClone; + Propchange: incubator/stdcxx/trunk/etc/config/windows/config.js ------------------------------------------------------------------------------ svn:keywords = Id Added: incubator/stdcxx/trunk/etc/config/windows/configure.wsf URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/etc/config/windows/configure.wsf?rev=349027&view=auto ============================================================================== --- incubator/stdcxx/trunk/etc/config/windows/configure.wsf (added) +++ incubator/stdcxx/trunk/etc/config/windows/configure.wsf Fri Nov 25 14:16:34 2005 @@ -0,0 +1,976 @@ + + + + PrimalCode wizard generated file. + + + + + +Run configuration tests and produces config.h file. + + + + + + + + cscript configure.wsf /SolutionName:VC71 + /ConfigurationName:"Release Static" + + +Usage: cscript configure.wsf /SolutionName:@Solution +/ConfigurationName:@Configuration [/OutDir:@OutDir] [/OutFile:@OutFile] +[/SrcDir:@SrcDir] [/LogFile:@LogFile], +where +@Solution is VC71, +@Configuration = 11s Debug Static | 11d Debug Dll , etc +@OutDir - output directory (default: script_directory\tests), +@OutFile - output file name (default: config.h), +@SrcDir - test sources directory (default: script_directory\..\src), +@LogFile - log file name (default: config.log). + + + + + + + + Propchange: incubator/stdcxx/trunk/etc/config/windows/configure.wsf ------------------------------------------------------------------------------ svn:keywords = Id Added: incubator/stdcxx/trunk/etc/config/windows/data.js URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/etc/config/windows/data.js?rev=349027&view=auto ============================================================================== --- incubator/stdcxx/trunk/etc/config/windows/data.js (added) +++ incubator/stdcxx/trunk/etc/config/windows/data.js Fri Nov 25 14:16:34 2005 @@ -0,0 +1,831 @@ +// +// $Id$ +// +// file should be included after base_config_classes + +// base configuration settings + +//------------------------------------------------ +// global object storing all configurations +//------------------------------------------------ +var configurations = new Collection(); + +// configuration names +var confDebugStaticName = "11s Debug Static"; +var confReleaseStaticName = "8s Optimized Static"; +var confMTDebugStaticName = "15s Debug Thread-safe Static"; +var confMTReleaseStaticName = "12s Optimized Thread-safe Static"; +var confDebugDllName = "11d Debug Dll"; +var confReleaseDllName = "8d Optimized Dll"; +var confMTDebugDllName = "15d Debug Thread-safe Dll"; +var confMTReleaseDllName = "12d Optimized Thread-safe Dll"; + +// configuration output directories +var confDebugStaticOut = "11s"; +var confReleaseStaticOut = "8s"; +var confMTDebugStaticOut = "15s"; +var confMTReleaseStaticOut = "12s"; +var confDebugDllOut = "11d"; +var confReleaseDllOut = "8d"; +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); +} + Propchange: incubator/stdcxx/trunk/etc/config/windows/data.js ------------------------------------------------------------------------------ svn:keywords = Id Added: incubator/stdcxx/trunk/etc/config/windows/fun_present_check.cpp URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/etc/config/windows/fun_present_check.cpp?rev=349027&view=auto ============================================================================== --- incubator/stdcxx/trunk/etc/config/windows/fun_present_check.cpp (added) +++ incubator/stdcxx/trunk/etc/config/windows/fun_present_check.cpp Fri Nov 25 14:16:34 2005 @@ -0,0 +1,70 @@ +extern "C" +{ + typedef void (*funptr_t)(); +} + +// take the address of the function in a way +// that foils even clever optimizers + +union { + funptr_t pf; + unsigned long ul; +} funptri; + +#ifdef CHECK_DECL + +# if defined (__linux__) && defined (__GNUG__) && __GNUG__ < 3 + // prevent empty exception specifications from triggering + // gcc 2.9x -fhonor-std link errors looking for std::terminate() +# include +# undef __THROW +# define __THROW +# endif // gcc < 3 on Linux + +# include HDRNAME + +# ifndef NONAMESPACE + +namespace std { } +using namespace std; + +# endif // NONAMESPACE + +int main (int argc, char**) +{ + // with gcc, prevent intrinsics from causing false positives + +# if TAKE_ADDR + + funptri.pf = (funptr_t)&FUNNAME; + + return (argc < 1 ? !funptri.ul : !!funptri.ul) + 0; + +# else // if !TAKE_ADDR + + // disable warnings about an unused variable + (void)&argc; + + // call the function using the supplied arguments + (void)FUN; + + return 0; + +# endif // TAKE_ADDR + +} + +#else // if !defined (CHECK_DECL) + +extern "C" void FUNNAME (); + +int main (int argc, char**) +{ + funptri.pf = (funptr_t)&FUNNAME; + + return (argc < 1 ? !funptri.ul : !!funptri.ul) + 0; +} + +#endif // CHECK_DECL + + Propchange: incubator/stdcxx/trunk/etc/config/windows/fun_present_check.cpp ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/stdcxx/trunk/etc/config/windows/fun_present_check.cpp ------------------------------------------------------------------------------ svn:keywords = Id