diff --git a/.travis.yml b/.travis.yml index 10b6f54a..5bd9b6eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,11 +5,11 @@ sudo: required language: cpp -# gcc 4.8 -addons: &gcc48 +# gcc 4.9 +addons: &gcc49 apt: packages: - - g++-4.8 + - g++-4.9 sources: - ubuntu-toolchain-r-test @@ -44,39 +44,35 @@ addons: &clang10 matrix: include: - # Test gcc-4.8: C++11, Build=Debug/Release - - env: GCC_VERSION=4.8 BUILD_TYPE=Debug CPP=11 + # Test gcc-4.9: C++14, Build=Debug/Release + - env: GCC_VERSION=4.9 BUILD_TYPE=Debug CPP=14 os: linux - addons: *gcc48 + addons: *gcc49 - - env: GCC_VERSION=4.8 BUILD_TYPE=Release CPP=11 + - env: GCC_VERSION=4.9 BUILD_TYPE=Release CPP=14 os: linux - addons: *gcc48 + addons: *gcc49 - - env: GCC_VERSION=7 BUILD_TYPE=Release CPP=11 + - env: GCC_VERSION=7 BUILD_TYPE=Release CPP=14 os: linux addons: *gcc7 - # Test clang-3.5: C++11, Build=Debug/Release - - env: CLANG_VERSION=3.5 BUILD_TYPE=Debug CPP=11 - os: linux - addons: *clang35 - - - env: CLANG_VERSION=3.5 BUILD_TYPE=Release CPP=11 + # Test clang-3.5: C++11, Build=Release + - env: CLANG_VERSION=3.5 BUILD_TYPE=Release CPP=14 os: linux addons: *clang35 # osx - - env: BUILD_TYPE=Release CPP=11 ASAN=Off TSAN=Off + - env: BUILD_TYPE=Release CPP=14 ASAN=Off TSAN=Off os: osx # Test clang-10.0: C++11, Build=Debug/Release - - env: CLANG_VERSION=10 BUILD_TYPE=Debug CPP=11 + - env: CLANG_VERSION=10 BUILD_TYPE=Debug CPP=14 os: linux dist: bionic addons: *clang10 - - env: CLANG_VERSION=10 BUILD_TYPE=Release CPP=11 ASAN=On + - env: CLANG_VERSION=10 BUILD_TYPE=Release CPP=14 ASAN=On os: linux dist: bionic addons: *clang10 @@ -100,11 +96,9 @@ script: -DCMAKE_BUILD_TYPE=$BUILD_TYPE \ -DCMAKE_CXX_STANDARD=$CPP \ -DSPDLOG_BUILD_EXAMPLE=ON \ - -DSPDLOG_BUILD_EXAMPLE_HO=ON \ -DSPDLOG_BUILD_WARNINGS=ON \ -DSPDLOG_BUILD_BENCH=OFF \ -DSPDLOG_BUILD_TESTS=ON \ - -DSPDLOG_BUILD_TESTS_HO=OFF \ -DSPDLOG_SANITIZE_ADDRESS=$ASAN - make VERBOSE=1 -j2 diff --git a/CMakeLists.txt b/CMakeLists.txt index 1327315b..fe81fa60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -159,7 +159,7 @@ if (SPDLOG_BUILD_SHARED) add_library(spdlog SHARED ${SPDLOG_SRCS} ${SPDLOG_ALL_HEADERS}) target_compile_definitions(spdlog PUBLIC SPDLOG_SHARED_LIB) if (WIN32) - target_compile_options(spdlog PUBLIC /wd4251 /wd4275) + target_compile_options(spdlog PUBLIC /wd4251 /wd4275 /wd4661) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc @ONLY) endif () if (NOT SPDLOG_FMT_EXTERNAL AND NOT SPDLOG_FMT_EXTERNAL_HO) diff --git a/README.md b/README.md index c3081c77..f4a3db78 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # spdlog -Very fast, header-only/compiled, C++ logging library. [![Build Status](https://travis-ci.org/gabime/spdlog.svg?branch=v1.x)](https://travis-ci.org/gabime/spdlog)  [![Build status](https://ci.appveyor.com/api/projects/status/d2jnxclg20vd0o50?svg=true)](https://ci.appveyor.com/project/gabime/spdlog) [![Release](https://img.shields.io/github/release/gabime/spdlog.svg)](https://github.com/gabime/spdlog/releases/latest) +Very fast, header-only/compiled, C++ logging library. [![Build Status](https://travis-ci.org/gabime/spdlog.svg?branch=v2.x)](https://travis-ci.org/gabime/spdlog)  [![Build status](https://ci.appveyor.com/api/projects/status/d2jnxclg20vd0o50?svg=true)](https://ci.appveyor.com/project/gabime/spdlog) [![Release](https://img.shields.io/github/release/gabime/spdlog.svg)](https://github.com/gabime/spdlog/releases/latest) ## Install #### Header only version diff --git a/appveyor.yml b/appveyor.yml index 3b654760..a7283bb1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -40,7 +40,7 @@ build_script: set PATH=%PATH%;C:\Program Files\Git\usr\bin - cmake .. -G %GENERATOR% -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DSPDLOG_WCHAR_SUPPORT=%WCHAR% -DSPDLOG_BUILD_SHARED=%BUILD_SHARED% -DSPDLOG_BUILD_EXAMPLE=ON -DSPDLOG_BUILD_EXAMPLE_HO=ON -DSPDLOG_BUILD_TESTS=ON -DSPDLOG_BUILD_TESTS_HO=OFF -DSPDLOG_BUILD_WARNINGS=ON + cmake .. -G %GENERATOR% -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DSPDLOG_WCHAR_SUPPORT=%WCHAR% -DSPDLOG_BUILD_SHARED=%BUILD_SHARED% -DSPDLOG_BUILD_EXAMPLE=ON -DSPDLOG_BUILD_TESTS=ON -DSPDLOG_BUILD_WARNINGS=ON cmake --build . --config %BUILD_TYPE% diff --git a/include/spdlog/fmt/fmt.h b/include/spdlog/fmt/fmt.h index f05495ef..ca5669fc 100644 --- a/include/spdlog/fmt/fmt.h +++ b/include/spdlog/fmt/fmt.h @@ -11,9 +11,6 @@ // #if !defined(SPDLOG_FMT_EXTERNAL) -#if !defined(FMT_HEADER_ONLY) -#define FMT_HEADER_ONLY -#endif #ifndef FMT_USE_WINDOWS_H #define FMT_USE_WINDOWS_H 0 #endif diff --git a/src/sinks/basic_file_sink.cpp b/src/sinks/basic_file_sink.cpp index 0b570053..ead8ae00 100644 --- a/src/sinks/basic_file_sink.cpp +++ b/src/sinks/basic_file_sink.cpp @@ -4,6 +4,8 @@ #include #include #include +#include +#include namespace spdlog { namespace sinks { diff --git a/src/sinks/stdout_color_sinks.cpp b/src/sinks/stdout_color_sinks.cpp index 9c63e834..2165db2e 100644 --- a/src/sinks/stdout_color_sinks.cpp +++ b/src/sinks/stdout_color_sinks.cpp @@ -33,6 +33,8 @@ std::shared_ptr stderr_color_st(const std::string &logger_name, color_mo return Factory::template create(logger_name, mode); } +} // namespace spdlog + // template instantiations template SPDLOG_API std::shared_ptr spdlog::stdout_color_mt( const std::string &logger_name, color_mode mode); @@ -51,5 +53,3 @@ template SPDLOG_API std::shared_ptr spdlog::stderr_color_mt spdlog::stderr_color_st( const std::string &logger_name, color_mode mode); - -} // namespace spdlog \ No newline at end of file