mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-24 14:37:25 +00:00
build reorganization and experimental clang support
This commit is contained in:
parent
018e5707d7
commit
145f97cfdc
4
.github/workflows/build-and-test.yml
vendored
4
.github/workflows/build-and-test.yml
vendored
@ -33,9 +33,7 @@ jobs:
|
|||||||
- name: cmake
|
- name: cmake
|
||||||
uses: lukka/run-cmake@v10
|
uses: lukka/run-cmake@v10
|
||||||
with:
|
with:
|
||||||
configurePreset: "ci-${{matrix.os}}"
|
workflowPreset: "ci-${{matrix.os}}"
|
||||||
buildPreset: "ci-${{matrix.os}}"
|
|
||||||
testPreset: "ci-${{matrix.os}}"
|
|
||||||
- name: artifacts
|
- name: artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
@ -1,204 +1,244 @@
|
|||||||
{
|
{
|
||||||
"version": 3,
|
"version": 6,
|
||||||
"cmakeMinimumRequired": {
|
"cmakeMinimumRequired": {
|
||||||
"major": 3,
|
"major": 3,
|
||||||
"minor": 14,
|
"minor": 25,
|
||||||
"patch": 0
|
"patch": 0
|
||||||
|
},
|
||||||
|
"configurePresets": [
|
||||||
|
{
|
||||||
|
"name": "default",
|
||||||
|
"displayName": "Default configure step",
|
||||||
|
"description": "Use 'build' dir and Unix makefiles",
|
||||||
|
"binaryDir": "${sourceDir}/build",
|
||||||
|
"generator": "Unix Makefiles"
|
||||||
},
|
},
|
||||||
"configurePresets": [
|
{
|
||||||
{
|
"name": "ci-windows-2022",
|
||||||
"name": "default",
|
"displayName": "CI configure step for Windows",
|
||||||
"displayName": "Default configure step",
|
"description": "Set architecture to 64-bit (b/c RakNet)",
|
||||||
"description": "Use 'build' dir and Unix makefiles",
|
"inherits": "default",
|
||||||
"binaryDir": "${sourceDir}/build",
|
"generator": "Visual Studio 17 2022",
|
||||||
"generator": "Unix Makefiles"
|
"architecture": {
|
||||||
|
"value": "x64"
|
||||||
},
|
},
|
||||||
{
|
"condition": {
|
||||||
"name": "ci-ubuntu-22.04",
|
"type": "equals",
|
||||||
"displayName": "CI configure step for Ubuntu",
|
"lhs": "${hostSystemName}",
|
||||||
"description": "Same as default, Used in GitHub actions workflow",
|
"rhs": "Windows"
|
||||||
"inherits": "default",
|
|
||||||
"cacheVariables": {
|
|
||||||
"CMAKE_BUILD_TYPE": "Release"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
"cacheVariables": {
|
||||||
"name": "debug-ubuntu-22.04",
|
"CMAKE_CXX_FLAGS_INIT": "/Zc:inline"
|
||||||
"displayName": "Debug configure step for Ubuntu",
|
}
|
||||||
"description": "Used to generate debug configuration for Ubuntu",
|
},
|
||||||
"inherits": "default",
|
{
|
||||||
"cacheVariables": {
|
"name": "windows-default",
|
||||||
"CMAKE_BUILD_TYPE": "Debug",
|
"inherits": "ci-windows-2022",
|
||||||
"CMAKE_CXX_FLAGS_INIT" : "-Og",
|
"displayName": "Windows only Configure Settings",
|
||||||
"CMAKE_C_FLAGS_INIT" : "-Og"
|
"description": "Sets build and install directories",
|
||||||
}
|
"generator": "Ninja",
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Windows"
|
||||||
},
|
},
|
||||||
{
|
"architecture": {
|
||||||
"name": "ci-macos-13",
|
"value": "x64",
|
||||||
"displayName": "CI configure step for MacOS",
|
"strategy": "external"
|
||||||
"description": "Same as default, Used in GitHub actions workflow",
|
}
|
||||||
"inherits": "default",
|
},
|
||||||
"cacheVariables": {
|
{
|
||||||
"CMAKE_CXX_FLAGS_INIT" : "-O2",
|
"name": "linux-base",
|
||||||
"CMAKE_C_FLAGS_INIT" : "-O2"
|
"displayName": "x86_64-pc-linux-gnu",
|
||||||
}
|
"description": "Linux base configuration",
|
||||||
|
"hidden": true,
|
||||||
|
"binaryDir": "${sourceDir}/build",
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Linux"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-clang-debug",
|
||||||
|
"inherits": "linux-base",
|
||||||
|
"displayName": "[Debug] Linux (Clang)",
|
||||||
|
"description": "Create a debug build using the Clang toolchain for Linux",
|
||||||
|
"binaryDir": "${sourceDir}/build",
|
||||||
|
"toolchainFile": "${sourceDir}/cmake/toolchains/linux-clang.cmake",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-clang-release",
|
||||||
|
"inherits": "linux-clang-debug",
|
||||||
|
"displayName": "[Release] Linux (Clang)",
|
||||||
|
"description": "Create a release build using the Clang toolchain for Linux",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-gcc-debug",
|
||||||
|
"displayName": "[Debug] Linux (GCC)",
|
||||||
|
"description": "Create a debug build using the GNU toolchain for Linux",
|
||||||
|
"binaryDir": "${sourceDir}/build",
|
||||||
|
"toolchainFile": "${sourceDir}/cmake/toolchains/linux-gcc.cmake",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-gcc-release",
|
||||||
|
"inherits": "linux-gcc-debug",
|
||||||
|
"displayName": "[Release] Linux (GCC)",
|
||||||
|
"description": "Create a release build using the GNU toolchain for Linux",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos-appleclang-debug",
|
||||||
|
"displayName": "[Debug] MacOS (AppleClang)",
|
||||||
|
"description": "Same as default, Used in GitHub actions workflow",
|
||||||
|
"inherits": "default",
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Darwin"
|
||||||
},
|
},
|
||||||
{
|
"cacheVariables": {
|
||||||
"name": "debug-macos-13",
|
"CMAKE_BUILD_TYPE": "Debug"
|
||||||
"displayName": "Debug configure step for MacOS",
|
}
|
||||||
"description": "Used to generate debug configuration for MacOS",
|
},
|
||||||
"inherits": "default"
|
{
|
||||||
|
"name": "macos-appleclang-release",
|
||||||
|
"displayName": "[Release] MacOS (AppleClang)",
|
||||||
|
"description": "Same as default, Used in GitHub actions workflow",
|
||||||
|
"inherits": "default",
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Darwin"
|
||||||
},
|
},
|
||||||
{
|
"cacheVariables": {
|
||||||
"name": "ci-windows-2022",
|
"CMAKE_BUILD_TYPE": "Release"
|
||||||
"displayName": "CI configure step for Windows",
|
}
|
||||||
"description": "Set architecture to 64-bit (b/c RakNet)",
|
}
|
||||||
"inherits": "default",
|
],
|
||||||
"generator": "Visual Studio 17 2022",
|
"buildPresets": [
|
||||||
"architecture": {
|
{
|
||||||
"value": "x64"
|
"name": "default",
|
||||||
},
|
"configurePreset": "default",
|
||||||
"cacheVariables": {
|
"displayName": "Default Build",
|
||||||
"CMAKE_BUILD_TYPE": "Release",
|
"description": "Default Build",
|
||||||
"CMAKE_CXX_FLAGS_INIT": "/Zc:inline"
|
"jobs": 2
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
"name": "ci-windows-2022",
|
||||||
|
"configurePreset": "ci-windows-2022",
|
||||||
|
"displayName": "Windows CI Build",
|
||||||
|
"description": "This preset is used by the CI build on windows",
|
||||||
|
"configuration": "Release",
|
||||||
|
"jobs": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "debug-windows-2022",
|
||||||
|
"configurePreset": "ci-windows-2022",
|
||||||
|
"displayName": "Windows Debug Build",
|
||||||
|
"description": "This preset is used to debug the build on windows",
|
||||||
|
"configuration": "Release",
|
||||||
|
"jobs": 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testPresets": [
|
||||||
|
{
|
||||||
|
"name": "default",
|
||||||
|
"configurePreset": "default",
|
||||||
|
"execution": {
|
||||||
|
"jobs": 2
|
||||||
},
|
},
|
||||||
{
|
"output": {
|
||||||
"name": "debug-windows-2022",
|
"outputOnFailure": true
|
||||||
"displayName": "Debug configure step for Windows",
|
}
|
||||||
"description": "Set architecture to 64-bit (b/c RakNet)",
|
},
|
||||||
"inherits": "default",
|
{
|
||||||
"generator": "Visual Studio 17 2022",
|
"name": "ci-windows-2022",
|
||||||
"architecture": {
|
"configurePreset": "ci-windows-2022",
|
||||||
"value": "x64"
|
"displayName": "CI Tests on windows",
|
||||||
},
|
"description": "Runs all tests on a windows configuration",
|
||||||
"cacheVariables": {
|
"configuration": "Release",
|
||||||
"CMAKE_CXX_FLAGS_INIT": "Debug"
|
"execution": {
|
||||||
}
|
"jobs": 2
|
||||||
},
|
},
|
||||||
{
|
"output": {
|
||||||
"name": "windows-default",
|
"outputOnFailure": true
|
||||||
"inherits": "ci-windows-2022",
|
},
|
||||||
"displayName": "Windows only Configure Settings",
|
"filter": {
|
||||||
"description": "Sets build and install directories",
|
"exclude": {
|
||||||
"generator": "Ninja",
|
"name": "((example)|(minigzip))+"
|
||||||
"architecture": {
|
|
||||||
"value": "x64",
|
|
||||||
"strategy": "external"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
}
|
||||||
"buildPresets": [
|
],
|
||||||
{
|
"workflowPresets": [
|
||||||
"name": "default",
|
{
|
||||||
"configurePreset": "default",
|
"name": "ci-windows-2022",
|
||||||
"displayName": "Default Build",
|
"displayName": "Windows CI Workflow",
|
||||||
"description": "Default Build",
|
"description": "CI workflow preset for Windows",
|
||||||
"jobs": 2
|
"steps": [
|
||||||
},
|
{
|
||||||
{
|
"type": "configure",
|
||||||
"name": "ci-ubuntu-22.04",
|
"name": "ci-windows-2022"
|
||||||
"configurePreset": "ci-ubuntu-22.04",
|
|
||||||
"displayName": "Linux CI Build",
|
|
||||||
"description": "This preset is used by the CI build on linux",
|
|
||||||
"configuration": "Release",
|
|
||||||
"jobs": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "debug-ubuntu-22.04",
|
|
||||||
"configurePreset": "debug-ubuntu-22.04",
|
|
||||||
"displayName": "Linux Debug Build ",
|
|
||||||
"description": "This preset is used to debug the build on linux",
|
|
||||||
"configuration": "Debug",
|
|
||||||
"jobs": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ci-windows-2022",
|
|
||||||
"configurePreset": "ci-windows-2022",
|
|
||||||
"displayName": "Windows CI Build",
|
|
||||||
"description": "This preset is used by the CI build on windows",
|
|
||||||
"configuration": "Release",
|
|
||||||
"jobs": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "debug-windows-2022",
|
|
||||||
"configurePreset": "debug-windows-2022",
|
|
||||||
"displayName": "Windows Debug Build",
|
|
||||||
"description": "This preset is used to debug the build on windows",
|
|
||||||
"configuration": "Release",
|
|
||||||
"jobs": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ci-macos-13",
|
|
||||||
"configurePreset": "ci-macos-13",
|
|
||||||
"displayName": "MacOS CI Build",
|
|
||||||
"description": "This preset is used by the CI build on MacOS",
|
|
||||||
"jobs": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "debug-macos-13",
|
|
||||||
"configurePreset": "debug-macos-13",
|
|
||||||
"displayName": "MacOS Debug Build",
|
|
||||||
"description": "This preset is used to debug the build on MacOS",
|
|
||||||
"jobs": 2
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"testPresets": [
|
|
||||||
{
|
|
||||||
"name": "ci-ubuntu-22.04",
|
|
||||||
"configurePreset": "ci-ubuntu-22.04",
|
|
||||||
"displayName": "CI Tests on Linux",
|
|
||||||
"description": "Runs all tests on a linux configuration",
|
|
||||||
"configuration": "Release",
|
|
||||||
"execution": {
|
|
||||||
"jobs": 2
|
|
||||||
},
|
},
|
||||||
"output": {
|
{
|
||||||
"outputOnFailure": true
|
"type": "build",
|
||||||
|
"name": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "test",
|
||||||
|
"name": "default"
|
||||||
}
|
}
|
||||||
},
|
]
|
||||||
{
|
},
|
||||||
"name": "debug-ubuntu-22.04",
|
{
|
||||||
"configurePreset": "debug-ubuntu-22.04",
|
"name": "ci-ubuntu-22.04",
|
||||||
"displayName": "Debug Tests on Linux",
|
"displayName": "Ubuntu CI Workflow",
|
||||||
"description": "Runs all tests on a linux configuration",
|
"description": "CI workflow preset for Ubuntu",
|
||||||
"configuration": "Debug",
|
"steps": [
|
||||||
"execution": {
|
{
|
||||||
"jobs": 2
|
"type": "configure",
|
||||||
|
"name": "linux-gcc-release"
|
||||||
},
|
},
|
||||||
"output": {
|
{
|
||||||
"outputOnFailure": true
|
"type": "build",
|
||||||
|
"name": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "test",
|
||||||
|
"name": "default"
|
||||||
}
|
}
|
||||||
},
|
]
|
||||||
{
|
},
|
||||||
"name": "ci-macos-13",
|
{
|
||||||
"configurePreset": "ci-macos-13",
|
"name": "ci-macos-13",
|
||||||
"displayName": "CI Tests on MacOS",
|
"displayName": "MacOS CI Workflow",
|
||||||
"description": "Runs all tests on a Mac configuration",
|
"description": "CI workflow preset for MacOS",
|
||||||
"execution": {
|
"steps": [
|
||||||
"jobs": 2
|
{
|
||||||
|
"type": "configure",
|
||||||
|
"name": "macos-appleclang-release"
|
||||||
},
|
},
|
||||||
"output": {
|
{
|
||||||
"outputOnFailure": true
|
"type": "build",
|
||||||
|
"name": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "test",
|
||||||
|
"name": "default"
|
||||||
}
|
}
|
||||||
},
|
]
|
||||||
{
|
}
|
||||||
"name": "ci-windows-2022",
|
]
|
||||||
"configurePreset": "ci-windows-2022",
|
}
|
||||||
"displayName": "CI Tests on windows",
|
|
||||||
"description": "Runs all tests on a windows configuration",
|
|
||||||
"configuration": "Release",
|
|
||||||
"execution": {
|
|
||||||
"jobs": 2
|
|
||||||
},
|
|
||||||
"output": {
|
|
||||||
"outputOnFailure": true
|
|
||||||
},
|
|
||||||
"filter": {
|
|
||||||
"exclude": {
|
|
||||||
"name": "((example)|(minigzip))+"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
@ -320,7 +320,7 @@ std::vector<std::string> GeneralUtils::GetSqlFileNamesFromFolder(const std::stri
|
|||||||
return sortedFiles;
|
return sortedFiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DARKFLAME_PLATFORM_MACOS
|
#if !(__GNUC__ >= 11 || _MSC_VER >= 1924)
|
||||||
|
|
||||||
// MacOS floating-point parse function specializations
|
// MacOS floating-point parse function specializations
|
||||||
namespace GeneralUtils::details {
|
namespace GeneralUtils::details {
|
||||||
|
5
thirdparty/CMakeLists.txt
vendored
5
thirdparty/CMakeLists.txt
vendored
@ -23,6 +23,11 @@ if(NOT WIN32)
|
|||||||
target_include_directories(bcrypt PRIVATE "libbcrypt/include/bcrypt")
|
target_include_directories(bcrypt PRIVATE "libbcrypt/include/bcrypt")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Need to define this on Clang (Linux) for 'strdup' support
|
||||||
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
|
target_compile_definitions(bcrypt PRIVATE "_POSIX_C_SOURCE=200809L")
|
||||||
|
endif()
|
||||||
|
|
||||||
target_include_directories(bcrypt INTERFACE "libbcrypt/include")
|
target_include_directories(bcrypt INTERFACE "libbcrypt/include")
|
||||||
target_include_directories(bcrypt PRIVATE "libbcrypt/src")
|
target_include_directories(bcrypt PRIVATE "libbcrypt/src")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user