mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-09 09:48:20 +00:00
chore: upgrade MacOS build settings for better C++20 compatibility (#1435)
* upgrade MacOS build settings for better C++20 compatibility * add fixes I forgot * 3rd try * Update UserManager.cpp * Update CMakeLists.txt * End with newline * Update CMakeLists.txt * update to reflect feedback * Update CMakeLists.txt to disable deprecation warnings on SHA512 * attempt to disable sqlite warnings * revert last attempt (didn't work) * disable sqlite deprecation warnings on MacOS
This commit is contained in:
parent
a0d51e21ca
commit
d78b50874c
10
.github/workflows/build-and-test.yml
vendored
10
.github/workflows/build-and-test.yml
vendored
@ -13,7 +13,7 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ windows-2022, ubuntu-22.04, macos-11 ]
|
os: [ windows-2022, ubuntu-22.04, macos-13 ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
@ -25,9 +25,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
vs-version: '[17,18)'
|
vs-version: '[17,18)'
|
||||||
msbuild-architecture: x64
|
msbuild-architecture: x64
|
||||||
- name: Install libssl (Mac Only)
|
- name: Install libssl and switch to XCode 15.2 (Mac Only)
|
||||||
if: ${{ matrix.os == 'macos-11' }}
|
if: ${{ matrix.os == 'macos-13' }}
|
||||||
run: brew install openssl@3
|
run: |
|
||||||
|
brew install openssl@3
|
||||||
|
sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer
|
||||||
- name: cmake
|
- name: cmake
|
||||||
uses: lukka/run-cmake@v10
|
uses: lukka/run-cmake@v10
|
||||||
with:
|
with:
|
||||||
|
@ -3,6 +3,7 @@ project(Darkflame)
|
|||||||
include(CTest)
|
include(CTest)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 20)
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
|
set(CXX_STANDARD_REQUIRED ON)
|
||||||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||||
|
|
||||||
# Read variables from file
|
# Read variables from file
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
"inherits": "default"
|
"inherits": "default"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ci-macos-11",
|
"name": "ci-macos-13",
|
||||||
"displayName": "CI configure step for MacOS",
|
"displayName": "CI configure step for MacOS",
|
||||||
"description": "Same as default, Used in GitHub actions workflow",
|
"description": "Same as default, Used in GitHub actions workflow",
|
||||||
"inherits": "default"
|
"inherits": "default"
|
||||||
@ -74,8 +74,8 @@
|
|||||||
"jobs": 2
|
"jobs": 2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ci-macos-11",
|
"name": "ci-macos-13",
|
||||||
"configurePreset": "ci-macos-11",
|
"configurePreset": "ci-macos-13",
|
||||||
"displayName": "MacOS CI Build",
|
"displayName": "MacOS CI Build",
|
||||||
"description": "This preset is used by the CI build on MacOS",
|
"description": "This preset is used by the CI build on MacOS",
|
||||||
"jobs": 2
|
"jobs": 2
|
||||||
@ -95,8 +95,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ci-macos-11",
|
"name": "ci-macos-13",
|
||||||
"configurePreset": "ci-macos-11",
|
"configurePreset": "ci-macos-13",
|
||||||
"displayName": "CI Tests on MacOS",
|
"displayName": "CI Tests on MacOS",
|
||||||
"description": "Runs all tests on a Mac configuration",
|
"description": "Runs all tests on a Mac configuration",
|
||||||
"execution": {
|
"execution": {
|
||||||
|
@ -68,3 +68,8 @@ else ()
|
|||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
target_link_libraries(dCommon ZLIB::ZLIB)
|
target_link_libraries(dCommon ZLIB::ZLIB)
|
||||||
|
|
||||||
|
# Disable deprecation warnings on MD5.cpp and SHA512.cpp for Apple Clang
|
||||||
|
if (APPLE)
|
||||||
|
set_source_files_properties("MD5.cpp" "SHA512.cpp" PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations")
|
||||||
|
endif()
|
||||||
|
@ -451,7 +451,7 @@ void UserManager::RenameCharacter(const SystemAddress& sysAddr, Packet* packet)
|
|||||||
"User %i tried to rename a character that it does not own!",
|
"User %i tried to rename a character that it does not own!",
|
||||||
u->GetAccountID());
|
u->GetAccountID());
|
||||||
|
|
||||||
std::find_if(u->GetCharacters().begin(), u->GetCharacters().end(), [&](Character* c) {
|
auto unusedItr = std::find_if(u->GetCharacters().begin(), u->GetCharacters().end(), [&](Character* c) {
|
||||||
if (c->GetID() == charID) {
|
if (c->GetID() == charID) {
|
||||||
character = c;
|
character = c;
|
||||||
return true;
|
return true;
|
||||||
|
@ -22,3 +22,7 @@ AddStripMessage::AddStripMessage(AMFArrayValue* arguments) : BehaviorMessageBase
|
|||||||
}
|
}
|
||||||
LOG_DEBUG("number of actions %i", actionsToAdd.size());
|
LOG_DEBUG("number of actions %i", actionsToAdd.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<Action> AddStripMessage::GetActionsToAdd() const {
|
||||||
|
return actionsToAdd;
|
||||||
|
}
|
||||||
|
@ -21,7 +21,7 @@ public:
|
|||||||
AddStripMessage(AMFArrayValue* arguments);
|
AddStripMessage(AMFArrayValue* arguments);
|
||||||
StripUiPosition GetPosition() const { return position; };
|
StripUiPosition GetPosition() const { return position; };
|
||||||
ActionContext GetActionContext() const { return actionContext; };
|
ActionContext GetActionContext() const { return actionContext; };
|
||||||
std::vector<Action> GetActionsToAdd() const { return actionsToAdd; };
|
std::vector<Action> GetActionsToAdd() const;
|
||||||
private:
|
private:
|
||||||
StripUiPosition position;
|
StripUiPosition position;
|
||||||
ActionContext actionContext;
|
ActionContext actionContext;
|
||||||
|
2
thirdparty/SQLite/CMakeLists.txt
vendored
2
thirdparty/SQLite/CMakeLists.txt
vendored
@ -14,6 +14,6 @@ if(UNIX)
|
|||||||
if(NOT APPLE)
|
if(NOT APPLE)
|
||||||
target_compile_options(sqlite3 PRIVATE "-Wno-return-local-addr" "-Wno-maybe-uninitialized")
|
target_compile_options(sqlite3 PRIVATE "-Wno-return-local-addr" "-Wno-maybe-uninitialized")
|
||||||
else()
|
else()
|
||||||
target_compile_options(sqlite3 PRIVATE "-Wno-return-stack-address" "-Wno-uninitialized")
|
target_compile_options(sqlite3 PRIVATE "-Wno-return-stack-address" "-Wno-uninitialized" "-Wno-deprecated-declarations")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user