stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r532753 - /incubator/stdcxx/trunk/etc/config/windows/projectdef.js
Date Thu, 26 Apr 2007 14:19:03 GMT
Author: faridz
Date: Thu Apr 26 07:19:03 2007
New Revision: 532753

URL: http://svn.apache.org/viewvc?view=rev&rev=532753
Log:
2007-04-26 Farid Zaripov <Farid_Zaripov@epam.com>

	STDCXX-398
	* projectdef.js (projectCreateVCProject): Added workarounds to build
	projects with ".obj" in name on MSVC 7.x

Modified:
    incubator/stdcxx/trunk/etc/config/windows/projectdef.js

Modified: incubator/stdcxx/trunk/etc/config/windows/projectdef.js
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/projectdef.js?view=diff&rev=532753&r1=532752&r2=532753
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/projectdef.js (original)
+++ incubator/stdcxx/trunk/etc/config/windows/projectdef.js Thu Apr 26 07:19:03 2007
@@ -331,6 +331,29 @@
     VCProject.ProjectGUID = createUUID();
     
     VCProject.AddPlatform(PLATFORM);
+
+    var FixedPrjName = PrjName;
+    var dotObj = ".obj";
+
+    var VC7xWknd = 0 <= PrjName.indexOf(dotObj)
+                && ("7" == VERSION || "7.1" == VERSION);
+
+    var PostBuildCmd = this.PostBuildCmd;
+
+    if (VC7xWknd)
+    {
+        FixedPrjName = FixedPrjName.replace(new RegExp(dotObj, "ig"), "_obj");
+        if (null != PostBuildCmd)
+            PostBuildCmd += "\r\n";
+        else
+            PostBuildCmd = "";
+
+        var srcDir = "$(OutDir)\\" + FixedPrjName;
+        var dstDir = "$(OutDir)\\" + PrjName;
+        PostBuildCmd += "md \"" + dstDir + "\"\r\n" +
+            "copy \"" + srcDir + "\\" + FixedPrjName + dotObj + "\" \"" + dstDir + "\\" +
PrjName + dotObj + "\"\r\n" +
+            "copy \"" + srcDir + "\\buildlog.htm\" \"" + dstDir + "\"";
+    }
     
     for (var i = 0; i < confNames.length; ++i)
         VCProject.AddConfiguration(confNames[i]);
@@ -338,7 +361,7 @@
     var OutDir = this.OutDir != null ?
         ReplaceMacros(this.OutDir, prjMacros) : "%CONFIG%";
     var IntDir = this.IntDir != null ?
-        ReplaceMacros(this.IntDir, prjMacros) : OutDir + "\\" + PrjName;
+        ReplaceMacros(this.IntDir, prjMacros) : OutDir + "\\" + FixedPrjName;
 
     // add files
     for (var i = 0; i < this.FilterDefs.length; ++i)
@@ -448,6 +471,9 @@
             }
 
             compiler.UsePrecompiledHeader = pchNone;
+
+            if (VC7xWknd)
+                compiler.ObjectFile = "$(IntDir)/" + FixedPrjName + dotObj;
         }
 
         var linker = conf.Tools.Item("VCLinkerTool");
@@ -516,10 +542,10 @@
                 tool.Description = ReplaceMacros(this.PreBuildDesc, allMacros);
         }
 
-        if (null != this.PostBuildCmd)
+        if (null != PostBuildCmd)
         {
             var tool = conf.Tools.Item("VCPostBuildEventTool");
-            tool.CommandLine = ReplaceMacros(this.PostBuildCmd, allMacros);
+            tool.CommandLine = ReplaceMacros(PostBuildCmd, allMacros);
             if (null != this.PostBuildDesc)
                 tool.Description = ReplaceMacros(this.PostBuildDesc, allMacros);
         }



Mime
View raw message