remove fmtlib from examples

This commit is contained in:
BlackMATov
2022-11-25 06:15:45 +07:00
parent 63e7ba13e3
commit a6ba69038c
9 changed files with 9 additions and 34 deletions

3
.gitmodules vendored
View File

@@ -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

View File

@@ -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)

View File

@@ -58,9 +58,9 @@ TEST_CASE("meta/meta_examples/class/type") {
const meta::class_type rectangle_type = meta::resolve_type<rectangle>();
// 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;
}
}

View File

@@ -34,9 +34,9 @@ TEST_CASE("meta/meta_examples/enum/type") {
CHECK(align_type.get_underlying_type() == meta::resolve_type<int>());
// 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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -7,22 +7,5 @@
#include <meta.hpp/meta_all.hpp>
#include <doctest/doctest.h>
#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 <fmt/core.h>
#include <fmt/ostream.h>
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#include <iostream>
#include <sstream>

View File

@@ -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)

1
vendors/fmtlib vendored

Submodule vendors/fmtlib deleted from b6f4ceaed0