mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-09 07:58:16 +01:00
Squashed 'externals/mcl/' content from commit a86a53843
git-subtree-dir: externals/mcl git-subtree-split: a86a53843f82e4d6ca2f2e1437824495acad2712
This commit is contained in:
commit
7eb1d05f63
70 changed files with 2902 additions and 0 deletions
69
src/CMakeLists.txt
Normal file
69
src/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
add_library(mcl
|
||||
../include/mcl/assert.hpp
|
||||
../include/mcl/bit/bit_count.hpp
|
||||
../include/mcl/bit/bit_field.hpp
|
||||
../include/mcl/bit/rotate.hpp
|
||||
../include/mcl/bit/swap.hpp
|
||||
../include/mcl/bit_cast.hpp
|
||||
../include/mcl/bitsizeof.hpp
|
||||
../include/mcl/concepts/bit_integral.hpp
|
||||
../include/mcl/concepts/is_any_of.hpp
|
||||
../include/mcl/concepts/same_as.hpp
|
||||
../include/mcl/container/intrusive_list.hpp
|
||||
../include/mcl/hint/assume.hpp
|
||||
../include/mcl/iterator/reverse.hpp
|
||||
../include/mcl/macro/anonymous_variable.hpp
|
||||
../include/mcl/macro/architecture.hpp
|
||||
../include/mcl/macro/concatenate_tokens.hpp
|
||||
../include/mcl/mp/metafunction/apply.hpp
|
||||
../include/mcl/mp/metafunction/bind.hpp
|
||||
../include/mcl/mp/metafunction/identity.hpp
|
||||
../include/mcl/mp/metafunction/map.hpp
|
||||
../include/mcl/mp/metavalue/bit_and.hpp
|
||||
../include/mcl/mp/metavalue/bit_not.hpp
|
||||
../include/mcl/mp/metavalue/bit_or.hpp
|
||||
../include/mcl/mp/metavalue/bit_xor.hpp
|
||||
../include/mcl/mp/metavalue/conjunction.hpp
|
||||
../include/mcl/mp/metavalue/disjunction.hpp
|
||||
../include/mcl/mp/metavalue/lift_value.hpp
|
||||
../include/mcl/mp/metavalue/logic_and.hpp
|
||||
../include/mcl/mp/metavalue/logic_if.hpp
|
||||
../include/mcl/mp/metavalue/logic_not.hpp
|
||||
../include/mcl/mp/metavalue/logic_or.hpp
|
||||
../include/mcl/mp/metavalue/product.hpp
|
||||
../include/mcl/mp/metavalue/sum.hpp
|
||||
../include/mcl/mp/metavalue/value.hpp
|
||||
../include/mcl/mp/metavalue/value_cast.hpp
|
||||
../include/mcl/mp/metavalue/value_equal.hpp
|
||||
../include/mcl/mp/misc/argument_count.hpp
|
||||
../include/mcl/mp/typelist/append.hpp
|
||||
../include/mcl/mp/typelist/cartesian_product.hpp
|
||||
../include/mcl/mp/typelist/concat.hpp
|
||||
../include/mcl/mp/typelist/contains.hpp
|
||||
../include/mcl/mp/typelist/drop.hpp
|
||||
../include/mcl/mp/typelist/get.hpp
|
||||
../include/mcl/mp/typelist/head.hpp
|
||||
../include/mcl/mp/typelist/length.hpp
|
||||
../include/mcl/mp/typelist/lift_sequence.hpp
|
||||
../include/mcl/mp/typelist/list.hpp
|
||||
../include/mcl/mp/typelist/lower_to_tuple.hpp
|
||||
../include/mcl/mp/typelist/prepend.hpp
|
||||
../include/mcl/mp/typelist/tail.hpp
|
||||
../include/mcl/scope_exit.hpp
|
||||
../include/mcl/stdint.hpp
|
||||
../include/mcl/type_traits/function_info.hpp
|
||||
../include/mcl/type_traits/integer_of_size.hpp
|
||||
../include/mcl/type_traits/is_instance_of_template.hpp
|
||||
assert.cpp
|
||||
)
|
||||
target_include_directories(mcl
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
)
|
||||
target_compile_options(mcl PRIVATE ${MCL_CXX_FLAGS})
|
||||
target_link_libraries(mcl PUBLIC $<BUILD_INTERFACE:fmt::fmt>)
|
||||
add_library(merry::mcl ALIAS mcl)
|
||||
|
||||
include(CreateTargetDirectoryGroups)
|
||||
create_target_directory_groups(mcl)
|
||||
20
src/assert.cpp
Normal file
20
src/assert.cpp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
// This file is part of the mcl project.
|
||||
// Copyright (c) 2022 merryhime
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include "mcl/assert.hpp"
|
||||
|
||||
#include <cstdio>
|
||||
#include <exception>
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
namespace mcl::detail {
|
||||
|
||||
[[noreturn]] void assert_terminate_impl(fmt::string_view msg, fmt::format_args args) {
|
||||
fmt::print(stderr, "assertion failed: ");
|
||||
fmt::vprint(stderr, msg, args);
|
||||
std::terminate();
|
||||
}
|
||||
|
||||
} // namespace mcl::detail
|
||||
Loading…
Add table
Add a link
Reference in a new issue