mirror of https://github.com/gabime/spdlog.git
Merge branch 'v1.x' of https://github.com/gabime/spdlog into v1.x
commit
517ccc4088
@ -0,0 +1,13 @@
|
|||||||
|
benchmark = dependency('benchmark')
|
||||||
|
|
||||||
|
bench_matrix = [
|
||||||
|
['bench', [spdlog_dep], []],
|
||||||
|
['async_bench', [spdlog_dep], []],
|
||||||
|
['formatter-bench', [spdlog_dep, benchmark], ['all']],
|
||||||
|
['latency', [spdlog_dep, benchmark], []],
|
||||||
|
]
|
||||||
|
|
||||||
|
foreach i : bench_matrix
|
||||||
|
bench_exe = executable(i[0], i[0] + '.cpp', dependencies: i[1])
|
||||||
|
benchmark('bench_' + i[0], bench_exe, args: i[2])
|
||||||
|
endforeach
|
@ -1,82 +0,0 @@
|
|||||||
# This file will be configured to contain variables for CPack. These variables
|
|
||||||
# should be set in the CMake list file of the project before CPack module is
|
|
||||||
# included. The list of available CPACK_xxx variables and their associated
|
|
||||||
# documentation may be obtained using
|
|
||||||
# cpack --help-variable-list
|
|
||||||
#
|
|
||||||
# Some variables are common to all generators (e.g. CPACK_PACKAGE_NAME)
|
|
||||||
# and some are specific to a generator
|
|
||||||
# (e.g. CPACK_NSIS_EXTRA_INSTALL_COMMANDS). The generator specific variables
|
|
||||||
# usually begin with CPACK_<GENNAME>_xxxx.
|
|
||||||
|
|
||||||
|
|
||||||
SET(CPACK_BINARY_7Z "")
|
|
||||||
SET(CPACK_BINARY_BUNDLE "")
|
|
||||||
SET(CPACK_BINARY_CYGWIN "")
|
|
||||||
SET(CPACK_BINARY_DEB "")
|
|
||||||
SET(CPACK_BINARY_DRAGNDROP "")
|
|
||||||
SET(CPACK_BINARY_IFW "")
|
|
||||||
SET(CPACK_BINARY_NSIS "")
|
|
||||||
SET(CPACK_BINARY_OSXX11 "")
|
|
||||||
SET(CPACK_BINARY_PACKAGEMAKER "")
|
|
||||||
SET(CPACK_BINARY_RPM "")
|
|
||||||
SET(CPACK_BINARY_STGZ "")
|
|
||||||
SET(CPACK_BINARY_TBZ2 "")
|
|
||||||
SET(CPACK_BINARY_TGZ "")
|
|
||||||
SET(CPACK_BINARY_TXZ "")
|
|
||||||
SET(CPACK_BINARY_TZ "")
|
|
||||||
SET(CPACK_BINARY_WIX "")
|
|
||||||
SET(CPACK_BINARY_ZIP "")
|
|
||||||
SET(CPACK_CMAKE_GENERATOR "Unix Makefiles")
|
|
||||||
SET(CPACK_COMPONENT_UNSPECIFIED_HIDDEN "TRUE")
|
|
||||||
SET(CPACK_COMPONENT_UNSPECIFIED_REQUIRED "TRUE")
|
|
||||||
SET(CPACK_GENERATOR "TGZ;ZIP")
|
|
||||||
SET(CPACK_INCLUDE_TOPLEVEL_DIRECTORY "0")
|
|
||||||
SET(CPACK_INSTALL_CMAKE_PROJECTS "/cygdrive/e/devel/spdlog/cygwin;spdlog;ALL;.")
|
|
||||||
SET(CPACK_INSTALL_PREFIX "/usr/local")
|
|
||||||
SET(CPACK_MODULE_PATH "")
|
|
||||||
SET(CPACK_NSIS_DISPLAY_NAME "spdlog 1.4.0")
|
|
||||||
SET(CPACK_NSIS_INSTALLER_ICON_CODE "")
|
|
||||||
SET(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "")
|
|
||||||
SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES")
|
|
||||||
SET(CPACK_NSIS_PACKAGE_NAME "spdlog 1.4.0")
|
|
||||||
SET(CPACK_OUTPUT_CONFIG_FILE "/cygdrive/e/devel/spdlog/cygwin/CPackConfig.cmake")
|
|
||||||
SET(CPACK_PACKAGE_CONTACT "Gabi Melman <gmelman1@gmail.com>")
|
|
||||||
SET(CPACK_PACKAGE_DEFAULT_LOCATION "/")
|
|
||||||
SET(CPACK_PACKAGE_DESCRIPTION_FILE "/usr/share/cmake-3.6.2/Templates/CPack.GenericDescription.txt")
|
|
||||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "spdlog built using CMake")
|
|
||||||
SET(CPACK_PACKAGE_FILE_NAME "spdlog-1.4.0-CYGWIN")
|
|
||||||
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "spdlog 1.4.0")
|
|
||||||
SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "spdlog 1.4.0")
|
|
||||||
SET(CPACK_PACKAGE_NAME "spdlog")
|
|
||||||
SET(CPACK_PACKAGE_RELOCATABLE "true")
|
|
||||||
SET(CPACK_PACKAGE_VENDOR "Gabi Melman")
|
|
||||||
SET(CPACK_PACKAGE_VERSION "1.4.0")
|
|
||||||
SET(CPACK_PACKAGE_VERSION_MAJOR "1")
|
|
||||||
SET(CPACK_PACKAGE_VERSION_MINOR "4")
|
|
||||||
SET(CPACK_PACKAGE_VERSION_PATCH "0")
|
|
||||||
SET(CPACK_PROJECT_URL "https://github.com/gabime/spdlog")
|
|
||||||
SET(CPACK_RESOURCE_FILE_LICENSE "/usr/share/cmake-3.6.2/Templates/CPack.GenericLicense.txt")
|
|
||||||
SET(CPACK_RESOURCE_FILE_README "/usr/share/cmake-3.6.2/Templates/CPack.GenericDescription.txt")
|
|
||||||
SET(CPACK_RESOURCE_FILE_WELCOME "/usr/share/cmake-3.6.2/Templates/CPack.GenericWelcome.txt")
|
|
||||||
SET(CPACK_SET_DESTDIR "OFF")
|
|
||||||
SET(CPACK_SOURCE_7Z "")
|
|
||||||
SET(CPACK_SOURCE_CYGWIN "ON")
|
|
||||||
SET(CPACK_SOURCE_GENERATOR "CygwinSource")
|
|
||||||
SET(CPACK_SOURCE_OUTPUT_CONFIG_FILE "/cygdrive/e/devel/spdlog/cygwin/CPackSourceConfig.cmake")
|
|
||||||
SET(CPACK_SOURCE_TBZ2 "")
|
|
||||||
SET(CPACK_SOURCE_TGZ "")
|
|
||||||
SET(CPACK_SOURCE_TXZ "")
|
|
||||||
SET(CPACK_SOURCE_TZ "")
|
|
||||||
SET(CPACK_SOURCE_ZIP "")
|
|
||||||
SET(CPACK_SYSTEM_NAME "CYGWIN")
|
|
||||||
SET(CPACK_TOPLEVEL_TAG "CYGWIN")
|
|
||||||
SET(CPACK_WIX_SIZEOF_VOID_P "8")
|
|
||||||
|
|
||||||
if(NOT CPACK_PROPERTIES_FILE)
|
|
||||||
set(CPACK_PROPERTIES_FILE "/cygdrive/e/devel/spdlog/cygwin/CPackProperties.cmake")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(EXISTS ${CPACK_PROPERTIES_FILE})
|
|
||||||
include(${CPACK_PROPERTIES_FILE})
|
|
||||||
endif()
|
|
@ -1,89 +0,0 @@
|
|||||||
# This file will be configured to contain variables for CPack. These variables
|
|
||||||
# should be set in the CMake list file of the project before CPack module is
|
|
||||||
# included. The list of available CPACK_xxx variables and their associated
|
|
||||||
# documentation may be obtained using
|
|
||||||
# cpack --help-variable-list
|
|
||||||
#
|
|
||||||
# Some variables are common to all generators (e.g. CPACK_PACKAGE_NAME)
|
|
||||||
# and some are specific to a generator
|
|
||||||
# (e.g. CPACK_NSIS_EXTRA_INSTALL_COMMANDS). The generator specific variables
|
|
||||||
# usually begin with CPACK_<GENNAME>_xxxx.
|
|
||||||
|
|
||||||
|
|
||||||
SET(CPACK_BINARY_7Z "")
|
|
||||||
SET(CPACK_BINARY_BUNDLE "")
|
|
||||||
SET(CPACK_BINARY_CYGWIN "")
|
|
||||||
SET(CPACK_BINARY_DEB "")
|
|
||||||
SET(CPACK_BINARY_DRAGNDROP "")
|
|
||||||
SET(CPACK_BINARY_IFW "")
|
|
||||||
SET(CPACK_BINARY_NSIS "")
|
|
||||||
SET(CPACK_BINARY_OSXX11 "")
|
|
||||||
SET(CPACK_BINARY_PACKAGEMAKER "")
|
|
||||||
SET(CPACK_BINARY_RPM "")
|
|
||||||
SET(CPACK_BINARY_STGZ "")
|
|
||||||
SET(CPACK_BINARY_TBZ2 "")
|
|
||||||
SET(CPACK_BINARY_TGZ "")
|
|
||||||
SET(CPACK_BINARY_TXZ "")
|
|
||||||
SET(CPACK_BINARY_TZ "")
|
|
||||||
SET(CPACK_BINARY_WIX "")
|
|
||||||
SET(CPACK_BINARY_ZIP "")
|
|
||||||
SET(CPACK_CMAKE_GENERATOR "Unix Makefiles")
|
|
||||||
SET(CPACK_COMPONENT_UNSPECIFIED_HIDDEN "TRUE")
|
|
||||||
SET(CPACK_COMPONENT_UNSPECIFIED_REQUIRED "TRUE")
|
|
||||||
SET(CPACK_GENERATOR "CygwinSource")
|
|
||||||
SET(CPACK_IGNORE_FILES "/CVS/;/\\.svn/;/\\.bzr/;/\\.hg/;/\\.git/;\\.swp\$;\\.#;/#")
|
|
||||||
SET(CPACK_INCLUDE_TOPLEVEL_DIRECTORY "0")
|
|
||||||
SET(CPACK_INSTALLED_DIRECTORIES "/cygdrive/e/devel/spdlog;/")
|
|
||||||
SET(CPACK_INSTALL_CMAKE_PROJECTS "")
|
|
||||||
SET(CPACK_INSTALL_PREFIX "/usr/local")
|
|
||||||
SET(CPACK_MODULE_PATH "")
|
|
||||||
SET(CPACK_NSIS_DISPLAY_NAME "spdlog 1.4.0")
|
|
||||||
SET(CPACK_NSIS_INSTALLER_ICON_CODE "")
|
|
||||||
SET(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "")
|
|
||||||
SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES")
|
|
||||||
SET(CPACK_NSIS_PACKAGE_NAME "spdlog 1.4.0")
|
|
||||||
SET(CPACK_OUTPUT_CONFIG_FILE "/cygdrive/e/devel/spdlog/cygwin/CPackConfig.cmake")
|
|
||||||
SET(CPACK_PACKAGE_CONTACT "Gabi Melman <gmelman1@gmail.com>")
|
|
||||||
SET(CPACK_PACKAGE_DEFAULT_LOCATION "/")
|
|
||||||
SET(CPACK_PACKAGE_DESCRIPTION_FILE "/usr/share/cmake-3.6.2/Templates/CPack.GenericDescription.txt")
|
|
||||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "spdlog built using CMake")
|
|
||||||
SET(CPACK_PACKAGE_FILE_NAME "spdlog-1.4.0-Source")
|
|
||||||
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "spdlog 1.4.0")
|
|
||||||
SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "spdlog 1.4.0")
|
|
||||||
SET(CPACK_PACKAGE_NAME "spdlog")
|
|
||||||
SET(CPACK_PACKAGE_RELOCATABLE "true")
|
|
||||||
SET(CPACK_PACKAGE_VENDOR "Gabi Melman")
|
|
||||||
SET(CPACK_PACKAGE_VERSION "1.4.0")
|
|
||||||
SET(CPACK_PACKAGE_VERSION_MAJOR "1")
|
|
||||||
SET(CPACK_PACKAGE_VERSION_MINOR "4")
|
|
||||||
SET(CPACK_PACKAGE_VERSION_PATCH "0")
|
|
||||||
SET(CPACK_PROJECT_URL "https://github.com/gabime/spdlog")
|
|
||||||
SET(CPACK_RESOURCE_FILE_LICENSE "/usr/share/cmake-3.6.2/Templates/CPack.GenericLicense.txt")
|
|
||||||
SET(CPACK_RESOURCE_FILE_README "/usr/share/cmake-3.6.2/Templates/CPack.GenericDescription.txt")
|
|
||||||
SET(CPACK_RESOURCE_FILE_WELCOME "/usr/share/cmake-3.6.2/Templates/CPack.GenericWelcome.txt")
|
|
||||||
SET(CPACK_SET_DESTDIR "OFF")
|
|
||||||
SET(CPACK_SOURCE_7Z "")
|
|
||||||
SET(CPACK_SOURCE_CYGWIN "ON")
|
|
||||||
SET(CPACK_SOURCE_GENERATOR "CygwinSource")
|
|
||||||
SET(CPACK_SOURCE_IGNORE_FILES "/CVS/;/\\.svn/;/\\.bzr/;/\\.hg/;/\\.git/;\\.swp\$;\\.#;/#")
|
|
||||||
SET(CPACK_SOURCE_INSTALLED_DIRECTORIES "/cygdrive/e/devel/spdlog;/")
|
|
||||||
SET(CPACK_SOURCE_OUTPUT_CONFIG_FILE "/cygdrive/e/devel/spdlog/cygwin/CPackSourceConfig.cmake")
|
|
||||||
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "spdlog-1.4.0-Source")
|
|
||||||
SET(CPACK_SOURCE_TBZ2 "")
|
|
||||||
SET(CPACK_SOURCE_TGZ "")
|
|
||||||
SET(CPACK_SOURCE_TOPLEVEL_TAG "CYGWIN-Source")
|
|
||||||
SET(CPACK_SOURCE_TXZ "")
|
|
||||||
SET(CPACK_SOURCE_TZ "")
|
|
||||||
SET(CPACK_SOURCE_ZIP "")
|
|
||||||
SET(CPACK_STRIP_FILES "")
|
|
||||||
SET(CPACK_SYSTEM_NAME "CYGWIN")
|
|
||||||
SET(CPACK_TOPLEVEL_TAG "CYGWIN-Source")
|
|
||||||
SET(CPACK_WIX_SIZEOF_VOID_P "8")
|
|
||||||
|
|
||||||
if(NOT CPACK_PROPERTIES_FILE)
|
|
||||||
set(CPACK_PROPERTIES_FILE "/cygdrive/e/devel/spdlog/cygwin/CPackProperties.cmake")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(EXISTS ${CPACK_PROPERTIES_FILE})
|
|
||||||
include(${CPACK_PROPERTIES_FILE})
|
|
||||||
endif()
|
|
@ -1,15 +0,0 @@
|
|||||||
# Copyright(c) 2019 spdlog authors
|
|
||||||
# Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
|
||||||
|
|
||||||
find_package(Threads REQUIRED)
|
|
||||||
|
|
||||||
set(SPDLOG_FMT_EXTERNAL OFF)
|
|
||||||
set(config_targets_file spdlogConfigTargets.cmake)
|
|
||||||
|
|
||||||
if(SPDLOG_FMT_EXTERNAL)
|
|
||||||
include(CMakeFindDependencyMacro)
|
|
||||||
find_dependency(fmt CONFIG)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/${config_targets_file}")
|
|
@ -1,46 +0,0 @@
|
|||||||
# This is a basic version file for the Config-mode of find_package().
|
|
||||||
# It is used by write_basic_package_version_file() as input file for configure_file()
|
|
||||||
# to create a version-file which can be installed along a config.cmake file.
|
|
||||||
#
|
|
||||||
# The created file sets PACKAGE_VERSION_EXACT if the current version string and
|
|
||||||
# the requested version string are exactly the same and it sets
|
|
||||||
# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version,
|
|
||||||
# but only if the requested major version is the same as the current one.
|
|
||||||
# The variable CVF_VERSION must be set before calling configure_file().
|
|
||||||
|
|
||||||
|
|
||||||
set(PACKAGE_VERSION "1.4.0")
|
|
||||||
|
|
||||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
|
||||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
|
||||||
else()
|
|
||||||
|
|
||||||
if("1.4.0" MATCHES "^([0-9]+)\\.")
|
|
||||||
set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
|
|
||||||
else()
|
|
||||||
set(CVF_VERSION_MAJOR "1.4.0")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR)
|
|
||||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
|
||||||
else()
|
|
||||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
|
|
||||||
set(PACKAGE_VERSION_EXACT TRUE)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
|
|
||||||
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "")
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
|
|
||||||
if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8")
|
|
||||||
math(EXPR installedBits "8 * 8")
|
|
||||||
set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
|
|
||||||
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
|
||||||
endif()
|
|
@ -0,0 +1,8 @@
|
|||||||
|
example_matrix = [
|
||||||
|
['spdlog-example', spdlog_dep],
|
||||||
|
['spdlog-example-ho', spdlog_headeronly_dep],
|
||||||
|
]
|
||||||
|
|
||||||
|
foreach i : example_matrix
|
||||||
|
test_exe = executable(i[0], ['example.cpp'], dependencies: i[1])
|
||||||
|
endforeach
|
@ -0,0 +1,110 @@
|
|||||||
|
project('spdlog', ['cpp'],
|
||||||
|
license : 'MIT',
|
||||||
|
version : run_command(find_program('scripts/extract_version.py')).stdout().strip(),
|
||||||
|
default_options : [
|
||||||
|
'warning_level=3',
|
||||||
|
'cpp_std=c++11',
|
||||||
|
'default_library=static',
|
||||||
|
'buildtype=release',
|
||||||
|
'b_colorout=always',
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
# ------------------------
|
||||||
|
# --- Dependencies ---
|
||||||
|
# ------------------------
|
||||||
|
dep_list = []
|
||||||
|
compile_args = []
|
||||||
|
|
||||||
|
# Threads
|
||||||
|
dep_list += dependency('threads')
|
||||||
|
|
||||||
|
# Check for FMT
|
||||||
|
if get_option('extrenal_fmt')
|
||||||
|
if not meson.version().version_compare('>=0.49.0')
|
||||||
|
warning('Finding fmt can fail wit meson versions before 0.49.0')
|
||||||
|
endif
|
||||||
|
dep_list += dependency('fmt')
|
||||||
|
compile_args += '-DSPDLOG_FMT_EXTERNAL'
|
||||||
|
endif
|
||||||
|
|
||||||
|
# ------------------------------------
|
||||||
|
# --- Compiled library version ---
|
||||||
|
# ------------------------------------
|
||||||
|
|
||||||
|
spdlog_inc = include_directories('./include')
|
||||||
|
|
||||||
|
spdlog = library('spdlog', ['src/spdlog.cpp'],
|
||||||
|
cpp_args : [compile_args] + ['-DSPDLOG_COMPILED_LIB'],
|
||||||
|
include_directories : spdlog_inc,
|
||||||
|
dependencies : dep_list,
|
||||||
|
install : true,
|
||||||
|
)
|
||||||
|
|
||||||
|
spdlog_dep = declare_dependency(
|
||||||
|
link_with : spdlog,
|
||||||
|
include_directories : spdlog_inc,
|
||||||
|
compile_args : compile_args + ['-DSPDLOG_COMPILED_LIB'],
|
||||||
|
dependencies : dep_list,
|
||||||
|
version : meson.project_version(),
|
||||||
|
)
|
||||||
|
|
||||||
|
# ----------------------------------
|
||||||
|
# --- Header only dependency ---
|
||||||
|
# ----------------------------------
|
||||||
|
|
||||||
|
spdlog_headeronly_dep = declare_dependency(
|
||||||
|
include_directories : spdlog_inc,
|
||||||
|
compile_args : compile_args,
|
||||||
|
dependencies : dep_list,
|
||||||
|
version : meson.project_version(),
|
||||||
|
)
|
||||||
|
|
||||||
|
# ------------------------
|
||||||
|
# --- Installation ---
|
||||||
|
# ------------------------
|
||||||
|
|
||||||
|
install_subdir('include/spdlog', install_dir: get_option('includedir'))
|
||||||
|
|
||||||
|
pkg = import('pkgconfig')
|
||||||
|
pkg.generate(spdlog,
|
||||||
|
name : 'spdlog',
|
||||||
|
description : 'Fast C++ logging library',
|
||||||
|
url : 'https://github.com/gabime/spdlog',
|
||||||
|
extra_cflags : ['-DSPDLOG_COMPILED_LIB']
|
||||||
|
)
|
||||||
|
|
||||||
|
# -------------------------------------
|
||||||
|
# --- Conditionally add subdirs ---
|
||||||
|
# -------------------------------------
|
||||||
|
|
||||||
|
if get_option('enable_tests')
|
||||||
|
subdir('tests')
|
||||||
|
endif
|
||||||
|
|
||||||
|
if get_option('enable_examples')
|
||||||
|
subdir('example')
|
||||||
|
endif
|
||||||
|
|
||||||
|
if get_option('enable_benchmarks')
|
||||||
|
subdir('bench')
|
||||||
|
endif
|
||||||
|
|
||||||
|
# -------------------
|
||||||
|
# --- Summary ---
|
||||||
|
# -------------------
|
||||||
|
|
||||||
|
summary_str = '''spdlog build summary:
|
||||||
|
|
||||||
|
- using extrenal fmt: @0@
|
||||||
|
- building tests: @1@
|
||||||
|
- building examples: @2@
|
||||||
|
- building benchmarks: @3@
|
||||||
|
'''.format(
|
||||||
|
get_option('extrenal_fmt'),
|
||||||
|
get_option('enable_tests'),
|
||||||
|
get_option('enable_examples'),
|
||||||
|
get_option('enable_benchmarks')
|
||||||
|
)
|
||||||
|
|
||||||
|
message(summary_str)
|
@ -0,0 +1,4 @@
|
|||||||
|
option('extrenal_fmt', type: 'boolean', value: false)
|
||||||
|
option('enable_examples', type: 'boolean', value: false)
|
||||||
|
option('enable_benchmarks', type: 'boolean', value: false)
|
||||||
|
option('enable_tests', type: 'boolean', value: false)
|
@ -1 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
cd ..
|
||||||
|
|
||||||
clang-tidy example/example.cpp -- -I ./include
|
clang-tidy example/example.cpp -- -I ./include
|
@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
|
||||||
|
base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
|
||||||
|
config_h = os.path.join(base_path, 'include', 'spdlog', 'version.h')
|
||||||
|
data = {'MAJOR': 0, 'MINOR': 0, 'PATCH': 0}
|
||||||
|
reg = re.compile(r'^\s*#define\s+SPDLOG_VER_([A-Z]+)\s+([0-9]+).*$')
|
||||||
|
|
||||||
|
with open(config_h, 'r') as fp:
|
||||||
|
for l in fp:
|
||||||
|
m = reg.match(l)
|
||||||
|
if m:
|
||||||
|
data[m.group(1)] = int(m.group(2))
|
||||||
|
|
||||||
|
print('{}.{}.{}'.format(data['MAJOR'], data['MINOR'], data['PATCH']))
|
@ -1,3 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
cd ..
|
||||||
|
|
||||||
echo -n "Running dos2unix "
|
echo -n "Running dos2unix "
|
||||||
find . -name "*\.h" -o -name "*\.cpp"|grep -v bundled|xargs -I {} sh -c "dos2unix '{}' 2>/dev/null; echo -n '.'"
|
find . -name "*\.h" -o -name "*\.cpp"|grep -v bundled|xargs -I {} sh -c "dos2unix '{}' 2>/dev/null; echo -n '.'"
|
||||||
echo
|
echo
|
@ -0,0 +1,43 @@
|
|||||||
|
test_sources = files([
|
||||||
|
'main.cpp',
|
||||||
|
'test_async.cpp',
|
||||||
|
'test_dup_filter.cpp',
|
||||||
|
'test_errors.cpp',
|
||||||
|
'test_file_helper.cpp',
|
||||||
|
'test_file_logging.cpp',
|
||||||
|
'test_fmt_helper.cpp',
|
||||||
|
'test_macros.cpp',
|
||||||
|
'test_misc.cpp',
|
||||||
|
'test_mpmc_q.cpp',
|
||||||
|
'test_pattern_formatter.cpp',
|
||||||
|
'test_registry.cpp',
|
||||||
|
'test_stdout_api.cpp',
|
||||||
|
'utils.cpp',
|
||||||
|
])
|
||||||
|
|
||||||
|
global_test_deps = []
|
||||||
|
|
||||||
|
# -----------------------------------------------------
|
||||||
|
# --- Add the systemd test if libsystemd is found ---
|
||||||
|
# -----------------------------------------------------
|
||||||
|
|
||||||
|
systemd_dep = dependency('libsystemd', required: false)
|
||||||
|
|
||||||
|
if systemd_dep.found()
|
||||||
|
test_sources += files(['test_systemd.cpp'])
|
||||||
|
global_test_deps += systemd_dep
|
||||||
|
endif
|
||||||
|
|
||||||
|
# --------------------------------------
|
||||||
|
# --- Build the test executables ---
|
||||||
|
# --------------------------------------
|
||||||
|
|
||||||
|
test_matrix = [
|
||||||
|
['spdlog-utest', spdlog_dep],
|
||||||
|
['spdlog-utest-ho', spdlog_headeronly_dep],
|
||||||
|
]
|
||||||
|
|
||||||
|
foreach i : test_matrix
|
||||||
|
test_exe = executable(i[0], test_sources, dependencies: global_test_deps + [i[1]])
|
||||||
|
test('test_' + i[0], test_exe)
|
||||||
|
endforeach
|
Loading…
Reference in New Issue