From a6ba69038c0f0a944986010568f4053dc452eccc Mon Sep 17 00:00:00 2001 From: BlackMATov Date: Fri, 25 Nov 2022 06:15:45 +0700 Subject: [PATCH] remove fmtlib from examples --- .gitmodules | 3 --- manuals/CMakeLists.txt | 2 +- manuals/meta_examples/class_example.cpp | 4 ++-- manuals/meta_examples/enum_example.cpp | 4 ++-- manuals/meta_examples/function_example.cpp | 4 ++-- manuals/meta_examples/variable_example.cpp | 4 ++-- manuals/meta_manuals.hpp | 17 ----------------- vendors/CMakeLists.txt | 4 ---- vendors/fmtlib | 1 - 9 files changed, 9 insertions(+), 34 deletions(-) delete mode 160000 vendors/fmtlib diff --git a/.gitmodules b/.gitmodules index c43e80a..17ecc9f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ [submodule "vendors/doctest"] path = vendors/doctest url = https://github.com/onqtam/doctest -[submodule "vendors/fmtlib"] - path = vendors/fmtlib - url = https://github.com/fmtlib/fmt diff --git a/manuals/CMakeLists.txt b/manuals/CMakeLists.txt index 2e0d3b1..3e214f3 100644 --- a/manuals/CMakeLists.txt +++ b/manuals/CMakeLists.txt @@ -27,7 +27,7 @@ setup_defines_for_target(${PROJECT_NAME}.singles) # function(setup_libraries_for_target TARGET) - target_link_libraries(${TARGET} PRIVATE doctest_with_main fmt) + target_link_libraries(${TARGET} PRIVATE doctest_with_main) if(${BUILD_WITH_COVERAGE}) target_link_libraries(${TARGET} PRIVATE enable_gcov) diff --git a/manuals/meta_examples/class_example.cpp b/manuals/meta_examples/class_example.cpp index fcd8fde..6da253a 100644 --- a/manuals/meta_examples/class_example.cpp +++ b/manuals/meta_examples/class_example.cpp @@ -58,9 +58,9 @@ TEST_CASE("meta/meta_examples/class/type") { const meta::class_type rectangle_type = meta::resolve_type(); // prints all class methods - fmt::print("* rectangle:\n"); + std::cout << "* rectangle" << std::endl; for ( auto&& [index, method] : rectangle_type.get_methods() ) { - fmt::print(" + {}/{}\n", index.get_name(), index.get_type().get_arity()); + std::cout << " + " << index.get_name() << "/" << index.get_type().get_arity() << std::endl; } } diff --git a/manuals/meta_examples/enum_example.cpp b/manuals/meta_examples/enum_example.cpp index e96a0a5..3771932 100644 --- a/manuals/meta_examples/enum_example.cpp +++ b/manuals/meta_examples/enum_example.cpp @@ -34,9 +34,9 @@ TEST_CASE("meta/meta_examples/enum/type") { CHECK(align_type.get_underlying_type() == meta::resolve_type()); // prints all enumerators - fmt::print("* align:\n"); + std::cout << "* align" << std::endl; for ( auto&& [index, evalue] : align_type.get_evalues() ) { - fmt::print(" - {}:{}\n", index.get_name(), evalue.get_underlying_value()); + std::cout << " - " << index.get_name() << "/" << evalue.get_underlying_value() << std::endl; } } diff --git a/manuals/meta_examples/function_example.cpp b/manuals/meta_examples/function_example.cpp index b54a553..f4b7587 100644 --- a/manuals/meta_examples/function_example.cpp +++ b/manuals/meta_examples/function_example.cpp @@ -71,8 +71,8 @@ TEST_CASE("meta/meta_examples/function/usage") { CHECK(sub_function_typed_result == 42); // prints all functions in the scope - fmt::print("* {}:\n", math_scope.get_name()); + std::cout << "* " << math_scope.get_name() << std::endl; for ( auto&& [index, function] : math_scope.get_functions() ) { - fmt::print(" + {}/{}\n", index.get_name(), function.get_type().get_arity()); + std::cout << " + " << index.get_name() << "/" << function.get_type().get_arity() << std::endl; } } diff --git a/manuals/meta_examples/variable_example.cpp b/manuals/meta_examples/variable_example.cpp index d7563d8..971ef5f 100644 --- a/manuals/meta_examples/variable_example.cpp +++ b/manuals/meta_examples/variable_example.cpp @@ -40,8 +40,8 @@ TEST_CASE("meta/meta_examples/variable/usage") { CHECK_THROWS(pi_variable.set(6.0)); // prints all variables in the scope - fmt::print("* {}:\n", constants_scope.get_name()); + std::cout << "* " << constants_scope.get_name() << std::endl; for ( auto&& [index, variable] : constants_scope.get_variables() ) { - fmt::print(" - {}:{}\n", index.get_name(), variable.get()); + std::cout << " - " << index.get_name() << ":" << variable.get() << std::endl; } } diff --git a/manuals/meta_manuals.hpp b/manuals/meta_manuals.hpp index d135216..0fa66b6 100644 --- a/manuals/meta_manuals.hpp +++ b/manuals/meta_manuals.hpp @@ -7,22 +7,5 @@ #include #include -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wc++20-compat" -#pragma clang diagnostic ignored "-Wdocumentation-unknown-command" -#pragma clang diagnostic ignored "-Wreserved-identifier" -#pragma clang diagnostic ignored "-Wsigned-enum-bitfield" -#pragma clang diagnostic ignored "-Wswitch-enum" -#pragma clang diagnostic ignored "-Wundefined-func-template" -#endif - -#include -#include - -#ifdef __clang__ -#pragma clang diagnostic pop -#endif - #include #include diff --git a/vendors/CMakeLists.txt b/vendors/CMakeLists.txt index 3c4176f..1913b90 100644 --- a/vendors/CMakeLists.txt +++ b/vendors/CMakeLists.txt @@ -3,7 +3,3 @@ project(meta.hpp.vendors) set(DOCTEST_NO_INSTALL ON CACHE INTERNAL "") add_subdirectory(doctest) set_target_properties(doctest_with_main PROPERTIES FOLDER meta.hpp.vendors) - -set(FMT_INSTALL OFF CACHE INTERNAL "") -add_subdirectory(fmtlib) -set_target_properties(fmt PROPERTIES FOLDER meta.hpp.vendors) diff --git a/vendors/fmtlib b/vendors/fmtlib deleted file mode 160000 index b6f4cea..0000000 --- a/vendors/fmtlib +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b6f4ceaed0a0a24ccf575fab6c56dd50ccf6f1a9