Skip to content

Commit

Permalink
cantera: Modify build settings for Matlab toolbox
Browse files Browse the repository at this point in the history
  • Loading branch information
speth committed Jan 27, 2016
1 parent 6ed5b5e commit bf5faa7
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions cantera.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,27 @@ def install
"f90_interface=n"]

matlab_path = ARGV.value("with-matlab")
build_args << "matlab_path=" + matlab_path if matlab_path
if matlab_path
build_args << "matlab_path=" + matlab_path
# Matlab doesn't play nice with system Sundials installation
if build.head?
build_args << "system_sundials=n" # Cantera 2.3+
else
build_args << "use_sundials=n" # Cantera 2.2.x
end
end

build_args << "python3_package=" + (build.with?("python3") ? "y" : "n")

scons "build", *build_args
scons "test" if build.with? "check"
if build.with? "check"
if not matlab_path
scons "test"
else
# Matlab test stalls when run through Homebrew, so run other sub-tests explicitly
scons "test-general", "test-thermo", "test-kinetics", "test-transport", "test-python2"
end
end
scons "install"
end

Expand Down

0 comments on commit bf5faa7

Please sign in to comment.