mirror of
https://github.com/BlackMATov/meta.hpp.git
synced 2025-12-15 03:45:30 +07:00
remove fmtlib from examples
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,6 +1,3 @@
|
|||||||
[submodule "vendors/doctest"]
|
[submodule "vendors/doctest"]
|
||||||
path = vendors/doctest
|
path = vendors/doctest
|
||||||
url = https://github.com/onqtam/doctest
|
url = https://github.com/onqtam/doctest
|
||||||
[submodule "vendors/fmtlib"]
|
|
||||||
path = vendors/fmtlib
|
|
||||||
url = https://github.com/fmtlib/fmt
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ setup_defines_for_target(${PROJECT_NAME}.singles)
|
|||||||
#
|
#
|
||||||
|
|
||||||
function(setup_libraries_for_target TARGET)
|
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})
|
if(${BUILD_WITH_COVERAGE})
|
||||||
target_link_libraries(${TARGET} PRIVATE enable_gcov)
|
target_link_libraries(${TARGET} PRIVATE enable_gcov)
|
||||||
|
|||||||
@@ -58,9 +58,9 @@ TEST_CASE("meta/meta_examples/class/type") {
|
|||||||
const meta::class_type rectangle_type = meta::resolve_type<rectangle>();
|
const meta::class_type rectangle_type = meta::resolve_type<rectangle>();
|
||||||
|
|
||||||
// prints all class methods
|
// prints all class methods
|
||||||
fmt::print("* rectangle:\n");
|
std::cout << "* rectangle" << std::endl;
|
||||||
for ( auto&& [index, method] : rectangle_type.get_methods() ) {
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,9 +34,9 @@ TEST_CASE("meta/meta_examples/enum/type") {
|
|||||||
CHECK(align_type.get_underlying_type() == meta::resolve_type<int>());
|
CHECK(align_type.get_underlying_type() == meta::resolve_type<int>());
|
||||||
|
|
||||||
// prints all enumerators
|
// prints all enumerators
|
||||||
fmt::print("* align:\n");
|
std::cout << "* align" << std::endl;
|
||||||
for ( auto&& [index, evalue] : align_type.get_evalues() ) {
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,8 +71,8 @@ TEST_CASE("meta/meta_examples/function/usage") {
|
|||||||
CHECK(sub_function_typed_result == 42);
|
CHECK(sub_function_typed_result == 42);
|
||||||
|
|
||||||
// prints all functions in the scope
|
// 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() ) {
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ TEST_CASE("meta/meta_examples/variable/usage") {
|
|||||||
CHECK_THROWS(pi_variable.set(6.0));
|
CHECK_THROWS(pi_variable.set(6.0));
|
||||||
|
|
||||||
// prints all variables in the scope
|
// 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() ) {
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,22 +7,5 @@
|
|||||||
#include <meta.hpp/meta_all.hpp>
|
#include <meta.hpp/meta_all.hpp>
|
||||||
#include <doctest/doctest.h>
|
#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 <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|||||||
4
vendors/CMakeLists.txt
vendored
4
vendors/CMakeLists.txt
vendored
@@ -3,7 +3,3 @@ project(meta.hpp.vendors)
|
|||||||
set(DOCTEST_NO_INSTALL ON CACHE INTERNAL "")
|
set(DOCTEST_NO_INSTALL ON CACHE INTERNAL "")
|
||||||
add_subdirectory(doctest)
|
add_subdirectory(doctest)
|
||||||
set_target_properties(doctest_with_main PROPERTIES FOLDER meta.hpp.vendors)
|
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
1
vendors/fmtlib
vendored
Submodule vendors/fmtlib deleted from b6f4ceaed0
Reference in New Issue
Block a user