diff options
author | Lioncash <[email protected]> | 2020-09-19 14:25:26 -0400 |
---|---|---|
committer | Lioncash <[email protected]> | 2020-09-19 14:25:31 -0400 |
commit | 63802395c7f5afc8c40de85f11be98b861175686 (patch) | |
tree | 085a499b756ecff9f8c2df1865b7287c32f7b440 /externals/fmt/support | |
parent | 8a7a4cb672c483635ba5bfe3106ef232cc03200a (diff) | |
parent | d4c6fa3122636a22393f382090ca0ae7a1b82829 (diff) | |
download | dynarmic-63802395c7f5afc8c40de85f11be98b861175686.tar.gz dynarmic-63802395c7f5afc8c40de85f11be98b861175686.zip |
externals: Update fmt to v7.0.3
Keeps the library up to date.
Diffstat (limited to 'externals/fmt/support')
-rw-r--r-- | externals/fmt/support/Vagrantfile | 1 | ||||
-rw-r--r-- | externals/fmt/support/cmake/JoinPaths.cmake | 26 | ||||
-rw-r--r-- | externals/fmt/support/cmake/fmt.pc.in | 4 | ||||
-rwxr-xr-x | externals/fmt/support/manage.py | 28 |
4 files changed, 55 insertions, 4 deletions
diff --git a/externals/fmt/support/Vagrantfile b/externals/fmt/support/Vagrantfile index 24f166a1..f6b5f936 100644 --- a/externals/fmt/support/Vagrantfile +++ b/externals/fmt/support/Vagrantfile @@ -4,6 +4,7 @@ # A vagrant config for testing against gcc-4.8. Vagrant.configure("2") do |config| config.vm.box = "ubuntu/xenial64" + config.disksize.size = '15GB' config.vm.provider "virtualbox" do |vb| vb.memory = "4096" diff --git a/externals/fmt/support/cmake/JoinPaths.cmake b/externals/fmt/support/cmake/JoinPaths.cmake new file mode 100644 index 00000000..32d6d668 --- /dev/null +++ b/externals/fmt/support/cmake/JoinPaths.cmake @@ -0,0 +1,26 @@ +# This module provides function for joining paths +# known from from most languages +# +# Original license: +# SPDX-License-Identifier: (MIT OR CC0-1.0) +# Explicit permission given to distribute this module under +# the terms of the project as described in /LICENSE.rst. +# Copyright 2020 Jan Tojnar +# https://github.com/jtojnar/cmake-snips +# +# Modelled after Python’s os.path.join +# https://docs.python.org/3.7/library/os.path.html#os.path.join +# Windows not supported +function(join_paths joined_path first_path_segment) + set(temp_path "${first_path_segment}") + foreach(current_segment IN LISTS ARGN) + if(NOT ("${current_segment}" STREQUAL "")) + if(IS_ABSOLUTE "${current_segment}") + set(temp_path "${current_segment}") + else() + set(temp_path "${temp_path}/${current_segment}") + endif() + endif() + endforeach() + set(${joined_path} "${temp_path}" PARENT_SCOPE) +endfunction() diff --git a/externals/fmt/support/cmake/fmt.pc.in b/externals/fmt/support/cmake/fmt.pc.in index 4e030afd..29976a8a 100644 --- a/externals/fmt/support/cmake/fmt.pc.in +++ b/externals/fmt/support/cmake/fmt.pc.in @@ -1,7 +1,7 @@ prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=@CMAKE_INSTALL_PREFIX@ -libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ -includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ +libdir=@libdir_for_pc_file@ +includedir=@includedir_for_pc_file@ Name: fmt Description: A modern formatting library diff --git a/externals/fmt/support/manage.py b/externals/fmt/support/manage.py index 517759b3..9f270669 100755 --- a/externals/fmt/support/manage.py +++ b/externals/fmt/support/manage.py @@ -144,9 +144,33 @@ def update_site(env): b.data = re.sub(pattern, r'doxygenfunction:: \1(int)', b.data) b.data = b.data.replace('std::FILE*', 'std::FILE *') b.data = b.data.replace('unsigned int', 'unsigned') - b.data = b.data.replace('operator""_', 'operator"" _') - b.data = b.data.replace(', size_t', ', std::size_t') + #b.data = b.data.replace('operator""_', 'operator"" _') + b.data = b.data.replace( + 'format_to_n(OutputIt, size_t, string_view, Args&&', + 'format_to_n(OutputIt, size_t, const S&, const Args&') + b.data = b.data.replace( + 'format_to_n(OutputIt, std::size_t, string_view, Args&&', + 'format_to_n(OutputIt, std::size_t, const S&, const Args&') + if version == ('3.0.2'): + b.data = b.data.replace( + 'fprintf(std::ostream&', 'fprintf(std::ostream &') + if version == ('5.3.0'): + b.data = b.data.replace( + 'format_to(OutputIt, const S&, const Args&...)', + 'format_to(OutputIt, const S &, const Args &...)') + if version.startswith('5.') or version.startswith('6.'): + b.data = b.data.replace(', size_t', ', std::size_t') + if version.startswith('7.'): + b.data = b.data.replace(', std::size_t', ', size_t') + b.data = b.data.replace('join(It, It', 'join(It, Sentinel') b.data = b.data.replace('aa long', 'a long') + b.data = b.data.replace('serveral', 'several') + if version.startswith('6.2.'): + b.data = b.data.replace( + 'vformat(const S&, basic_format_args<' + + 'buffer_context<Char>>)', + 'vformat(const S&, basic_format_args<' + + 'buffer_context<type_identity_t<Char>>>)') # Fix a broken link in index.rst. index = os.path.join(target_doc_dir, 'index.rst') with rewrite(index) as b: |