Move toml11 out of vcpkg since the toml11 authors broke it (#352)

This commit is contained in:
Lion
2024-09-18 16:18:38 +02:00
committed by GitHub
7 changed files with 15 additions and 13 deletions

3
.gitmodules vendored
View File

@@ -4,3 +4,6 @@
[submodule "vcpkg"]
path = vcpkg
url = https://github.com/Microsoft/vcpkg.git
[submodule "deps/toml11"]
path = deps/toml11
url = https://github.com/ToruNiina/toml11

View File

@@ -20,7 +20,7 @@ include(cmake/Git.cmake)
### SETTINGS ###
# add all headers (.h, .hpp) to this
set(PRJ_HEADERS
set(PRJ_HEADERS
include/ArgsParser.h
include/BoostAliases.h
include/Client.h
@@ -93,7 +93,7 @@ set(PRJ_COMPILE_FEATURES cxx_std_20)
# set #defines (test enable/disable not included here)
set(PRJ_DEFINITIONS CPPHTTPLIB_OPENSSL_SUPPORT)
# add all libraries used by the project (WARNING: also set them in vcpkg.json!)
set(PRJ_LIBRARIES
set(PRJ_LIBRARIES
fmt::fmt
doctest::doctest
Threads::Threads
@@ -116,7 +116,7 @@ find_package(httplib CONFIG REQUIRED)
find_package(libzip CONFIG REQUIRED)
find_package(RapidJSON CONFIG REQUIRED)
find_package(sol2 CONFIG REQUIRED)
find_package(toml11 CONFIG REQUIRED)
add_subdirectory("deps/toml11")
include_directories(include)
@@ -125,7 +125,7 @@ include(FindThreads)
### END SETTINGS ###
# DONT change anything beyond this point unless you've read the cmake bible and
# DONT change anything beyond this point unless you've read the cmake bible and
# swore on it not to bonk up the ci/cd pipelines with your changes.
####################
@@ -164,7 +164,7 @@ set(PRJ_DEFINITIONS ${PRJ_DEFINITIONS}
)
# build commandline manually for funky windows flags to carry over without a custom toolchain file
add_library(commandline_static
add_library(commandline_static
deps/commandline/src/impls.h
deps/commandline/src/windows_impl.cpp
deps/commandline/src/linux_impl.cpp

View File

@@ -3,9 +3,9 @@
# https://github.com/lefticus/cppbestpractices/blob/master/02-Use_the_Tools_Available.md
# Courtesy of Jason Turner
# License here: https://github.com/cpp-best-practices/cppbestpractices/blob/master/LICENSE
#
#
# This version has been modified by the owners of the current respository.
# Modifications have mostly been marked with "modified" or similar, though this is not
# Modifications have mostly been marked with "modified" or similar, though this is not
# strictly required.
function(set_project_warnings project_name)
@@ -73,7 +73,6 @@ function(set_project_warnings project_name)
-Werror=missing-declarations
-Werror=missing-field-initializers
-Werror=ctor-dtor-privacy
-Werror=switch-enum
-Wswitch-default
-Werror=unused-result
-Werror=implicit-fallthrough

View File

@@ -2,7 +2,7 @@ find_package(Git)
if(${PROJECT_NAME}_CHECKOUT_GIT_SUBMODULES)
if(Git_FOUND)
message(STATUS "Git found, submodule update and init")
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE GIT_SUBMOD_RESULT)
if(NOT GIT_SUBMOD_RESULT EQUAL "0")

1
deps/toml11 vendored Submodule

Submodule deps/toml11 added at f33ca743fb

View File

@@ -158,7 +158,7 @@ void TConfig::FlushToFile() {
Ss << "# This is the BeamMP-Server config file.\n"
"# Help & Documentation: `https://docs.beammp.com/server/server-maintenance/`\n"
"# IMPORTANT: Fill in the AuthKey with the key you got from `https://keymaster.beammp.com/` on the left under \"Keys\"\n"
<< data;
<< toml::format(data);
auto File = std::fopen(mConfigFileName.c_str(), "w+");
if (!File) {
beammp_error("Failed to create/write to config file: " + GetPlatformAgnosticErrorString());
@@ -240,7 +240,7 @@ void TConfig::ParseFromFile(std::string_view name) {
try {
toml::value data {};
if (!mDisableConfig) {
data = toml::parse<toml::preserve_comments>(name.data());
data = toml::parse(name.data());
}
// GENERAL

View File

@@ -13,7 +13,6 @@
"nlohmann-json",
"openssl",
"rapidjson",
"sol2",
"toml11"
"sol2"
]
}