aboutsummaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
Diffstat (limited to 'support')
-rw-r--r--support/README2
-rw-r--r--support/Vagrantfile1
-rw-r--r--support/cmake/JoinPaths.cmake26
-rw-r--r--support/cmake/cxx14.cmake11
-rw-r--r--support/cmake/fmt.pc.in6
-rw-r--r--support/fmt.pro27
-rwxr-xr-xsupport/manage.py31
-rwxr-xr-xsupport/update-coverity-branch.py30
8 files changed, 58 insertions, 76 deletions
diff --git a/support/README b/support/README
index e7fbacc7..468f5485 100644
--- a/support/README
+++ b/support/README
@@ -2,5 +2,3 @@ This directory contains build support files such as
* CMake modules
* Build scripts
-* qmake (static build with dynamic libc only)
-
diff --git a/support/Vagrantfile b/support/Vagrantfile
index 24f166a1..f6b5f936 100644
--- a/support/Vagrantfile
+++ b/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/support/cmake/JoinPaths.cmake b/support/cmake/JoinPaths.cmake
new file mode 100644
index 00000000..32d6d668
--- /dev/null
+++ b/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/support/cmake/cxx14.cmake b/support/cmake/cxx14.cmake
index 032fcb27..16ff5754 100644
--- a/support/cmake/cxx14.cmake
+++ b/support/cmake/cxx14.cmake
@@ -48,17 +48,6 @@ endif ()
set(CMAKE_REQUIRED_FLAGS ${CXX_STANDARD_FLAG})
-# Check if variadic templates are working and not affected by GCC bug 39653:
-# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39653
-# Can be removed once gcc 4.4 support is dropped.
-check_cxx_source_compiles("
- template <class T, class ...Types>
- struct S { typedef typename S<Types...>::type type; };
- int main() {}" SUPPORTS_VARIADIC_TEMPLATES)
-if (NOT SUPPORTS_VARIADIC_TEMPLATES)
- set (SUPPORTS_VARIADIC_TEMPLATES OFF)
-endif ()
-
# Check if user-defined literals are available
check_cxx_source_compiles("
void operator\"\" _udl(long double);
diff --git a/support/cmake/fmt.pc.in b/support/cmake/fmt.pc.in
index e935dc78..29976a8a 100644
--- a/support/cmake/fmt.pc.in
+++ b/support/cmake/fmt.pc.in
@@ -1,11 +1,11 @@
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
Version: @FMT_VERSION@
-Libs: -L${libdir} -lfmt
+Libs: -L${libdir} -l@FMT_LIB_NAME@
Cflags: -I${includedir}
diff --git a/support/fmt.pro b/support/fmt.pro
deleted file mode 100644
index c555d0b4..00000000
--- a/support/fmt.pro
+++ /dev/null
@@ -1,27 +0,0 @@
-# Staticlib configuration for qmake builds
-# For some reason qmake 3.1 fails to identify source dependencies and excludes format.cc and printf.cc
-# from compilation so it _MUST_ be called as qmake -nodepend
-# A workaround is implemented below: a custom compiler is defined which does not track dependencies
-
-TEMPLATE = lib
-
-TARGET = fmt
-
-QMAKE_EXT_CPP = .cc
-
-CONFIG = staticlib warn_on c++11
-
-FMT_SOURCES = \
- ../src/format.cc \
- ../src/posix.cc
-
-fmt.name = libfmt
-fmt.input = FMT_SOURCES
-fmt.output = ${QMAKE_FILE_BASE}$$QMAKE_EXT_OBJ
-fmt.clean = ${QMAKE_FILE_BASE}$$QMAKE_EXT_OBJ
-fmt.depends = ${QMAKE_FILE_IN}
-# QMAKE_RUN_CXX will not be expanded
-fmt.commands = $$QMAKE_CXX -c $$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_WARN_ON $$QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO $$QMAKE_CXXFLAGS_CXX11 ${QMAKE_FILE_IN}
-fmt.variable_out = OBJECTS
-fmt.CONFIG = no_dependencies no_link
-QMAKE_EXTRA_COMPILERS += fmt
diff --git a/support/manage.py b/support/manage.py
index e39beff1..9f270669 100755
--- a/support/manage.py
+++ b/support/manage.py
@@ -137,15 +137,40 @@ def update_site(env):
if not os.path.exists(contents):
os.rename(os.path.join(target_doc_dir, 'index.rst'), contents)
# Fix issues in reference.rst/api.rst.
- for filename in ['reference.rst', 'api.rst']:
+ for filename in ['reference.rst', 'api.rst', 'index.rst']:
pattern = re.compile('doxygenfunction.. (bin|oct|hexu|hex)$', re.M)
with rewrite(os.path.join(target_doc_dir, filename)) as b:
b.data = b.data.replace('std::ostream &', 'std::ostream&')
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:
diff --git a/support/update-coverity-branch.py b/support/update-coverity-branch.py
deleted file mode 100755
index 519f5d00..00000000
--- a/support/update-coverity-branch.py
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/env python
-# Update the coverity branch from the master branch.
-# It is not done automatically because Coverity Scan limits
-# the number of submissions per day.
-
-from __future__ import print_function
-import shutil, tempfile
-from subprocess import check_output, STDOUT
-
-class Git:
- def __init__(self, dir):
- self.dir = dir
-
- def __call__(self, *args):
- output = check_output(['git'] + list(args), cwd=self.dir, stderr=STDOUT)
- print(output)
- return output
-
-dir = tempfile.mkdtemp()
-try:
- git = Git(dir)
- git('clone', '-b', 'coverity', 'git@github.com:fmtlib/fmt.git', dir)
- output = git('merge', '-X', 'theirs', '--no-commit', 'origin/master')
- if 'Fast-forward' not in output:
- git('reset', 'HEAD', '.travis.yml')
- git('checkout', '--', '.travis.yml')
- git('commit', '-m', 'Update coverity branch')
- git('push')
-finally:
- shutil.rmtree(dir)