From cff3e27115fd17b1fad74931ce601b8a2b02e80f Mon Sep 17 00:00:00 2001 From: gabime Date: Sun, 24 Sep 2023 13:32:48 +0300 Subject: [PATCH] Removed usages of SPDLOG_COMPILED_LIB macro --- CMakeLists.txt | 1 - include/spdlog/fmt/fmt.h | 7 +------ src/async.cpp | 4 ---- src/bundled_fmtlib_format.cpp | 4 ---- src/cfg.cpp | 4 ---- src/color_sinks.cpp | 4 ---- src/file_sinks.cpp | 4 ---- src/spdlog.cpp | 4 ---- src/stdout_sinks.cpp | 4 ---- tests/CMakeLists.txt | 1 - 10 files changed, 1 insertion(+), 36 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c4abc317..44b5d2b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -176,7 +176,6 @@ if(SPDLOG_SYSTEM_INCLUDES) set(SPDLOG_INCLUDES_LEVEL "SYSTEM") endif() -target_compile_definitions(spdlog PUBLIC SPDLOG_COMPILED_LIB) target_include_directories(spdlog ${SPDLOG_INCLUDES_LEVEL} PUBLIC "$" "$") target_link_libraries(spdlog PUBLIC Threads::Threads) diff --git a/include/spdlog/fmt/fmt.h b/include/spdlog/fmt/fmt.h index 064b424a..94295766 100644 --- a/include/spdlog/fmt/fmt.h +++ b/include/spdlog/fmt/fmt.h @@ -7,19 +7,14 @@ // // Include a bundled header-only copy of fmtlib or an external one. -// By default spdlog include its own copy. +// By default, spdlog include its own copy. // #if defined(SPDLOG_USE_STD_FORMAT) // SPDLOG_USE_STD_FORMAT is defined - use std::format # include #elif !defined(SPDLOG_FMT_EXTERNAL) -# if !defined(SPDLOG_COMPILED_LIB) && !defined(FMT_HEADER_ONLY) -# define FMT_HEADER_ONLY -# endif - # include # include - #else // SPDLOG_FMT_EXTERNAL is defined - use external fmtlib # include # include diff --git a/src/async.cpp b/src/async.cpp index 5ea8d8f4..bf4b078c 100644 --- a/src/async.cpp +++ b/src/async.cpp @@ -1,10 +1,6 @@ // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. // Distributed under the MIT License (http://opensource.org/licenses/MIT) -#ifndef SPDLOG_COMPILED_LIB -# error Please define SPDLOG_COMPILED_LIB to compile this file. -#endif - #include #include #include diff --git a/src/bundled_fmtlib_format.cpp b/src/bundled_fmtlib_format.cpp index 7d8022c4..501330c6 100644 --- a/src/bundled_fmtlib_format.cpp +++ b/src/bundled_fmtlib_format.cpp @@ -2,10 +2,6 @@ // Copyright (c) 2012 - 2016, Victor Zverovich // All rights reserved. -#ifndef SPDLOG_COMPILED_LIB -# error Please define SPDLOG_COMPILED_LIB to compile this file. -#endif - #if !defined(SPDLOG_FMT_EXTERNAL) && !defined(SPDLOG_USE_STD_FORMAT) #include diff --git a/src/cfg.cpp b/src/cfg.cpp index e5713cca..0c3535f3 100644 --- a/src/cfg.cpp +++ b/src/cfg.cpp @@ -1,8 +1,4 @@ // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. // Distributed under the MIT License (http://opensource.org/licenses/MIT) -#ifndef SPDLOG_COMPILED_LIB -# error Please define SPDLOG_COMPILED_LIB to compile this file. -#endif - #include diff --git a/src/color_sinks.cpp b/src/color_sinks.cpp index 38fa308c..277ba720 100644 --- a/src/color_sinks.cpp +++ b/src/color_sinks.cpp @@ -1,10 +1,6 @@ // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. // Distributed under the MIT License (http://opensource.org/licenses/MIT) -#ifndef SPDLOG_COMPILED_LIB -# error Please define SPDLOG_COMPILED_LIB to compile this file. -#endif - #include #include diff --git a/src/file_sinks.cpp b/src/file_sinks.cpp index 10ffba60..f85ed38c 100644 --- a/src/file_sinks.cpp +++ b/src/file_sinks.cpp @@ -1,10 +1,6 @@ // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. // Distributed under the MIT License (http://opensource.org/licenses/MIT) -#ifndef SPDLOG_COMPILED_LIB -# error Please define SPDLOG_COMPILED_LIB to compile this file. -#endif - #include #include #include diff --git a/src/spdlog.cpp b/src/spdlog.cpp index a21c3331..1f003c9d 100644 --- a/src/spdlog.cpp +++ b/src/spdlog.cpp @@ -1,10 +1,6 @@ // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. // Distributed under the MIT License (http://opensource.org/licenses/MIT) -#ifndef SPDLOG_COMPILED_LIB -# error Please define SPDLOG_COMPILED_LIB to compile this file. -#endif - #include #include #include diff --git a/src/stdout_sinks.cpp b/src/stdout_sinks.cpp index 2d5256a4..61264a4c 100644 --- a/src/stdout_sinks.cpp +++ b/src/stdout_sinks.cpp @@ -1,10 +1,6 @@ // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. // Distributed under the MIT License (http://opensource.org/licenses/MIT) -#ifndef SPDLOG_COMPILED_LIB -# error Please define SPDLOG_COMPILED_LIB to compile this file. -#endif - #include #include diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index f697282e..ce9c302f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -79,7 +79,6 @@ function(spdlog_prepare_test test_target spdlog_lib) set_tests_properties(${test_target} PROPERTIES RUN_SERIAL ON) endfunction() -# The compiled library tests if(SPDLOG_BUILD_TESTS OR SPDLOG_BUILD_ALL) spdlog_prepare_test(spdlog-utests spdlog::spdlog) endif()