[commit] r2046 - trunk/Install/Build
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Tue Sep 11 09:22:43 CDT 2012
Author: ksmyth
Date: Tue Sep 11 09:22:42 2012
New Revision: 2046
Log:
Option for VS2012
Modified:
trunk/Install/Build/build.py
trunk/Install/Build/prefs.py
trunk/Install/Build/tools.py
Modified: trunk/Install/Build/build.py
==============================================================================
--- trunk/Install/Build/build.py Thu Sep 6 10:06:16 2012 (r2045)
+++ trunk/Install/Build/build.py Tue Sep 11 09:22:42 2012 (r2046)
@@ -140,11 +140,8 @@
except OSError as exc:
if exc.errno != errno.EEXIST:
raise
- pfx86 = os.environ.get('ProgramFiles(x86)', os.environ['ProgramFiles'])
- if prefs['arch'] == 'x64':
- copy_if_newer(os.path.join(pfx86, r"Microsoft Visual Studio 10.0\VC\bin\amd64\pgort100.dll"), os.path.join(_Release_PGO_dir(), 'pgort100.dll'))
- else:
- copy_if_newer(os.path.join(pfx86, r"Microsoft Visual Studio 10.0\VC\bin\pgort100.dll"), os.path.join(_Release_PGO_dir(), 'pgort100.dll'))
+ VC_path = os.path.join(prefs['VS_dir'], r"VC\bin\%s" % (prefs['arch'] == 'x64' and 'amd64\\' or ''))
+ copy_if_newer(os.path.join(VC_path, r"pgort%s0.dll" % prefs['toolset']), os.path.join(_Release_PGO_dir(), 'pgort%s0.dll' % prefs['toolset']))
sln_file = os.path.join(GME_ROOT, "GME", "GME.sln")
tools.build_VS(sln_file, "Release_PGO_Instrument")
cmd_dir = os.path.join(GME_ROOT, "GME")
@@ -460,6 +457,12 @@
print "Building GME version " + prefs["version_string"] + " " + prefs["arch"]
+_pfx86 = os.environ.get('ProgramFiles(x86)', os.environ['ProgramFiles'])
+if prefs['toolset'] == '11':
+ prefs['VS_dir'] = os.path.join(_pfx86, r"Microsoft Visual Studio 11.0")
+else:
+ prefs['VS_dir'] = os.path.join(_pfx86, r"Microsoft Visual Studio 10.0")
+
try:
for i in range(len(build_steps)):
if i in include_steps:
Modified: trunk/Install/Build/prefs.py
==============================================================================
--- trunk/Install/Build/prefs.py Thu Sep 6 10:06:16 2012 (r2045)
+++ trunk/Install/Build/prefs.py Tue Sep 11 09:22:42 2012 (r2046)
@@ -19,4 +19,5 @@
"version_patch" : time.localtime()[2],
"version_build" : 0,
"arch" : "x86",
+ "toolset": "10",
}
\ No newline at end of file
Modified: trunk/Install/Build/tools.py
==============================================================================
--- trunk/Install/Build/tools.py Thu Sep 6 10:06:16 2012 (r2045)
+++ trunk/Install/Build/tools.py Tue Sep 11 09:22:42 2012 (r2046)
@@ -127,7 +127,9 @@
import subprocess
# , '/fl', '/flp:Verbosity=diagnostic'
# , '/m'
- args = [msbuild, sln_path, '/t:' + ("Clean;" * prefs['clean']) + 'Build', '/p:Configuration=' + config_name + (';Platform=x64' if arch == 'x64' else '') ]
+ args = [msbuild, sln_path, '/m', '/t:' + ("Clean;" * prefs['clean']) + 'Build',
+ '/p:VisualStudioVersion=%s.0;PlatformToolset=v%s0;Configuration=%s' % (prefs['toolset'], prefs['toolset'], config_name) +
+ (';Platform=x64' if arch == 'x64' else '') ]
with open(os.devnull, "w") as nulfp:
# n.b. stderr=subprocess.STDOUT fails mysteriously
import sys
More information about the gme-commit
mailing list