Fixes to get the Matlab toolbox compiling in Windows

This commit is contained in:
Ray Speth 2012-01-09 17:30:39 +00:00
parent a5f865439e
commit b6f80caadf
2 changed files with 9 additions and 1 deletions

View file

@ -39,6 +39,8 @@ localenv.Command('build_cantera.m',
MatlabBuilder(libs))
localenv['ENV']['PATH'] = os.environ['PATH']
if 'TEMP' in os.environ:
localenv['ENV']['TEMP'] = os.environ['TEMP']
build_cmd = 'cd ${SOURCE.dir} && "%(matlab_cmd)s" -nojvm -nosplash -r build_cantera'
@ -47,6 +49,10 @@ if os.name == 'posix':
mexFile = 'cantera/ctmethods.mexa%i' % localenv['OS_BITS']
elif os.name == 'nt':
mexFile = 'cantera/ctmethods.mexw%i' % localenv['OS_BITS']
if localenv['OS_BITS'] == 64:
localenv['ENV']['PROCESSOR_ARCHITECTURE'] = "AMD64"
else:
localenv['ENV']['PROCESSOR_ARCHITECTURE'] = "x86"
target = localenv.Command(mexFile,
'build_cantera.m',

View file

@ -194,7 +194,9 @@ opts.AddVariables(
'default', ('y', 'n', 'default')),
PathVariable(
'matlab_cmd',
'Path to the Matlab executable.',
"""Path to the Matlab executable. In Windows, this is probably
something like "C:/Program Files/MATLAB/R2009a/bin/win64/MATLAB.exe"
""",
'matlab', PathVariable.PathAccept),
EnumVariable(
'f90_interface',