Don't build the example with wide filenames

This commit is contained in:
Charles Milette 2021-01-10 18:19:00 -05:00
parent fc594b551a
commit 1234cda3b3
No known key found for this signature in database
GPG Key ID: 1A5AE81377AD973A
2 changed files with 14 additions and 6 deletions

View File

@ -7,41 +7,49 @@ environment:
WCHAR: 'OFF' WCHAR: 'OFF'
WCHAR_FILES: 'OFF' WCHAR_FILES: 'OFF'
BUILD_SHARED: 'OFF' BUILD_SHARED: 'OFF'
BUILD_EXAMPLE: 'ON'
- GENERATOR: '"Visual Studio 14 2015"' - GENERATOR: '"Visual Studio 14 2015"'
BUILD_TYPE: Release BUILD_TYPE: Release
WCHAR: 'ON' WCHAR: 'ON'
WCHAR_FILES: 'OFF' WCHAR_FILES: 'OFF'
BUILD_SHARED: 'OFF' BUILD_SHARED: 'OFF'
BUILD_EXAMPLE: 'ON'
- GENERATOR: '"Visual Studio 14 2015 Win64"' - GENERATOR: '"Visual Studio 14 2015 Win64"'
BUILD_TYPE: Debug BUILD_TYPE: Debug
WCHAR: 'ON' WCHAR: 'ON'
WCHAR_FILES: 'OFF' WCHAR_FILES: 'OFF'
BUILD_SHARED: 'OFF' BUILD_SHARED: 'OFF'
BUILD_EXAMPLE: 'ON'
- GENERATOR: '"Visual Studio 14 2015 Win64"' - GENERATOR: '"Visual Studio 14 2015 Win64"'
BUILD_TYPE: Release BUILD_TYPE: Release
WCHAR: 'ON' WCHAR: 'ON'
WCHAR_FILES: 'OFF' WCHAR_FILES: 'OFF'
BUILD_SHARED: 'OFF' BUILD_SHARED: 'OFF'
BUILD_EXAMPLE: 'ON'
- GENERATOR: '"Visual Studio 15 2017 Win64"' - GENERATOR: '"Visual Studio 15 2017 Win64"'
BUILD_TYPE: Debug BUILD_TYPE: Debug
WCHAR: 'ON' WCHAR: 'ON'
WCHAR_FILES: 'OFF' WCHAR_FILES: 'OFF'
BUILD_SHARED: 'OFF' BUILD_SHARED: 'OFF'
BUILD_EXAMPLE: 'ON'
- GENERATOR: '"Visual Studio 15 2017 Win64"' - GENERATOR: '"Visual Studio 15 2017 Win64"'
BUILD_TYPE: Release BUILD_TYPE: Release
WCHAR: 'OFF' WCHAR: 'OFF'
WCHAR_FILES: 'OFF' WCHAR_FILES: 'OFF'
BUILD_SHARED: 'OFF' BUILD_SHARED: 'OFF'
BUILD_EXAMPLE: 'ON'
- GENERATOR: '"Visual Studio 15 2017 Win64"' - GENERATOR: '"Visual Studio 15 2017 Win64"'
BUILD_TYPE: Release BUILD_TYPE: Release
WCHAR: 'OFF' WCHAR: 'OFF'
WCHAR_FILES: 'OFF' WCHAR_FILES: 'OFF'
BUILD_SHARED: 'ON' BUILD_SHARED: 'ON'
BUILD_EXAMPLE: 'ON'
- GENERATOR: '"Visual Studio 15 2017 Win64"' - GENERATOR: '"Visual Studio 15 2017 Win64"'
BUILD_TYPE: Release BUILD_TYPE: Release
WCHAR: 'ON' WCHAR: 'ON'
WCHAR_FILES: 'ON' WCHAR_FILES: 'ON'
BUILD_SHARED: 'ON' BUILD_SHARED: 'ON'
BUILD_EXAMPLE: 'OFF'
build_script: build_script:
- cmd: >- - cmd: >-
set set
@ -52,7 +60,7 @@ build_script:
set PATH=%PATH%;C:\Program Files\Git\usr\bin set PATH=%PATH%;C:\Program Files\Git\usr\bin
cmake .. -G %GENERATOR% -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DSPDLOG_WCHAR_SUPPORT=%WCHAR% -DSPDLOG_WCHAR_FILENAMES=%WCHAR_FILES% -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_WCHAR_FILENAMES=%WCHAR_FILES% -DSPDLOG_BUILD_SHARED=%BUILD_SHARED% -DSPDLOG_BUILD_EXAMPLE=%BUILD_EXAMPLE% -DSPDLOG_BUILD_EXAMPLE_HO=%BUILD_EXAMPLE% -DSPDLOG_BUILD_TESTS=ON -DSPDLOG_BUILD_TESTS_HO=OFF -DSPDLOG_BUILD_WARNINGS=ON
cmake --build . --config %BUILD_TYPE% cmake --build . --config %BUILD_TYPE%

View File

@ -109,21 +109,21 @@ void stdout_logger_example()
void basic_example() void basic_example()
{ {
// Create basic file logger (not rotated). // Create basic file logger (not rotated).
auto my_logger = spdlog::basic_logger_mt("file_logger", SPDLOG_FILENAME_T("logs/basic-log.txt")); auto my_logger = spdlog::basic_logger_mt("file_logger", "logs/basic-log.txt");
} }
#include "spdlog/sinks/rotating_file_sink.h" #include "spdlog/sinks/rotating_file_sink.h"
void rotating_example() void rotating_example()
{ {
// Create a file rotating logger with 5mb size max and 3 rotated files. // Create a file rotating logger with 5mb size max and 3 rotated files.
auto rotating_logger = spdlog::rotating_logger_mt("some_logger_name", SPDLOG_FILENAME_T("logs/rotating.txt"), 1048576 * 5, 3); auto rotating_logger = spdlog::rotating_logger_mt("some_logger_name", "logs/rotating.txt", 1048576 * 5, 3);
} }
#include "spdlog/sinks/daily_file_sink.h" #include "spdlog/sinks/daily_file_sink.h"
void daily_example() void daily_example()
{ {
// Create a daily logger - a new file is created every day on 2:30am. // Create a daily logger - a new file is created every day on 2:30am.
auto daily_logger = spdlog::daily_logger_mt("daily_logger", SPDLOG_FILENAME_T("logs/daily.txt"), 2, 30); auto daily_logger = spdlog::daily_logger_mt("daily_logger", "logs/daily.txt", 2, 30);
} }
#include "spdlog/cfg/env.h" #include "spdlog/cfg/env.h"
@ -143,7 +143,7 @@ void async_example()
{ {
// Default thread pool settings can be modified *before* creating the async logger: // Default thread pool settings can be modified *before* creating the async logger:
// spdlog::init_thread_pool(32768, 1); // queue with max 32k items 1 backing thread. // spdlog::init_thread_pool(32768, 1); // queue with max 32k items 1 backing thread.
auto async_file = spdlog::basic_logger_mt<spdlog::async_factory>("async_file_logger", SPDLOG_FILENAME_T("logs/async_log.txt")); auto async_file = spdlog::basic_logger_mt<spdlog::async_factory>("async_file_logger", "logs/async_log.txt");
// alternatively: // alternatively:
// auto async_file = spdlog::create_async<spdlog::sinks::basic_file_sink_mt>("async_file_logger", "logs/async_log.txt"); // auto async_file = spdlog::create_async<spdlog::sinks::basic_file_sink_mt>("async_file_logger", "logs/async_log.txt");
@ -211,7 +211,7 @@ void multi_sink_example()
console_sink->set_level(spdlog::level::warn); console_sink->set_level(spdlog::level::warn);
console_sink->set_pattern("[multi_sink_example] [%^%l%$] %v"); console_sink->set_pattern("[multi_sink_example] [%^%l%$] %v");
auto file_sink = std::make_shared<spdlog::sinks::basic_file_sink_mt>(SPDLOG_FILENAME_T("logs/multisink.txt"), true); auto file_sink = std::make_shared<spdlog::sinks::basic_file_sink_mt>("logs/multisink.txt", true);
file_sink->set_level(spdlog::level::trace); file_sink->set_level(spdlog::level::trace);
spdlog::logger logger("multi_sink", {console_sink, file_sink}); spdlog::logger logger("multi_sink", {console_sink, file_sink});