diff --git a/.gitmodules b/.gitmodules index b76996fce..f6efec68b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ -[submodule "ext/cppformat"] - path = ext/cppformat - url = https://github.com/cppformat/cppformat.git +[submodule "ext/fmt"] + path = ext/fmt + url = https://github.com/fmtlib/fmt.git [submodule "ext/googletest"] path = ext/googletest url = https://github.com/google/googletest.git diff --git a/SConstruct b/SConstruct index 084e349f1..d5fc864b3 100644 --- a/SConstruct +++ b/SConstruct @@ -732,20 +732,20 @@ def config_error(message): if not conf.CheckCXXHeader('cmath', '<>'): config_error('The C++ compiler is not correctly configured.') -# Check for cppformat and checkout submodule if needed -if not os.path.exists('ext/cppformat/format.h'): +# Check for fmt library and checkout submodule if needed +if not os.path.exists('ext/fmt/fmt/format.h'): if not os.path.exists('.git'): - config_error('Cppformat is missing. Install source in ext/cppformat.') + config_error('fmt is missing. Install source in ext/fmt.') try: code = subprocess.call(['git','submodule','update','--init', - '--recursive','ext/cppformat']) + '--recursive','ext/fmt']) except Exception: code = -1 if code: - config_error('Cppformat submodule checkout failed.\n' + config_error('fmt submodule checkout failed.\n' 'Try manually checking out the submodule with:\n\n' - ' git submodule update --init --recursive ext/cppformat\n') + ' git submodule update --init --recursive ext/fmt\n') # Check for googletest and checkout submodule if needed if env['system_googletest'] in ('y', 'default'): diff --git a/ext/SConscript b/ext/SConscript index 1ca3ab333..1354fa501 100644 --- a/ext/SConscript +++ b/ext/SConscript @@ -41,16 +41,16 @@ def prep_gtest(env): CPPDEFINES={'GTEST_HAS_PTHREAD': 0}) return localenv -def prep_cppformat(env): +def prep_fmt(env): localenv = prep_default(env) build(localenv.Command("#include/cantera/ext/format.h", - "#ext/cppformat/format.h", + "#ext/fmt/fmt/format.h", Copy('$TARGET', '$SOURCE'))) return localenv # each element of libs is: (subdir, (file extensions), prepfunction) libs = [('libexecstream', ['cpp'], prep_default), - ('cppformat', ['cc'], prep_cppformat)] + ('fmt/fmt', ['cc'], prep_fmt)] if env['build_with_f2c']: libs.append(('f2c_math', ['cpp','c'], prep_f2c)) diff --git a/ext/cppformat b/ext/cppformat deleted file mode 160000 index 0b097da31..000000000 --- a/ext/cppformat +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0b097da31eae1642dd8132f2996e74f7fe354e46 diff --git a/ext/fmt b/ext/fmt new file mode 160000 index 000000000..404219826 --- /dev/null +++ b/ext/fmt @@ -0,0 +1 @@ +Subproject commit 404219826238b50c8a56e97aa5f513a97ec6b86b diff --git a/include/cantera/base/global.h b/include/cantera/base/global.h index 4734e7713..207a48aac 100644 --- a/include/cantera/base/global.h +++ b/include/cantera/base/global.h @@ -161,7 +161,7 @@ inline void debuglog(const std::string& msg, int loglevel) } //! @copydoc Application::Messages::writelog(const std::string&) -//! This function passes its arguments to the cppformat 'format' function to +//! This function passes its arguments to the fmt library 'format' function to //! generate a formatted string from a Python-style (curly braces) format //! string. template