From dbc94f36d34e22355205f0b5aabd348efd1b7463 Mon Sep 17 00:00:00 2001 From: PixelyIon Date: Sun, 21 Nov 2021 12:55:33 +0530 Subject: [PATCH] Add Range v3 as a submodule We want to utilize features from C++ 20 ranges but they haven't been entirely implemented in libc++ so in the meantime we use the reference implementation for it which is Ranges v3. --- .gitmodules | 3 +++ app/CMakeLists.txt | 3 +++ app/libraries/range | 1 + app/src/main/res/values/strings.xml | 1 + app/src/main/res/xml/preferences.xml | 6 ++++++ 5 files changed, 14 insertions(+) create mode 160000 app/libraries/range diff --git a/.gitmodules b/.gitmodules index 2aff32cf..900c2625 100644 --- a/.gitmodules +++ b/.gitmodules @@ -42,3 +42,6 @@ path = app/libraries/llvm url = https://github.com/llvm/llvm-project.git shallow = true +[submodule "C++ Range v3"] + path = app/libraries/range + url = https://github.com/ericniebler/range-v3 diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index e9bc0da2..ee5fe4a3 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -98,6 +98,9 @@ set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_MULTITHREADED ON) add_subdirectory("libraries/boost") +# C++ Range v3 +add_subdirectory("libraries/range") + # Build Skyline with full debugging data and -Og for debug builds set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -glldb -gdwarf-5") diff --git a/app/libraries/range b/app/libraries/range new file mode 160000 index 00000000..83783f57 --- /dev/null +++ b/app/libraries/range @@ -0,0 +1 @@ +Subproject commit 83783f578e0e6666d68a3bf17b0038a80e62530e diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 051bab70..762d9556 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -139,6 +139,7 @@ Perfetto is used to profile and debug with detailed tracing {fmt} provides a modern C++ string formatting API Boost provides high-quality implementations of containers and other convenience functions in C++ + Range v3 is a reference implementation of ISO C++ 20 ranges, this allows us to use ranges while they are developed in LLVM\'s libc++ Frozen provides compile-time immutable hash maps with a perfect hash function for faster lookups pugixml is used to parse the preference XML to retrieve settings from C++ Opus Audio Codec provides a high-quality Opus decoder used to decode Opus-encoded audio provided by the guest diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index 101399b2..08dcce9f 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -180,6 +180,12 @@ app:libraryUrl="https://www.boost.org" app:summary="@string/boost_description" app:title="Boost" /> +