cleanup
This commit is contained in:
parent
1ae73ae1c5
commit
2959b2735e
9 changed files with 46 additions and 4 deletions
|
|
@ -48,4 +48,9 @@ namespace Cantera {
|
|||
cerr << msg << endl;
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
int userInterface() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,13 @@ end
|
|||
iok = system([prog,' -i ',infile,' -t ',thermo,' -tr ',transport, ...
|
||||
' -id ',idtag,' > ',outfile]);
|
||||
if iok
|
||||
error(['Error occurred while running ck2cti. Check file ck2cti.log' ...
|
||||
ierr2 = system([prog,' > log'])
|
||||
if ierr2
|
||||
error(['Program ck2cti is not found at ',prog,['. Edit file' ...
|
||||
[' ctbin.m to point to the Cantera bin directory.']]])
|
||||
else
|
||||
error(['Error occurred while running ck2cti. Check file ck2cti.log' ...
|
||||
' for error messages.']);
|
||||
end
|
||||
end
|
||||
f = outfile;
|
||||
|
|
|
|||
|
|
@ -27,5 +27,9 @@ namespace Cantera {
|
|||
std::string err = "error("+msg+");";
|
||||
mexEvalString(err.c_str());
|
||||
}
|
||||
|
||||
int userInterface() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,4 +26,8 @@ namespace Cantera {
|
|||
string err = "raise \""+msg+"\"";
|
||||
PyRun_SimpleString((char *)err.c_str());
|
||||
}
|
||||
|
||||
int userInterface() {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,6 +95,8 @@ namespace Cantera {
|
|||
/// version calls Matlab function error().
|
||||
void error(const string& msg);
|
||||
|
||||
/// returns 1 for MATLAB, 2 for Python, and 0 for C++ or Fortran.
|
||||
int userInterface();
|
||||
|
||||
/**
|
||||
* Return the conversion factor to convert unit string 'unit' to
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ ct = $(export_dir)/cantera-$(version)
|
|||
build_ck = @BUILD_CK@
|
||||
build_clib = @BUILD_CLIB@
|
||||
build_python = @BUILD_PYTHON@
|
||||
build_f90 = @BUILD_F90@
|
||||
build_matlab = @BUILD_MATLAB@
|
||||
build_particles = @BUILD_PARTICLES@
|
||||
os_is_win = @OS_IS_WIN@
|
||||
|
|
@ -65,7 +66,11 @@ ifeq ($(do_ranlib),1)
|
|||
endif
|
||||
|
||||
fortran:
|
||||
ifeq ($(build_f90),1)
|
||||
cd Cantera/fortran/src; @MAKE@
|
||||
else
|
||||
@echo skipping building the Fortran 90/95 interface
|
||||
endif
|
||||
|
||||
cxxlib:
|
||||
cd Cantera/cxx/src; @MAKE@
|
||||
|
|
|
|||
10
config/configure
vendored
10
config/configure
vendored
|
|
@ -1775,7 +1775,7 @@ fi
|
|||
|
||||
|
||||
BUILD_F90=0
|
||||
if test "$BUILD_F90_INTERFACE" != "n"; then
|
||||
if test "x$BUILD_F90_INTERFACE" = "xy"; then
|
||||
BUILD_F90=1
|
||||
fi
|
||||
|
||||
|
|
@ -3915,7 +3915,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
|||
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files ../Cantera/Makefile ../Cantera/src/Makefile ../Cantera/src/zeroD/Makefile ../Cantera/src/oneD/Makefile ../Cantera/src/converters/Makefile ../Cantera/src/transport/Makefile ../Cantera/clib/src/Makefile ../Cantera/fortran/src/Makefile ../Cantera/fortran/f77demos/f77demos.mak ../Cantera/fortran/f77demos/isentropic.dsp ../Cantera/matlab/Makefile ../Cantera/matlab/setup_matlab.py ../Cantera/matlab/setup_winmatlab.py ../Cantera/python/Makefile ../Cantera/python/setup.py ../Cantera/cxx/Makefile ../Cantera/cxx/src/Makefile ../Cantera/cxx/demos/Makefile ../Cantera/user/Makefile ../Cantera/python/src/Makefile ../ext/lapack/Makefile ../ext/blas/Makefile ../ext/cvode/Makefile ../ext/math/Makefile ../ext/tpx/Makefile ../ext/Makefile ../ext/recipes/Makefile ../examples/Makefile ../examples/cxx/Makefile ../Makefile ../tools/Makefile ../tools/src/Makefile ../tools/src/sample.mak ../tools/src/finish_install.py ../tools/src/package4mac ../tools/templates/f77/demo.mak ../tools/templates/cxx/demo.mak ../tools/testtools/Makefile ../data/inputs/Makefile ../test_problems/Makefile ../test_problems/cxx_ex/Makefile ../test_problems/silane_equil/Makefile ../test_problems/surfkin/Makefile ../test_problems/diamondSurf/Makefile"
|
||||
ac_config_files="$ac_config_files ../Cantera/Makefile ../Cantera/src/Makefile ../Cantera/src/zeroD/Makefile ../Cantera/src/oneD/Makefile ../Cantera/src/converters/Makefile ../Cantera/src/transport/Makefile ../Cantera/clib/src/Makefile ../Cantera/fortran/src/Makefile ../Cantera/fortran/f77demos/f77demos.mak ../Cantera/fortran/f77demos/isentropic.dsp ../Cantera/matlab/Makefile ../Cantera/matlab/setup_matlab.py ../Cantera/matlab/setup_winmatlab.py ../Cantera/python/Makefile ../Cantera/python/setup.py ../Cantera/cxx/Makefile ../Cantera/cxx/src/Makefile ../Cantera/cxx/demos/Makefile ../Cantera/user/Makefile ../Cantera/python/src/Makefile ../ext/lapack/Makefile ../ext/blas/Makefile ../ext/cvode/Makefile ../ext/math/Makefile ../ext/tpx/Makefile ../ext/Makefile ../ext/recipes/Makefile ../examples/Makefile ../examples/cxx/Makefile ../Makefile ../tools/Makefile ../tools/src/Makefile ../tools/src/sample.mak ../tools/src/finish_install.py ../tools/src/package4mac ../tools/templates/f77/demo.mak ../tools/templates/cxx/demo.mak ../tools/testtools/Makefile ../data/inputs/Makefile ../test_problems/Makefile ../test_problems/cxx_ex/Makefile ../test_problems/silane_equil/Makefile ../test_problems/surfkin/Makefile ../test_problems/diamondSurf/Makefile ../test_problems/ck2cti_test/runtest ../test_problems/ck2cti_test/Makefile"
|
||||
|
||||
|
||||
test "x$prefix" = xNONE && prefix=$ac_default_prefix
|
||||
|
|
@ -4431,6 +4431,8 @@ do
|
|||
"../test_problems/silane_equil/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../test_problems/silane_equil/Makefile" ;;
|
||||
"../test_problems/surfkin/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../test_problems/surfkin/Makefile" ;;
|
||||
"../test_problems/diamondSurf/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../test_problems/diamondSurf/Makefile" ;;
|
||||
"../test_problems/ck2cti_test/runtest" ) CONFIG_FILES="$CONFIG_FILES ../test_problems/ck2cti_test/runtest" ;;
|
||||
"../test_problems/ck2cti_test/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../test_problems/ck2cti_test/Makefile" ;;
|
||||
"../config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ../config.h" ;;
|
||||
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
|
||||
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
|
||||
|
|
@ -5085,6 +5087,10 @@ fi
|
|||
if test "x${OS_IS_WIN}" = "x1"; then
|
||||
cp -f ../config.h ../Cantera/src
|
||||
fi
|
||||
if test -f "../test_problems/ck2cti_test/runtest"; then
|
||||
chmod +x ../test_problems/ck2cti_test/runtest
|
||||
fi
|
||||
|
||||
echo
|
||||
if test "x${OS_IS_WIN}" = "x0"; then
|
||||
echo "Now type '${MAKE}' to build Cantera"
|
||||
|
|
|
|||
|
|
@ -435,7 +435,7 @@ AC_SUBST(BUILD_PARTICLES)
|
|||
AC_SUBST(CT_SHARED_LIB)
|
||||
|
||||
BUILD_F90=0
|
||||
if test "$BUILD_F90_INTERFACE" != "n"; then
|
||||
if test "x$BUILD_F90_INTERFACE" = "xy"; then
|
||||
BUILD_F90=1
|
||||
fi
|
||||
AC_SUBST(BUILD_F90)
|
||||
|
|
|
|||
10
configure
vendored
10
configure
vendored
|
|
@ -109,6 +109,16 @@ PYTHON_SITE_PACKAGE_TOPDIR=${PYTHON_SITE_PACKAGE_TOPDIR:="/usr/local"}
|
|||
BUILD_MATLAB_TOOLBOX=${BUILD_MATLAB_TOOLBOX:="y"}
|
||||
|
||||
|
||||
|
||||
#----------- Fortran 90/95 --------------------------------------------------
|
||||
|
||||
# Set this to "y" if you want to build the Fortran 90/95 interface.
|
||||
# A Fortran 90/95 compiler is required.
|
||||
# UNDER DEVELOPMENT - UNSTABLE!!
|
||||
|
||||
BUILD_F90_INTERFACE=${BUILD_F90_INTERFACE:="n"}
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# Customizations / Extensions
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue