ICL12 support on windows, cleanups

metadata
Wenzel Jakob 2011-06-01 18:32:55 +02:00
parent 72d0cadf5c
commit 8e3666adf5
19 changed files with 150 additions and 31 deletions

View File

@ -68,11 +68,11 @@ vars.Add('MSVC_VERSION', 'MS Visual C++ compiler version')
vars.Add('QTDIR', 'Qt installation directory') vars.Add('QTDIR', 'Qt installation directory')
try: try:
env = Environment(options=vars, ENV = os.environ, tools=['default', 'qt4'], toolpath=['#data']) env = Environment(options=vars, ENV = os.environ, tools=['default', 'qt4', 'icl12'], toolpath=['#data/scons'])
print 'Checking for Qt 4.x... yes' print 'Checking for Qt 4.x... yes'
hasQt = True hasQt = True
except Exception: except Exception:
env = Environment(options=vars, ENV = os.environ, tools=['default']) env = Environment(options=vars, ENV = os.environ, tools=['default', 'icl12'], toolpath=['#data/scons'])
print 'Unable to detect a Qt installation -- not building the GUI!' print 'Unable to detect a Qt installation -- not building the GUI!'
hasQt = False hasQt = False

View File

@ -1,5 +1,6 @@
BUILDDIR = '#build/release' BUILDDIR = '#build/release'
CXX = 'g++' CXX = 'g++'
CC = 'gcc'
CXXFLAGS = ['-arch', 'i386', '-arch', 'x86_64', '-mmacosx-version-min=10.5', '-march=nocona', '-msse2', '-mfpmath=sse', '-ftree-vectorize', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fomit-frame-pointer', '-isysroot', '/Developer/SDKs/MacOSX10.5.sdk', '-O3', '-Wall', '-g', '-pipe', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp', '-fstrict-aliasing', '-fsched-interblock', '-freorder-blocks'] CXXFLAGS = ['-arch', 'i386', '-arch', 'x86_64', '-mmacosx-version-min=10.5', '-march=nocona', '-msse2', '-mfpmath=sse', '-ftree-vectorize', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fomit-frame-pointer', '-isysroot', '/Developer/SDKs/MacOSX10.5.sdk', '-O3', '-Wall', '-g', '-pipe', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp', '-fstrict-aliasing', '-fsched-interblock', '-freorder-blocks']
LINKFLAGS = ['-framework', 'OpenGL', '-framework', 'Cocoa', '-arch', 'i386', '-arch', 'x86_64', '-mmacosx-version-min=10.5', '-Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk'] LINKFLAGS = ['-framework', 'OpenGL', '-framework', 'Cocoa', '-arch', 'i386', '-arch', 'x86_64', '-mmacosx-version-min=10.5', '-Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk']
BASEINCLUDE = ['#include'] BASEINCLUDE = ['#include']

View File

@ -1,5 +1,6 @@
BUILDDIR = '#build/release' BUILDDIR = '#build/release'
CXX = 'g++' CXX = 'g++'
CC = 'gcc'
CXXFLAGS = ['-arch', 'i386', '-mmacosx-version-min=10.5', '-march=nocona', '-msse2', '-mfpmath=sse', '-ftree-vectorize', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fomit-frame-pointer', '-isysroot', '/Developer/SDKs/MacOSX10.5.sdk', '-O3', '-Wall', '-g', '-pipe', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp', '-fstrict-aliasing', '-fsched-interblock', '-freorder-blocks'] CXXFLAGS = ['-arch', 'i386', '-mmacosx-version-min=10.5', '-march=nocona', '-msse2', '-mfpmath=sse', '-ftree-vectorize', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fomit-frame-pointer', '-isysroot', '/Developer/SDKs/MacOSX10.5.sdk', '-O3', '-Wall', '-g', '-pipe', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp', '-fstrict-aliasing', '-fsched-interblock', '-freorder-blocks']
LINKFLAGS = ['-framework', 'OpenGL', '-framework', 'Cocoa', '-arch', 'i386', '-mmacosx-version-min=10.5', '-Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk'] LINKFLAGS = ['-framework', 'OpenGL', '-framework', 'Cocoa', '-arch', 'i386', '-mmacosx-version-min=10.5', '-Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk']
BASEINCLUDE = ['#include'] BASEINCLUDE = ['#include']

View File

@ -1,5 +1,6 @@
BUILDDIR = '#build/release' BUILDDIR = '#build/release'
CXX = 'g++' CXX = 'g++'
CC = 'gcc'
CXXFLAGS = ['-arch', 'x86_64', '-mmacosx-version-min=10.5', '-march=nocona', '-msse2', '-mfpmath=sse', '-ftree-vectorize', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-isysroot', '/Developer/SDKs/MacOSX10.5.sdk', '-O3', '-Wall', '-g', '-pipe', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp', '-fstrict-aliasing', '-fsched-interblock', '-freorder-blocks'] CXXFLAGS = ['-arch', 'x86_64', '-mmacosx-version-min=10.5', '-march=nocona', '-msse2', '-mfpmath=sse', '-ftree-vectorize', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-isysroot', '/Developer/SDKs/MacOSX10.5.sdk', '-O3', '-Wall', '-g', '-pipe', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp', '-fstrict-aliasing', '-fsched-interblock', '-freorder-blocks']
LINKFLAGS = ['-framework', 'OpenGL', '-framework', 'Cocoa', '-arch', 'x86_64', '-mmacosx-version-min=10.5', '-Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk'] LINKFLAGS = ['-framework', 'OpenGL', '-framework', 'Cocoa', '-arch', 'x86_64', '-mmacosx-version-min=10.5', '-Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk']
BASEINCLUDE = ['#include'] BASEINCLUDE = ['#include']

View File

@ -1,27 +1,27 @@
BUILDDIR = '#build/release' BUILDDIR = '#build/release'
CXX = 'icl' CXX = 'icl'
GCC = 'icl' CC = 'icl'
CXXFLAGS = ['/nologo', '/O3', '/Qipo', '/QxSSSE3', '/QaxSSE4.2,SSE4.1', '/fp:fast=2', '/D', 'WIN32', '/W3', '/EHsc', '/GS-', '/GL', '/MD', '/D', 'MTS_DEBUG', '/D', 'SINGLE_PRECISION', '/D', 'MTS_SSE', '/D', 'MTS_HAS_COHERENT_RT', '/D', '_CONSOLE', '/D', 'NDEBUG', '/Qopenmp'] LINK = 'xilink'
CXXFLAGS = ['/nologo', '/O3', '/Qipo', '/Qprec-div-', '/QxSSE2', '/QaxSSE3,SSE4.2', '/fp:fast=2', '/D', 'WIN32', '/W3', '/EHsc', '/GS-', '/MD', '/D', 'MTS_DEBUG', '/D', 'SINGLE_PRECISION', '/D', 'MTS_SSE', '/D', 'MTS_HAS_COHERENT_RT', '/D', '_CONSOLE', '/D', 'NDEBUG', '/Qopenmp']
SHCXXFLAGS = CXXFLAGS SHCXXFLAGS = CXXFLAGS
TARGET_ARCH = 'x86' TARGET_ARCH = 'x86'
MSVC_VERSION = '9.0' MSVC_VERSION = '10.0'
LINK = 'xilink' LINKFLAGS = ['/nologo', '/SUBSYSTEM:CONSOLE', '/MACHINE:X86', '/FIXED:NO', '/OPT:REF', '/OPT:ICF', '/LTCG', '/NODEFAULTLIB:LIBCMT', '/MANIFEST']
LINKFLAGS = ['/nologo', '/SUBSYSTEM:CONSOLE', '/MACHINE:X86', '/FIXED:NO', '/OPT:REF', '/OPT:ICF', '/NODEFAULTLIB:LIBCMT']
BASEINCLUDE = ['#include', '#dependencies/windows/include'] BASEINCLUDE = ['#include', '#dependencies/windows/include']
BASELIB = ['pthreadVCE2', 'msvcrt', 'ws2_32', 'libmmds'] BASELIB = ['pthreadVCE2', 'msvcrt', 'ws2_32']
OEXRINCLUDE = ['#dependencies/windows/include/OpenEXR'] OEXRINCLUDE = ['#dependencies/windows/include/OpenEXR']
OEXRFLAGS = ['/D', 'OPENEXR_DLL'] OEXRFLAGS = ['/D', 'OPENEXR_DLL']
OEXRLIB = ['IlmImf', 'IlmThread', 'zlib1', 'Half'] OEXRLIB = ['IlmImf', 'IlmThread', 'zlib1', 'Half']
BOOSTINCLUDE = ['#dependencies'] BOOSTINCLUDE = ['#dependencies']
BOOSTLIB = ['boost_system-vc90-mt-1_44', 'boost_filesystem-vc90-mt-1_44'] BOOSTLIB = ['boost_system-vc100-mt-1_44', 'boost_filesystem-vc100-mt-1_44']
COLLADAINCLUDE = ['#dependencies/windows/include/colladadom', '#dependencies/windows/include/colladadom/1.4'] COLLADAINCLUDE = ['#dependencies/windows/include/colladadom', '#dependencies/windows/include/colladadom/1.4']
COLLADALIB = ['libcollada14dom21'] COLLADALIB = ['libcollada14dom23']
XERCESLIB = ['xerces-c_3'] XERCESLIB = ['xerces-c_3']
PNGLIB = ['libpng13'] PNGLIB = ['libpng13']
JPEGLIB = ['jpeg62'] JPEGLIB = ['jpeg62']
GLLIB = ['opengl32', 'glu32', 'glew32mx', 'gdi32', 'user32'] GLLIB = ['opengl32', 'glu32', 'glew32mx', 'gdi32', 'user32']
GLFLAGS = ['/D', 'GLEW_MX'] GLFLAGS = ['/D', 'GLEW_MX']
BASELIBDIR = ['#dependencies/windows/lib32', '#dependencies/windows/lib32/vc90'] BASELIBDIR = ['#dependencies/windows/lib32', '#dependencies/windows/lib32/vc100']
SHLIBPREFIX = 'lib' SHLIBPREFIX = 'lib'
SHLIBSUFFIX = '.dll' SHLIBSUFFIX = '.dll'
PROGSUFFIX = '.exe' PROGSUFFIX = '.exe'

View File

@ -1,28 +1,27 @@
BUILDDIR = '#build/release' BUILDDIR = '#build/release'
CXX = 'icl' CXX = 'icl'
GCC = 'icl' CC = 'icl'
CXXFLAGS = ['/nologo', '/O3', '/Qipo', '/QxSSSE3', '/QaxSSE4.2,SSE4.1', '/fp:fast=2', '/D', 'WIN32', '/D', 'WIN64', '/W3', '/EHsc', '/GS-', '/GL', '/MD', '/D', 'MTS_DEBUG', '/D', 'SINGLE_PRECISION', '/D', 'MTS_SSE', '/D', 'MTS_HAS_COHERENT_RT', '/D', '_CONSOLE', '/D', 'NDEBUG', '/Qopenmp'] LINK = 'xilink'
CXXFLAGS = ['/nologo', '/O3', '/Qipo', '/Qprec-div-', '/QxSSE2', '/QaxSSE3,SSE4.2', '/fp:fast=2', '/D', 'WIN32', '/D', 'WIN64', '/W3', '/EHsc', '/GS-', '/MD', '/D', 'MTS_DEBUG', '/D', 'SINGLE_PRECISION', '/D', 'MTS_SSE', '/D', 'MTS_HAS_COHERENT_RT', '/D', '_CONSOLE', '/D', 'NDEBUG', '/Qopenmp']
SHCXXFLAGS = CXXFLAGS SHCXXFLAGS = CXXFLAGS
TARGET_ARCH = 'x86_64' TARGET_ARCH = 'x86_64'
MSVC_VERSION = '9.0' MSVC_VERSION = '10.0'
LINK = 'xilink' LINKFLAGS = ['/nologo', '/SUBSYSTEM:CONSOLE', '/MACHINE:X64', '/FIXED:NO', '/OPT:REF', '/OPT:ICF', '/LTCG', '/NODEFAULTLIB:LIBCMT', '/MANIFEST']
LINKFLAGS = ['/nologo', '/SUBSYSTEM:CONSOLE', '/MACHINE:X64', '/FIXED:NO', '/OPT:REF', '/OPT:ICF', '/NODEFAULTLIB:LIBCMT']
BASEINCLUDE = ['#include', '#dependencies/windows/include'] BASEINCLUDE = ['#include', '#dependencies/windows/include']
BASELIB = ['pthreadVCE2', 'msvcrt', 'ws2_32', 'libmmds'] BASELIB = ['pthreadVCE2', 'msvcrt', 'ws2_32']
QTDIR = 'C:\\Qt64'
OEXRINCLUDE = ['#dependencies/windows/include/OpenEXR'] OEXRINCLUDE = ['#dependencies/windows/include/OpenEXR']
OEXRFLAGS = ['/D', 'OPENEXR_DLL'] OEXRFLAGS = ['/D', 'OPENEXR_DLL']
OEXRLIB = ['IlmImf', 'IlmThread', 'zlib1', 'Half'] OEXRLIB = ['IlmImf', 'IlmThread', 'zlib1', 'Half']
BOOSTINCLUDE = ['#dependencies'] BOOSTINCLUDE = ['#dependencies']
BOOSTLIB = ['boost_system-vc90-mt-1_44', 'boost_filesystem-vc90-mt-1_44'] BOOSTLIB = ['boost_system-vc100-mt-1_44', 'boost_filesystem-vc100-mt-1_44']
COLLADAINCLUDE = ['#dependencies/windows/include/colladadom', '#dependencies/windows/include/colladadom/1.4'] COLLADAINCLUDE = ['#dependencies/windows/include/colladadom', '#dependencies/windows/include/colladadom/1.4']
COLLADALIB = ['libcollada14dom21'] COLLADALIB = ['libcollada14dom23']
XERCESLIB = ['xerces-c_3'] XERCESLIB = ['xerces-c_3']
PNGLIB = ['libpng13'] PNGLIB = ['libpng13']
JPEGLIB = ['jpeg62'] JPEGLIB = ['jpeg62']
GLLIB = ['opengl32', 'glu32', 'glew32mx', 'gdi32', 'user32'] GLLIB = ['opengl32', 'glu32', 'glew32mx', 'gdi32', 'user32']
GLFLAGS = ['/D', 'GLEW_MX'] GLFLAGS = ['/D', 'GLEW_MX']
BASELIBDIR = ['#dependencies/windows/lib64', '#dependencies/windows/lib64/vc90'] BASELIBDIR = ['#dependencies/windows/lib64', '#dependencies/windows/lib64/vc100']
SHLIBPREFIX = 'lib' SHLIBPREFIX = 'lib'
SHLIBSUFFIX = '.dll' SHLIBSUFFIX = '.dll'
PROGSUFFIX = '.exe' PROGSUFFIX = '.exe'

View File

@ -1,5 +1,6 @@
BUILDDIR = '#build/debug' BUILDDIR = '#build/debug'
CXX = 'g++' CXX = 'g++'
CC = 'gcc'
CXXFLAGS = ['-O0', '-Wall', '-g', '-pipe', '-march=nocona', '-msse2', '-ftree-vectorize', '-mfpmath=sse', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fomit-frame-pointer', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp'] CXXFLAGS = ['-O0', '-Wall', '-g', '-pipe', '-march=nocona', '-msse2', '-ftree-vectorize', '-mfpmath=sse', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fomit-frame-pointer', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp']
LINKFLAGS = [] LINKFLAGS = []
SHLINKFLAGS = ['-rdynamic', '-shared', '-fPIC'] SHLINKFLAGS = ['-rdynamic', '-shared', '-fPIC']

View File

@ -1,5 +1,6 @@
BUILDDIR = '#build/release' BUILDDIR = '#build/release'
CXX = 'g++' CXX = 'g++'
CC = 'gcc'
CXXFLAGS = ['-O3', '-Wall', '-g', '-pipe', '-march=nocona', '-msse2', '-ftree-vectorize', '-mfpmath=sse', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fomit-frame-pointer', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp'] CXXFLAGS = ['-O3', '-Wall', '-g', '-pipe', '-march=nocona', '-msse2', '-ftree-vectorize', '-mfpmath=sse', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fomit-frame-pointer', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp']
LINKFLAGS = [] LINKFLAGS = []
SHLINKFLAGS = ['-rdynamic', '-shared', '-fPIC'] SHLINKFLAGS = ['-rdynamic', '-shared', '-fPIC']

View File

@ -1,6 +1,6 @@
BUILDDIR = '#build/debug' BUILDDIR = '#build/debug'
CXX = 'cl' CXX = 'cl'
GCC = 'cl' CC = 'cl'
# /Ox=optimize for speed, global optimizations, intrinsic functions, favor fast code, frame pointer omission # /Ox=optimize for speed, global optimizations, intrinsic functions, favor fast code, frame pointer omission
# /EHsc=C++ exceptions, /fp:fast=Enable reasonable FP optimizations, /GS-=No buffer security checks, /GL=whole program optimizations # /EHsc=C++ exceptions, /fp:fast=Enable reasonable FP optimizations, /GS-=No buffer security checks, /GL=whole program optimizations
# To include debug information add '/Z7' to CXXFLAGS and '/DEBUG' to LINKFLAGS # To include debug information add '/Z7' to CXXFLAGS and '/DEBUG' to LINKFLAGS

View File

@ -1,6 +1,6 @@
BUILDDIR = '#build/release' BUILDDIR = '#build/release'
CXX = 'cl' CXX = 'cl'
GCC = 'cl' CC = 'cl'
# /Ox=optimize for speed, global optimizations, intrinsic functions, favor fast code, frame pointer omission # /Ox=optimize for speed, global optimizations, intrinsic functions, favor fast code, frame pointer omission
# /EHsc=C++ exceptions, /fp:fast=Enable reasonable FP optimizations, /GS-=No buffer security checks, /GL=whole program optimizations # /EHsc=C++ exceptions, /fp:fast=Enable reasonable FP optimizations, /GS-=No buffer security checks, /GL=whole program optimizations
# To include debug information add '/Z7' to CXXFLAGS and '/DEBUG' to LINKFLAGS # To include debug information add '/Z7' to CXXFLAGS and '/DEBUG' to LINKFLAGS

View File

@ -1,6 +1,6 @@
BUILDDIR = '#build/debug' BUILDDIR = '#build/debug'
CXX = 'cl' CXX = 'cl'
GCC = 'cl' CC = 'cl'
# /Ox=optimize for speed, global optimizations, intrinsic functions, favor fast code, frame pointer omission # /Ox=optimize for speed, global optimizations, intrinsic functions, favor fast code, frame pointer omission
# /EHsc=C++ exceptions, /fp:fast=Enable reasonable FP optimizations, /GS-=No buffer security checks, /GL=whole program optimizations # /EHsc=C++ exceptions, /fp:fast=Enable reasonable FP optimizations, /GS-=No buffer security checks, /GL=whole program optimizations
# To include debug information add '/Z7' to CXXFLAGS and '/DEBUG' to LINKFLAGS # To include debug information add '/Z7' to CXXFLAGS and '/DEBUG' to LINKFLAGS

View File

@ -1,6 +1,6 @@
BUILDDIR = '#build/release' BUILDDIR = '#build/release'
CXX = 'cl' CXX = 'cl'
GCC = 'cl' CC = 'cl'
# /Ox=optimize for speed, global optimizations, intrinsic functions, favor fast code, frame pointer omission # /Ox=optimize for speed, global optimizations, intrinsic functions, favor fast code, frame pointer omission
# /EHsc=C++ exceptions, /fp:fast=Enable reasonable FP optimizations, /GS-=No buffer security checks, /GL=whole program optimizations # /EHsc=C++ exceptions, /fp:fast=Enable reasonable FP optimizations, /GS-=No buffer security checks, /GL=whole program optimizations
# To include debug information add '/Z7' to CXXFLAGS and '/DEBUG' to LINKFLAGS # To include debug information add '/Z7' to CXXFLAGS and '/DEBUG' to LINKFLAGS

View File

@ -1,6 +1,6 @@
BUILDDIR = '#build/debug' BUILDDIR = '#build/debug'
CXX = 'cl' CXX = 'cl'
GCC = 'cl' CC = 'cl'
# /Ox=optimize for speed, global optimizations, intrinsic functions, favor fast code, frame pointer omission # /Ox=optimize for speed, global optimizations, intrinsic functions, favor fast code, frame pointer omission
# /EHsc=C++ exceptions, /fp:fast=Enable reasonable FP optimizations, /GS-=No buffer security checks, /GL=whole program optimizations # /EHsc=C++ exceptions, /fp:fast=Enable reasonable FP optimizations, /GS-=No buffer security checks, /GL=whole program optimizations
# To include debug information add '/Z7' to CXXFLAGS and '/DEBUG' to LINKFLAGS # To include debug information add '/Z7' to CXXFLAGS and '/DEBUG' to LINKFLAGS

View File

@ -1,6 +1,6 @@
BUILDDIR = '#build/release' BUILDDIR = '#build/release'
CXX = 'cl' CXX = 'cl'
GCC = 'cl' CC = 'cl'
# /Ox=optimize for speed, global optimizations, intrinsic functions, favor fast code, frame pointer omission # /Ox=optimize for speed, global optimizations, intrinsic functions, favor fast code, frame pointer omission
# /EHsc=C++ exceptions, /fp:fast=Enable reasonable FP optimizations, /GS-=No buffer security checks, /GL=whole program optimizations # /EHsc=C++ exceptions, /fp:fast=Enable reasonable FP optimizations, /GS-=No buffer security checks, /GL=whole program optimizations
# To include debug information add '/Z7' to CXXFLAGS and '/DEBUG' to LINKFLAGS # To include debug information add '/Z7' to CXXFLAGS and '/DEBUG' to LINKFLAGS

View File

@ -1,6 +1,6 @@
BUILDDIR = '#build/debug' BUILDDIR = '#build/debug'
CXX = 'cl' CXX = 'cl'
GCC = 'cl' CC = 'cl'
# /Ox=optimize for speed, global optimizations, intrinsic functions, favor fast code, frame pointer omission # /Ox=optimize for speed, global optimizations, intrinsic functions, favor fast code, frame pointer omission
# /EHsc=C++ exceptions, /fp:fast=Enable reasonable FP optimizations, /GS-=No buffer security checks, /GL=whole program optimizations # /EHsc=C++ exceptions, /fp:fast=Enable reasonable FP optimizations, /GS-=No buffer security checks, /GL=whole program optimizations
# To include debug information add '/Z7' to CXXFLAGS and '/DEBUG' to LINKFLAGS # To include debug information add '/Z7' to CXXFLAGS and '/DEBUG' to LINKFLAGS

View File

@ -1,6 +1,6 @@
BUILDDIR = '#build/release' BUILDDIR = '#build/release'
CXX = 'cl' CXX = 'cl'
GCC = 'cl' CC = 'cl'
# /Ox=optimize for speed, global optimizations, intrinsic functions, favor fast code, frame pointer omission # /Ox=optimize for speed, global optimizations, intrinsic functions, favor fast code, frame pointer omission
# /EHsc=C++ exceptions, /fp:fast=Enable reasonable FP optimizations, /GS-=No buffer security checks, /GL=whole program optimizations # /EHsc=C++ exceptions, /fp:fast=Enable reasonable FP optimizations, /GS-=No buffer security checks, /GL=whole program optimizations
# To include debug information add '/Z7' to CXXFLAGS and '/DEBUG' to LINKFLAGS # To include debug information add '/Z7' to CXXFLAGS and '/DEBUG' to LINKFLAGS

115
data/scons/icl12.py Normal file
View File

@ -0,0 +1,115 @@
import os, sys, subprocess, copy, re
def get_output(script, args = None, shellenv = None):
if sys.platform == 'win32':
cmdLine = '"%s" %s & set' % (script, (args if args else ''))
shell = False
elif sys.platform.startswith('linux'):
cmdLine = 'source "%s" %s ; set' % (script, (args if args else ''))
shell = True
else:
raise Exception("Unsuported OS type: " + sys.platform)
popen = subprocess.Popen(cmdLine, shell=shell, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=shellenv)
# Use the .stdout and .stderr attributes directly because the
# .communicate() method uses the threading module on Windows
# and won't work under Pythons not built with threading.
stdout = popen.stdout.read()
if popen.wait() != 0:
raise IOError(popen.stderr.read())
output = stdout
return output
def parse_output(output, keep = None):
ret={} #this is the data we will return
## parse everything
reg=re.compile('(\\w*)=(.*)', re.I)
for line in output.splitlines():
m=reg.match(line)
if m:
if keep is not None:
#see if we need to filter out data
k=m.group(1)
if k in keep:
ret[k]=m.group(2)#.split(os.pathsep)
else:
# take everything
ret[m.group(1)]=m.group(2)#.split(os.pathsep)
#see if we need to filter out data
if keep is not None:
pass
return ret
def normalize_env(shellenv, keys):
"""Given a dictionary representing a shell environment, add the variables
from os.environ needed for the processing of .bat files; the keys are
controlled by the keys argument.
It also makes sure the environment values are correctly encoded.
Note: the environment is copied"""
normenv = {}
if shellenv:
if sys.platform=='win32':
for k in shellenv.keys():
normenv[k] = copy.deepcopy(shellenv[k]).encode('mbcs')
for k in keys:
if os.environ.has_key(k):
normenv[k] = os.environ[k]
return normenv
def get_script_env(env,script,args=None,vars=None):
'''
this function returns a dictionary of all the data we want to merge
or process in some other way.
'''
if sys.platform=='win32':
nenv = normalize_env(env['ENV'], ['COMSPEC'])
else:
nenv = normalize_env(env['ENV'], [])
output = get_output(script,args,nenv)
vars = parse_output(output, vars)
return vars
def merge_script_vars(env,script,args=None,vars=None):
'''
This merges the data retieved from the script in to the Enviroment
by prepending it.
script is the name of the script, args is optional arguments to pass
vars are var we want to retrieve, if None it will retieve everything found
'''
shell_env=get_script_env(env,script,args,vars)
for k, v in shell_env.iteritems():
env.PrependENVPath(k, v, delete_existing=1)
def generate(env):
if env['TARGET_ARCH'] == 'x86':
arch = 'ia32'
elif env['TARGET_ARCH'] == 'x86_64':
arch = 'ia32_intel64'
else:
raise Exception('Unknown architecture!')
if env['MSVC_VERSION'] == '9.0':
vsrelease = 'vs2008'
elif env['MSVC_VERSION'] == '10.0':
vsrelease = 'vs2010'
else:
raise Exception('Unknown version of visual studio!')
icpp_path = os.environ.get('ICPP_COMPOSER2011')
merge_script_vars(env, os.path.join(icpp_path, 'bin/iclvars.bat'), arch + ' ' + vsrelease)
def exists(env):
return 'ICPP_COMPOSER2011' in os.environ

View File

@ -25,12 +25,12 @@ build/config-linux.py
build/config-darwin-x86_64.py build/config-darwin-x86_64.py
build/config-darwin-x86.py build/config-darwin-x86.py
build/config-darwin-universal.py build/config-darwin-universal.py
build/config-icl11-win32.py
build/config-icl11-win64.py
build/config-msvc2008-win32.py build/config-msvc2008-win32.py
build/config-msvc2008-win64.py build/config-msvc2008-win64.py
build/config-msvc2010-win32.py build/config-msvc2010-win32.py
build/config-msvc2010-win64.py build/config-msvc2010-win64.py
build/config-icl12-msvc2010-win32.py
build/config-icl12-msvc2010-win64.py
\end{shell} \end{shell}
Usually, you will not have to make any modification to this fine, but sometimes a few minor Usually, you will not have to make any modification to this fine, but sometimes a few minor