Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some compilation issues and bump to 2.5.0rc1 #973

Merged
merged 6 commits into from
Feb 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ possible.
Development Site
================

The current development version is 2.5.0b1. The current stable version is
The current development version is 2.5.0rc1. The current stable version is
2.4.0. The `latest Cantera source code <https://github.com/Cantera/cantera>`_,
the `issue tracker <https://github.com/Cantera/cantera/issues>`_ for bugs and
enhancement requests, `downloads of Cantera releases and binary installers
Expand Down
2 changes: 1 addition & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ for arg in ARGUMENTS:
print('Encountered unexpected command line argument: %r' % arg)
sys.exit(1)

env['cantera_version'] = "2.5.0b1"
env['cantera_version'] = "2.5.0rc1"
# For use where pre-release tags are not permitted (MSI, sonames)
env['cantera_pure_version'] = re.match(r'(\d+\.\d+\.\d+)', env['cantera_version']).group(0)
env['cantera_short_version'] = re.match(r'(\d+\.\d+)', env['cantera_version']).group(0)
Expand Down
2 changes: 1 addition & 1 deletion doc/doxygen/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ PROJECT_NAME = Cantera
# This could be handy for archiving the generated documentation or
# if some version control system is used.

PROJECT_NUMBER = 2.5.0b1
PROJECT_NUMBER = 2.5.0rc1

# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
Expand Down
6 changes: 4 additions & 2 deletions ext/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ if env['system_sundials'] == 'n':
'#ext/sundials/include/%s/%s' % (subdir, header.name),
Copy('$TARGET', '$SOURCE')))

# Compile Sundials source files
# Compile Sundials source files. Skip files related to the Sundials Fortran
# interface, which start with 'fsun'.
subdirs = ['sundials', 'nvector/serial', 'cvodes', 'ida', 'sunmatrix/band',
'sunmatrix/dense', 'sunmatrix/sparse', 'sunlinsol/dense',
'sunlinsol/band','sunlinsol/spgmr', 'sunnonlinsol/newton']
Expand All @@ -82,7 +83,8 @@ if env['system_sundials'] == 'n':

for subdir in subdirs:
libraryTargets.extend(localenv.SharedObject(
[f for f in mglob(localenv, 'sundials/src/'+subdir, 'c')]))
[f for f in mglob(localenv, 'sundials/src/'+subdir, 'c')
if not f.name.startswith('fsun')]))

if not env['system_yamlcpp']:
localenv = prep_default(env)
Expand Down
6 changes: 3 additions & 3 deletions include/cantera/base/fmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
#define FMT_HEADER_ONLY

//! Versions 6.2.0 and 6.2.1 of fmtlib do not include this define before they
//! include windows.h, breaking builds on Windows. As of May 23, 2020 the fix
//! is committed to the master branch of fmtlib but hasn't been released.
#ifdef _WIN32
//! include windows.h, breaking builds on Windows. Fixed in fmtlib 7.0.0 and
//! newer. https://github.com/fmtlib/fmt/pull/1616
#if defined(_WIN32) && !defined(NOMINMAX)
#define NOMINMAX
#endif
#if CT_USE_SYSTEM_FMT
Expand Down
17 changes: 8 additions & 9 deletions interfaces/cython/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,16 @@ info = getCommandOutput(localenv['python_cmd'], '-c', script)
module_ext, inc, pylib, prefix, py_version, numpy_include = info.splitlines()[-6:]
localenv.Prepend(CPPPATH=[Dir('#include'), inc, numpy_include])
localenv.Prepend(LIBS=localenv['cantera_libs'])

# Don't print deprecation warnings for internal Python changes.
# Only applies to Python 3.8. The field that is deprecated in Python 3.8
# and causes the warnings to appear will be removed in Python 3.9 so no
# further warnings should be issued.
if localenv['HAS_CLANG'] and parse_version(py_version) == parse_version('3.8'):
localenv.Append(CXXFLAGS='-Wno-deprecated-declarations')

if localenv['OS'] == 'Darwin':
localenv.Append(LINKFLAGS='-undefined dynamic_lookup')

# Don't print deprecation warnings for internal Python changes.
# It seems that only clang on macOS prints these deprecation warnings.
# Only applies to Python 3.8. The field that is deprecated in Python 3.8
# and causes the warnings to appear will be removed in Python 3.9 so no
# further warnings should be issued. Cython has already implemented a fix
# in versions higher than 0.29.14.
if py_version == parse_version("3.8"):
localenv.Append(CXXFLAGS='-Wno-deprecated-declarations')
elif localenv['OS'] == 'Windows':
localenv.Append(LIBPATH=prefix+'/libs')
if localenv['toolchain'] == 'mingw':
Expand Down
2 changes: 1 addition & 1 deletion interfaces/cython/cantera/ck2yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -1898,7 +1898,7 @@ def write_yaml(self, name='gas', out_name='mech.yaml'):
metadata = BlockMap([
('generator', 'ck2yaml'),
('input-files', FlowList(files)),
('cantera-version', '2.5.0b1'),
('cantera-version', '2.5.0rc1'),
('date', formatdate(localtime=True)),
])
if desc.strip():
Expand Down
2 changes: 1 addition & 1 deletion interfaces/cython/cantera/cti2yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -1640,7 +1640,7 @@ def convert(filename=None, output_name=None, text=None):
# information regarding conversion
metadata = BlockMap([
('generator', 'cti2yaml'),
('cantera-version', '2.5.0b1'),
('cantera-version', '2.5.0rc1'),
('date', formatdate(localtime=True)),
])
if filename is not None:
Expand Down
2 changes: 1 addition & 1 deletion interfaces/cython/cantera/ctml2yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -2620,7 +2620,7 @@ def convert(
metadata = BlockMap(
{
"generator": "ctml2yaml",
"cantera-version": "2.5.0b1",
"cantera-version": "2.5.0rc1",
"date": formatdate(localtime=True),
}
)
Expand Down
4 changes: 2 additions & 2 deletions samples/f77/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ localenv['mak_stdlib'] = ['-l' + lib for lib in env['cxx_stdlib']]
samples = [('ctlib', ['ctlib.f']),
('isentropic', ['isentropic.f'])]

ftn_demo = localenv.Object('demo_ftnlib.cpp',
CPPPATH=['#include', localenv['boost_inc_dir'],
ftn_demo = localenv.SharedObject('demo_ftnlib.cpp',
CPPPATH=['#include', localenv['boost_inc_dir'],
localenv['extra_inc_dirs']])
for program_name, fortran_sources in samples:
buildSample(localenv.Program, program_name,
Expand Down
2 changes: 1 addition & 1 deletion samples/f77/SConstruct.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env.Append(FFLAGS='-g',
LINKFLAGS=@tmpl_cantera_linkflags@,
FRAMEWORKS=@tmpl_cantera_frameworks@)

ctlib = env.Object('demo_ftnlib.cpp')
ctlib = env.SharedObject('demo_ftnlib.cpp')

demo = env.Program('demo', [ctlib, 'demo.f'],
LINK='@FORTRAN_LINK@')
Expand Down
2 changes: 1 addition & 1 deletion src/base/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ static std::mutex xml_mutex;

int get_modified_time(const std::string& path) {
#ifdef _WIN32
HANDLE hFile = CreateFile(path.c_str(), NULL, NULL,
HANDLE hFile = CreateFile(path.c_str(), 0, 0,
NULL, OPEN_EXISTING, 0, NULL);
if (hFile == INVALID_HANDLE_VALUE) {
throw CanteraError("get_modified_time", "Couldn't open file:" + path);
Expand Down