From dce74cb641fa4bb067ea48892e55d76dabae57d7 Mon Sep 17 00:00:00 2001 From: Zhihong Niu Date: Mon, 22 Apr 2024 14:37:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E5=9C=A8=20M1=20=E4=B8=8A?= =?UTF-8?q?=E7=BC=96=E8=AF=91=EF=BC=8Cspdlog=20=E5=87=BA=E7=8E=B0=E4=BA=86?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Zhihong Niu --- README.md | 5 +++++ cmake/3rd.cmake | 6 +++--- src/include/buffer_base.hpp | 5 ++++- src/include/matrix.hpp | 2 +- src/include/model.hpp | 2 +- src/include/vector.hpp | 2 +- 6 files changed, 15 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ca94e62..c29d6e5 100755 --- a/README.md +++ b/README.md @@ -53,3 +53,8 @@ done TAB:切换模型 sudo apt install doxygen cppcheck clang-tidy clang-format lcov libsdl2-dev libspdlog-dev + +```shell +brew install gcc g++ cmake doxygen graphviz cppcheck llvm lcov sdl2 spdlog libomp +CC=gcc-13 CXX=g++-13 cmake --preset build +``` \ No newline at end of file diff --git a/cmake/3rd.cmake b/cmake/3rd.cmake index e4b5769..7399137 100644 --- a/cmake/3rd.cmake +++ b/cmake/3rd.cmake @@ -242,11 +242,11 @@ if (NOT SDL2_FOUND) endif () if (APPLE) - set(OpenMP_C_FLAGS "-Xpreprocessor -fopenmp -I/usr/local/opt/libomp/include/") + set(OpenMP_C_FLAGS "-Xpreprocessor -fopenmp -I/usr/local/opt/libomp/include/ -I/opt/homebrew/Cellar/libomp/18.1.4/include") set(OpenMP_C_LIB_NAMES "omp") - set(OpenMP_CXX_FLAGS "-Xpreprocessor -fopenmp -I/usr/local/opt/libomp/include/") + set(OpenMP_CXX_FLAGS "-Xpreprocessor -fopenmp -I/usr/local/opt/libomp/include/ -I/opt/homebrew/Cellar/libomp/18.1.4/include") set(OpenMP_CXX_LIB_NAMES "omp") - set(OpenMP_omp_LIBRARY /usr/local/opt/libomp/lib/libomp.dylib) + set(OpenMP_omp_LIBRARY /opt/homebrew/Cellar/libomp/18.1.4/lib/libomp.dylib) endif () find_package(OpenMP REQUIRED) if (NOT OpenMP_FOUND) diff --git a/src/include/buffer_base.hpp b/src/include/buffer_base.hpp index 06b5522..368ad8b 100644 --- a/src/include/buffer_base.hpp +++ b/src/include/buffer_base.hpp @@ -19,7 +19,10 @@ #include #include -#include +#if defined(x86_64) +// #include +#endif + #include #include #include diff --git a/src/include/matrix.hpp b/src/include/matrix.hpp index f164c59..be3f597 100755 --- a/src/include/matrix.hpp +++ b/src/include/matrix.hpp @@ -40,7 +40,7 @@ struct fmt::formatter -> decltype(_format_context.out()) { std::stringstream buf; buf << _matrix; - return format_to(_format_context.out(), "\n{}", buf.str()); + return fmt::format_to(_format_context.out(), "\n{}", buf.str()); } }; diff --git a/src/include/model.hpp b/src/include/model.hpp index 5dc1a8b..9eb5897 100755 --- a/src/include/model.hpp +++ b/src/include/model.hpp @@ -239,7 +239,7 @@ struct fmt::formatter auto format(SimpleRenderer::model_t::box_t _box, format_context &_format_context) const -> decltype(_format_context.out()) { - return format_to(_format_context.out(), "max: {},\nmin: {}", _box.max, + return fmt::format_to(_format_context.out(), "max: {},\nmin: {}", _box.max, _box.min); } }; diff --git a/src/include/vector.hpp b/src/include/vector.hpp index 03997b7..f290d6f 100755 --- a/src/include/vector.hpp +++ b/src/include/vector.hpp @@ -44,7 +44,7 @@ struct fmt::formatter -> decltype(_format_context.out()) { std::stringstream buf; buf << _vector; - return format_to(_format_context.out(), "\n{}", buf.str()); + return fmt::format_to(_format_context.out(), "\n{}", buf.str()); } };