mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-21 21:17:25 +00:00
Squashed commit of the following:
commitf4311e593f
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Nov 16 22:16:50 2024 -0600 temp fix for MSVC debug builds commit0e81c69de8
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Nov 16 21:11:04 2024 -0600 CMakePresets indentation commitd7aa52a0fc
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Nov 16 21:03:37 2024 -0600 use DLU_CONFIG_DIR envvar commitd1bfe9f15d
Merge:6e781da2
de3fe931
Author: jadebenn <jonahbenn@yahoo.com> Date: Sat Nov 16 20:24:05 2024 -0600 Merge branch 'main' into MSVCCompilerFlags commit6e781da2e7
Merge:6ccd72c6
3a6123fe
Author: jadebenn <jonahbenn@yahoo.com> Date: Sat Apr 13 18:15:16 2024 -0500 Merge remote-tracking branch 'upstream/main' into MSVCCompilerFlags commit6ccd72c6a9
Author: jadebenn <jonahbenn@yahoo.com> Date: Sat Apr 13 17:48:58 2024 -0500 add RelWithDebInfo presets and move -Werror flag into presets.json commitb96cfd71a4
Merge:c4adcee8
1ee45639
Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Apr 9 01:47:17 2024 -0500 Merge remote-tracking branch 'upstream/main' into MSVCCompilerFlags commitc4adcee8e8
Merge:7f9fcb5b
28ce8ac5
Author: jadebenn <jonahbenn@yahoo.com> Date: Mon Apr 8 22:30:35 2024 -0500 Merge remote-tracking branch 'upstream/main' into MSVCCompilerFlags commit7f9fcb5b75
Author: jadebenn <jonahbenn@yahoo.com> Date: Mon Apr 8 22:10:01 2024 -0500 change gnu and clang build directories to enable consistent artifact generation commit553740e8a0
Author: jadebenn <jonahbenn@yahoo.com> Date: Mon Apr 8 21:38:34 2024 -0500 update build presets commit39a8029fda
Author: jadebenn <jonahbenn@yahoo.com> Date: Mon Apr 8 20:30:06 2024 -0500 update github actions commit7eae64f8a6
Author: jadebenn <jonahbenn@yahoo.com> Date: Mon Apr 8 20:18:46 2024 -0500 disable /WX on MSVC commit24d3bc0ce6
Author: jadebenn <jonahbenn@yahoo.com> Date: Mon Apr 8 20:11:59 2024 -0500 altered cmake configuration scripts commit368f4ccabf
Author: jadebenn <jonahbenn@yahoo.com> Date: Sat Apr 6 23:00:04 2024 -0500 change defaults commit7d7ea68bf9
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 22:23:32 2024 -0500 fix preset commit57d0b12f9b
Author: jadebenn <jonahbenn@yahoo.com> Date: Sat Apr 6 21:50:32 2024 -0500 expand cmake presets commitaa62d357bb
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 20:50:26 2024 -0500 rename gcc to gnu commitd6e4edd886
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 20:27:20 2024 -0500 change runtime output dir commitabe413f239
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 20:22:47 2024 -0500 debug try 2 commitc6c771b892
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 20:16:00 2024 -0500 add debug messages (again) commit6c6966afd2
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 19:46:58 2024 -0500 was not actually fixed commitfab74c90b6
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 19:37:02 2024 -0500 are these messages actually somehow fixing the issue? commita4b6b7c0d9
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 19:27:34 2024 -0500 see if this re-breaks mac commit07626f8ebb
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 19:04:59 2024 -0500 back to debug messages commitbdf9adc0e8
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:55 2024 -0500 Revert "try disabling an apple-specific build rule" This reverts commit45ec66e976
. commit8154207848
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:53 2024 -0500 Revert "more fiddling with mac test builds" This reverts commit0f843c02c9
. commit8f5c10d158
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:52 2024 -0500 Revert "try and narrow down the macos build failure cause" This reverts commit5fd86833fa
. commit54876bf886
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:50 2024 -0500 Revert "try stripping out all the custom macos test logic again" This reverts commitcc15a26ce8
. commit8af35727a6
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:48 2024 -0500 Revert "I'm really just throwing everything to the wall and seeing what sticks" This reverts commit1a05b027fe
. commite143f22ada
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:46 2024 -0500 Revert "more macos tinkering" This reverts commit829ec35b57
. commit495e70c376
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:44 2024 -0500 Revert "implib" This reverts commitd41349d6ed
. commit37dbb52104
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:42 2024 -0500 Revert "try manual link directory specification" This reverts commit0c2d40632e
. commitce568189fc
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:40 2024 -0500 Revert "save me" This reverts commitbd73aa21a9
. commitc420a72016
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:36 2024 -0500 Revert "aaaaaaaaa" This reverts commit338279c396
. commitdccac945bb
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:08 2024 -0500 Revert "paths paths paths" This reverts commit9a7d86aa6c
. commit9a7d86aa6c
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:39:08 2024 -0500 paths paths paths commit338279c396
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:29:01 2024 -0500 aaaaaaaaa commitbd73aa21a9
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:21:16 2024 -0500 save me commit0c2d40632e
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:09:03 2024 -0500 try manual link directory specification commitd41349d6ed
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 17:52:20 2024 -0500 implib commit829ec35b57
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 17:43:47 2024 -0500 more macos tinkering commit1a05b027fe
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 17:18:41 2024 -0500 I'm really just throwing everything to the wall and seeing what sticks commitcc15a26ce8
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 17:09:45 2024 -0500 try stripping out all the custom macos test logic again commit5fd86833fa
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 16:54:53 2024 -0500 try and narrow down the macos build failure cause commit0f843c02c9
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 16:47:19 2024 -0500 more fiddling with mac test builds commit45ec66e976
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 16:29:29 2024 -0500 try disabling an apple-specific build rule commit6e41423dc3
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 04:01:07 2024 -0500 one last MacOS try for the night commitbc79a17ddb
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 03:50:41 2024 -0500 try fixing macos build commitd6031ce9f5
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 03:04:52 2024 -0500 try zero-initializinng this struct to solve docker issue commit24cbd94a80
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 02:34:36 2024 -0500 attempted docker fix commit7812f27330
Merge:ef8029d4
18c27b14
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Fri Apr 5 23:32:29 2024 -0500 Merge branch 'main' into MSVCCompilerFlags commitef8029d46f
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Fri Apr 5 23:30:26 2024 -0500 update cmake configs commit04a7bc2b8d
Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 21:00:23 2024 -0500 edit build script commit9fc6b4e973
Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 18:10:09 2024 -0500 fix build directory issue commita19afaaab0
Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 18:06:37 2024 -0500 update .gitignore commit426d34a0aa
Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 17:58:19 2024 -0500 unexclude toolchain dir commit9ce7d9043c
Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 17:55:02 2024 -0500 updated cmake workflows commitdb5c10c331
Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 16:58:00 2024 -0500 temporarily remove macos build for testing purposes commitf7da00ff89
Merge:145f97cf
661e0939
Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 16:51:39 2024 -0500 Merge branch 'MSVCCompilerFlags' of https://github.com/jadebenn/DarkflameServer into MSVCCompilerFlags commit145f97cfdc
Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 16:50:39 2024 -0500 build reorganization and experimental clang support commit661e0939b7
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Wed Apr 3 22:13:11 2024 -0500 fix typo in windows preset commit018e5707d7
Author: jadebenn <jonahbenn@yahoo.com> Date: Wed Apr 3 20:30:33 2024 -0500 try using compiler flags for mac instead commit81e5f059d5
Author: jadebenn <jonahbenn@yahoo.com> Date: Wed Apr 3 20:20:31 2024 -0500 macos refuses to work :( commita3d70197f2
Author: jadebenn <jonahbenn@yahoo.com> Date: Wed Apr 3 20:13:37 2024 -0500 try adding build types back to mac commit005d439a4a
Author: jadebenn <jonahbenn@yahoo.com> Date: Wed Apr 3 19:58:44 2024 -0500 edit macos presets commitbba825f0c8
Author: jadebenn <jonahbenn@yahoo.com> Date: Wed Apr 3 19:48:20 2024 -0500 update CMake presets commit199c8224a5
Merge:1116ba83
c1c5db65
Author: jadebenn <jonahbenn@yahoo.com> Date: Wed Apr 3 19:00:39 2024 -0500 Merge remote-tracking branch 'upstream/main' into MSVCCompilerFlags commit1116ba8306
Merge:9316bd6e
c7b3d9e8
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sun Feb 11 21:03:02 2024 -0600 Merge branch 'DarkflameUniverse:main' into MSVCCompilerFlags commit9316bd6eeb
Merge:62fb8ad0
29666a1f
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Feb 10 21:02:52 2024 -0600 Merge branch 'DarkflameUniverse:main' into MSVCCompilerFlags commit62fb8ad071
Merge:d5089b72
24f94edf
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Thu Feb 8 21:41:50 2024 -0600 Merge branch 'DarkflameUniverse:main' into MSVCCompilerFlags commitd5089b72cc
Author: jadebenn <jonahbenn@yahoo.com> Date: Sun Feb 4 16:26:38 2024 -0600 add Linux debug preset commit7c9f56ff76
Author: jadebenn <jonahbenn@yahoo.com> Date: Sat Feb 3 16:02:53 2024 -0600 move out g++ O2 flag commit6cc99fae42
Merge:96276391
050184c5
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Feb 3 02:41:43 2024 -0600 Merge branch 'DarkflameUniverse:main' into MSVCCompilerFlags commit962763916d
Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 22:00:49 2024 -0600 export the compile commands so I can see if they're having any effect commit4b7d1d6593
Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 21:49:24 2024 -0600 trying 'init' flags instead commit3fa80063e9
Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 21:13:47 2024 -0600 ONE MORE TIME commitae2115c68d
Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 20:52:33 2024 -0600 final(?) try for now commit119937f5d9
Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 20:34:44 2024 -0600 ditto commitab39754597
Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 20:34:41 2024 -0600 testing if these even have any effect commite7058be3dc
Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 20:28:05 2024 -0600 third test commit10d7776fb2
Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 19:33:59 2024 -0600 trying more variations on the flags commit70f3756098
Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 18:49:46 2024 -0600 testing commit9b7c593ae9
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Tue Jan 30 08:49:53 2024 -0600 Update CMakePresets.json commit8a34544d0e
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Tue Jan 30 08:44:29 2024 -0600 test moving flags to json commitb682f13fa9
Merge:2239507d
d78b5087
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Mon Jan 29 22:49:29 2024 -0600 Merge branch 'DarkflameUniverse:main' into MSVCCompilerFlags commit2239507d3c
Author: jadebenn <jadebenn@users.noreply.github.com> Date: Mon Jan 29 06:14:47 2024 -0600 Add MSVC optimization flags
This commit is contained in:
parent
de3fe93100
commit
7b819d508b
30
.github/workflows/build-and-test.yml
vendored
30
.github/workflows/build-and-test.yml
vendored
@ -16,12 +16,12 @@ jobs:
|
||||
os: [ windows-2022, ubuntu-22.04, macos-13 ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: Add msbuild to PATH (Windows only)
|
||||
if: ${{ matrix.os == 'windows-2022' }}
|
||||
uses: microsoft/setup-msbuild@v1.1
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
with:
|
||||
vs-version: '[17,18)'
|
||||
msbuild-architecture: x64
|
||||
@ -33,21 +33,19 @@ jobs:
|
||||
- name: cmake
|
||||
uses: lukka/run-cmake@v10
|
||||
with:
|
||||
configurePreset: "ci-${{matrix.os}}"
|
||||
buildPreset: "ci-${{matrix.os}}"
|
||||
testPreset: "ci-${{matrix.os}}"
|
||||
workflowPreset: "ci-${{matrix.os}}"
|
||||
- name: artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: build-${{matrix.os}}
|
||||
path: |
|
||||
build/*Server*
|
||||
build/*.ini
|
||||
build/*.so
|
||||
build/*.dll
|
||||
build/vanity/
|
||||
build/navmeshes/
|
||||
build/migrations/
|
||||
build/*.dcf
|
||||
!build/*.pdb
|
||||
!build/d*/
|
||||
build/*/*Server*
|
||||
build/*/*.ini
|
||||
build/*/*.so
|
||||
build/*/*.dll
|
||||
build/*/vanity/
|
||||
build/*/navmeshes/
|
||||
build/*/migrations/
|
||||
build/*/*.dcf
|
||||
!build/*/*.pdb
|
||||
!build/*/d*/
|
||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -122,4 +122,7 @@ docker/__pycache__
|
||||
docker-compose.override.yml
|
||||
|
||||
!*Test.bin
|
||||
|
||||
# CMake scripts
|
||||
!cmake/*
|
||||
!cmake/toolchains/*
|
||||
|
@ -1,5 +1,8 @@
|
||||
cmake_minimum_required(VERSION 3.25)
|
||||
project(Darkflame)
|
||||
project(Darkflame
|
||||
HOMEPAGE_URL "https://github.com/DarkflameUniverse/DarkflameServer"
|
||||
LANGUAGES C CXX
|
||||
)
|
||||
|
||||
# check if the path to the source directory contains a space
|
||||
if("${CMAKE_SOURCE_DIR}" MATCHES " ")
|
||||
@ -8,8 +11,10 @@ endif()
|
||||
|
||||
include(CTest)
|
||||
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # Export the compile commands for debugging
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0063 NEW) # Set CMAKE visibility policy to NEW on project and subprojects
|
||||
set(CMAKE_VISIBILITY_INLINES_HIDDEN ON) # Set C and C++ symbol visibility to hide inlined functions
|
||||
@ -61,35 +66,36 @@ set(RECASTNAVIGATION_EXAMPLES OFF CACHE BOOL "" FORCE)
|
||||
# Disabled no-register
|
||||
# Disabled unknown pragmas because Linux doesn't understand Windows pragmas.
|
||||
if(UNIX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -Wuninitialized -fPIC")
|
||||
add_compile_options("-fPIC")
|
||||
add_compile_definitions(_GLIBCXX_USE_CXX11_ABI=0 _GLIBCXX_USE_CXX17_ABI=0)
|
||||
|
||||
if(NOT APPLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -lstdc++fs")
|
||||
# For all except Clang and Apple Clang
|
||||
if(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
add_compile_options("-static-libgcc" "-lstdc++fs")
|
||||
endif()
|
||||
|
||||
if(${DYNAMIC} AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -rdynamic")
|
||||
add_compile_options("-rdynamic")
|
||||
endif()
|
||||
|
||||
if(${GGDB})
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb")
|
||||
add_compile_options("-ggdb")
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -O2 -fPIC")
|
||||
elseif(MSVC)
|
||||
# Skip warning for invalid conversion from size_t to uint32_t for all targets below for now
|
||||
# Also disable non-portable MSVC volatile behavior
|
||||
add_compile_options("/wd4267" "/utf-8" "/volatile:iso")
|
||||
add_compile_options("/wd4267" "/utf-8" "/volatile:iso" "/Zc:inline")
|
||||
elseif(WIN32)
|
||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
# Our output dir
|
||||
set(CMAKE_BINARY_DIR ${PROJECT_BINARY_DIR})
|
||||
#set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON) # unfortunately, forces all libraries to be built in series, which will slow down the build process
|
||||
|
||||
# TODO make this not have to override the build type directories
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR})
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR})
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR})
|
||||
@ -109,31 +115,39 @@ make_directory(${CMAKE_BINARY_DIR}/resServer)
|
||||
# Create a /logs directory
|
||||
make_directory(${CMAKE_BINARY_DIR}/logs)
|
||||
|
||||
# Get DLU config directory
|
||||
if(DEFINED ENV{DLU_CONFIG_DIR})
|
||||
set(DLU_CONFIG_DIR $ENV{DLU_CONFIG_DIR})
|
||||
else()
|
||||
set(DLU_CONFIG_DIR ${PROJECT_BINARY_DIR})
|
||||
endif()
|
||||
message(STATUS "Variable: DLU_CONFIG_DIR = ${DLU_CONFIG_DIR}")
|
||||
|
||||
# Copy resource files on first build
|
||||
set(RESOURCE_FILES "sharedconfig.ini" "authconfig.ini" "chatconfig.ini" "worldconfig.ini" "masterconfig.ini" "blocklist.dcf")
|
||||
message(STATUS "Checking resource file integrity")
|
||||
|
||||
include(Utils)
|
||||
UpdateConfigOption(${PROJECT_BINARY_DIR}/authconfig.ini "port" "auth_server_port")
|
||||
UpdateConfigOption(${PROJECT_BINARY_DIR}/chatconfig.ini "port" "chat_server_port")
|
||||
UpdateConfigOption(${PROJECT_BINARY_DIR}/masterconfig.ini "port" "master_server_port")
|
||||
UpdateConfigOption(${DLU_CONFIG_DIR}/authconfig.ini "port" "auth_server_port")
|
||||
UpdateConfigOption(${DLU_CONFIG_DIR}/chatconfig.ini "port" "chat_server_port")
|
||||
UpdateConfigOption(${DLU_CONFIG_DIR}/masterconfig.ini "port" "master_server_port")
|
||||
|
||||
foreach(resource_file ${RESOURCE_FILES})
|
||||
set(file_size 0)
|
||||
|
||||
if(EXISTS ${PROJECT_BINARY_DIR}/${resource_file})
|
||||
file(SIZE ${PROJECT_BINARY_DIR}/${resource_file} file_size)
|
||||
if(EXISTS ${DLU_CONFIG_DIR}/${resource_file})
|
||||
file(SIZE ${DLU_CONFIG_DIR}/${resource_file} file_size)
|
||||
endif()
|
||||
|
||||
if(${file_size} EQUAL 0)
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/resources/${resource_file} ${PROJECT_BINARY_DIR}/${resource_file}
|
||||
${CMAKE_SOURCE_DIR}/resources/${resource_file} ${DLU_CONFIG_DIR}/${resource_file}
|
||||
COPYONLY
|
||||
)
|
||||
message(STATUS "Moved " ${resource_file} " to project binary directory")
|
||||
message(STATUS "Moved " ${resource_file} " to DLU config directory")
|
||||
elseif(resource_file MATCHES ".ini")
|
||||
message(STATUS "Checking " ${resource_file} " for missing config options")
|
||||
file(READ ${PROJECT_BINARY_DIR}/${resource_file} current_file_contents)
|
||||
file(READ ${DLU_CONFIG_DIR}/${resource_file} current_file_contents)
|
||||
string(REPLACE "\\\n" "" current_file_contents ${current_file_contents})
|
||||
string(REPLACE "\n" ";" current_file_contents ${current_file_contents})
|
||||
set(parsed_current_file_contents "")
|
||||
@ -164,10 +178,10 @@ foreach(resource_file ${RESOURCE_FILES})
|
||||
set(line_to_add ${line_to_add} ${line})
|
||||
|
||||
foreach(line_to_append ${line_to_add})
|
||||
file(APPEND ${PROJECT_BINARY_DIR}/${resource_file} "\n" ${line_to_append})
|
||||
file(APPEND ${DLU_CONFIG_DIR}/${resource_file} "\n" ${line_to_append})
|
||||
endforeach()
|
||||
|
||||
file(APPEND ${PROJECT_BINARY_DIR}/${resource_file} "\n")
|
||||
file(APPEND ${DLU_CONFIG_DIR}/${resource_file} "\n")
|
||||
endif()
|
||||
|
||||
set(line_to_add "")
|
||||
@ -236,14 +250,15 @@ include_directories(
|
||||
"tests/dGameTests"
|
||||
"tests/dGameTests/dComponentsTests"
|
||||
|
||||
SYSTEM "thirdparty/magic_enum/include/magic_enum"
|
||||
SYSTEM "thirdparty/raknet/Source"
|
||||
SYSTEM "thirdparty/tinyxml2"
|
||||
SYSTEM "thirdparty/recastnavigation"
|
||||
SYSTEM "thirdparty/SQLite"
|
||||
SYSTEM "thirdparty/cpplinq"
|
||||
SYSTEM "thirdparty/cpp-httplib"
|
||||
SYSTEM "thirdparty/MD5"
|
||||
SYSTEM
|
||||
"thirdparty/magic_enum/include/magic_enum"
|
||||
"thirdparty/raknet/Source"
|
||||
"thirdparty/tinyxml2"
|
||||
"thirdparty/recastnavigation"
|
||||
"thirdparty/SQLite"
|
||||
"thirdparty/cpplinq"
|
||||
"thirdparty/cpp-httplib"
|
||||
"thirdparty/MD5"
|
||||
)
|
||||
|
||||
# Add system specfic includes for Apple, Windows and Other Unix OS' (including Linux)
|
||||
@ -252,10 +267,17 @@ if(APPLE)
|
||||
include_directories("/usr/local/include/")
|
||||
endif()
|
||||
|
||||
# Add linking directories:
|
||||
if (UNIX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wold-style-cast -Werror") # Warning flags
|
||||
# Set warning flags
|
||||
if(MSVC)
|
||||
# add_compile_options("/W4")
|
||||
# Want to enable warnings eventually, but WAY too much noise right now
|
||||
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
|
||||
add_compile_options("-Wuninitialized" "-Wold-style-cast")
|
||||
else()
|
||||
message(WARNING "Unknown compiler: '${CMAKE_CXX_COMPILER_ID}' - No warning flags enabled.")
|
||||
endif()
|
||||
|
||||
# Add linking directories:
|
||||
file(
|
||||
GLOB HEADERS_DZONEMANAGER
|
||||
LIST_DIRECTORIES false
|
||||
|
@ -1,128 +1,641 @@
|
||||
{
|
||||
"version": 3,
|
||||
"cmakeMinimumRequired": {
|
||||
"major": 3,
|
||||
"minor": 14,
|
||||
"patch": 0
|
||||
},
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "default",
|
||||
"displayName": "Default configure step",
|
||||
"description": "Use 'build' dir and Unix makefiles",
|
||||
"binaryDir": "${sourceDir}/build",
|
||||
"generator": "Unix Makefiles"
|
||||
},
|
||||
{
|
||||
"name": "ci-ubuntu-22.04",
|
||||
"displayName": "CI configure step for Ubuntu",
|
||||
"description": "Same as default, Used in GitHub actions workflow",
|
||||
"inherits": "default"
|
||||
},
|
||||
{
|
||||
"name": "ci-macos-13",
|
||||
"displayName": "CI configure step for MacOS",
|
||||
"description": "Same as default, Used in GitHub actions workflow",
|
||||
"inherits": "default"
|
||||
},
|
||||
{
|
||||
"name": "ci-windows-2022",
|
||||
"displayName": "CI configure step for Windows",
|
||||
"description": "Set architecture to 64-bit (b/c RakNet)",
|
||||
"inherits": "default",
|
||||
"generator": "Visual Studio 17 2022",
|
||||
"architecture": {
|
||||
"value": "x64"
|
||||
},
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "windows-default",
|
||||
"inherits": "ci-windows-2022",
|
||||
"displayName": "Windows only Configure Settings",
|
||||
"description": "Sets build and install directories",
|
||||
"generator": "Ninja",
|
||||
"architecture": {
|
||||
"value": "x64",
|
||||
"strategy": "external"
|
||||
}
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
{
|
||||
"name": "default",
|
||||
"configurePreset": "default",
|
||||
"displayName": "Default Build",
|
||||
"description": "Default Build",
|
||||
"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": "RelWithDebInfo",
|
||||
"jobs": 2
|
||||
},
|
||||
{
|
||||
"name": "ci-ubuntu-22.04",
|
||||
"configurePreset": "ci-ubuntu-22.04",
|
||||
"displayName": "Linux CI Build",
|
||||
"description": "This preset is used by the CI build on linux",
|
||||
"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
|
||||
}
|
||||
],
|
||||
"testPresets": [
|
||||
{
|
||||
"name": "ci-ubuntu-22.04",
|
||||
"configurePreset": "ci-ubuntu-22.04",
|
||||
"displayName": "CI Tests on Linux",
|
||||
"description": "Runs all tests on a linux configuration",
|
||||
"execution": {
|
||||
"jobs": 2
|
||||
"version": 6,
|
||||
"cmakeMinimumRequired": {
|
||||
"major": 3,
|
||||
"minor": 25,
|
||||
"patch": 0
|
||||
},
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "default",
|
||||
"displayName": "Default configure step",
|
||||
"description": "Use 'build' dir and Unix makefiles",
|
||||
"binaryDir": "${sourceDir}/build",
|
||||
"environment": {
|
||||
"DLU_CONFIG_DIR": "${sourceDir}/build"
|
||||
},
|
||||
"generator": "Unix Makefiles"
|
||||
},
|
||||
"output": {
|
||||
"outputOnFailure": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ci-macos-13",
|
||||
"configurePreset": "ci-macos-13",
|
||||
"displayName": "CI Tests on MacOS",
|
||||
"description": "Runs all tests on a Mac configuration",
|
||||
"execution": {
|
||||
"jobs": 2
|
||||
},
|
||||
"output": {
|
||||
"outputOnFailure": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ci-windows-2022",
|
||||
"configurePreset": "ci-windows-2022",
|
||||
"displayName": "CI Tests on windows",
|
||||
"description": "Runs all tests on a windows configuration",
|
||||
"configuration": "RelWithDebInfo",
|
||||
"execution": {
|
||||
"jobs": 2
|
||||
},
|
||||
"output": {
|
||||
"outputOnFailure": true
|
||||
},
|
||||
"filter": {
|
||||
"exclude": {
|
||||
"name": "((example)|(minigzip))+"
|
||||
{
|
||||
"name": "debug-config",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "relwithdebinfo-config",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "release-config",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "clang-config",
|
||||
"hidden": true,
|
||||
"toolchainFile": "${sourceDir}/cmake/toolchains/linux-clang.cmake"
|
||||
},
|
||||
{
|
||||
"name": "gnu-config",
|
||||
"hidden": true,
|
||||
"toolchainFile": "${sourceDir}/cmake/toolchains/linux-gnu.cmake"
|
||||
},
|
||||
{
|
||||
"name": "windows-msvc",
|
||||
"inherits": "default",
|
||||
"displayName": "[Multi] Windows (MSVC)",
|
||||
"description": "Set architecture to 64-bit (b/c RakNet)",
|
||||
"generator": "Visual Studio 17 2022",
|
||||
"binaryDir": "${sourceDir}/build/msvc",
|
||||
"architecture": {
|
||||
"value": "x64"
|
||||
},
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "windows-default",
|
||||
"inherits": "windows-msvc",
|
||||
"displayName": "Windows only Configure Settings",
|
||||
"description": "Sets build and install directories",
|
||||
"generator": "Ninja",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
},
|
||||
"architecture": {
|
||||
"value": "x64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-config",
|
||||
"inherits": "default",
|
||||
"hidden": true,
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Linux"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-clang-debug",
|
||||
"inherits": [
|
||||
"linux-config",
|
||||
"clang-config",
|
||||
"debug-config"
|
||||
],
|
||||
"displayName": "EXPERIMENTAL - [Debug] Linux (Clang)",
|
||||
"description": "Create a debug build using the Clang toolchain for Linux",
|
||||
"binaryDir": "${sourceDir}/build/clang-debug"
|
||||
},
|
||||
{
|
||||
"name": "linux-clang-relwithdebinfo",
|
||||
"inherits": [
|
||||
"linux-config",
|
||||
"clang-config",
|
||||
"relwithdebinfo-config"
|
||||
],
|
||||
"displayName": "EXPERIMENTAL - [RelWithDebInfo] Linux (Clang)",
|
||||
"description": "Create a release build with debug info using the Clang toolchain for Linux",
|
||||
"binaryDir": "${sourceDir}/build/clang-relwithdebinfo"
|
||||
},
|
||||
{
|
||||
"name": "linux-clang-release",
|
||||
"inherits": [
|
||||
"linux-config",
|
||||
"clang-config",
|
||||
"release-config"
|
||||
],
|
||||
"displayName": "EXPERIMENTAL - [Release] Linux (Clang)",
|
||||
"description": "Create a release build using the Clang toolchain for Linux",
|
||||
"binaryDir": "${sourceDir}/build/clang-release"
|
||||
},
|
||||
{
|
||||
"name": "linux-gnu-debug",
|
||||
"inherits": [
|
||||
"linux-config",
|
||||
"gnu-config",
|
||||
"debug-config"
|
||||
],
|
||||
"displayName": "[Debug] Linux (GNU)",
|
||||
"description": "Create a debug build using the GNU toolchain for Linux",
|
||||
"binaryDir": "${sourceDir}/build/gnu-debug"
|
||||
},
|
||||
{
|
||||
"name": "linux-gnu-relwithdebinfo",
|
||||
"inherits": [
|
||||
"linux-config",
|
||||
"gnu-config",
|
||||
"relwithdebinfo-config"
|
||||
],
|
||||
"displayName": "[RelWithDebInfo] Linux (GNU)",
|
||||
"description": "Create a release build with debug info using the GNU toolchain for Linux",
|
||||
"binaryDir": "${sourceDir}/build/gnu-relwithdebinfo"
|
||||
},
|
||||
{
|
||||
"name": "linux-gnu-release",
|
||||
"inherits": [
|
||||
"linux-config",
|
||||
"gnu-config",
|
||||
"release-config"
|
||||
],
|
||||
"displayName": "[Release] Linux (GNU)",
|
||||
"description": "Create a release build using the GNU toolchain for Linux",
|
||||
"binaryDir": "${sourceDir}/build/gnu-release"
|
||||
},
|
||||
{
|
||||
"name": "macos",
|
||||
"inherits": "default",
|
||||
"displayName": "[Multi] MacOS",
|
||||
"description": "Create a build for MacOS",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Darwin"
|
||||
},
|
||||
"binaryDir": "${sourceDir}/build/macos"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
{
|
||||
"name": "default",
|
||||
"configurePreset": "default",
|
||||
"displayName": "Default Build",
|
||||
"description": "Default Build",
|
||||
"jobs": 2
|
||||
},
|
||||
{
|
||||
"name": "windows-msvc-debug",
|
||||
"inherits": "default",
|
||||
"configurePreset": "windows-msvc",
|
||||
"displayName": "[Debug] Windows (MSVC)",
|
||||
"description": "This preset is used to build in debug mode using the MSVC toolchain on Windows",
|
||||
"configuration": "Debug"
|
||||
},
|
||||
{
|
||||
"name": "windows-msvc-relwithdebinfo",
|
||||
"inherits": "default",
|
||||
"configurePreset": "windows-msvc",
|
||||
"displayName": "[RelWithDebInfo] Windows (MSVC)",
|
||||
"description": "This preset is used to build in debug mode using the MSVC toolchain on Windows",
|
||||
"configuration": "RelWithDebInfo"
|
||||
},
|
||||
{
|
||||
"name": "windows-msvc-release",
|
||||
"inherits": "default",
|
||||
"configurePreset": "windows-msvc",
|
||||
"displayName": "[Release] Windows (MSVC)",
|
||||
"description": "This preset is used to build in release mode using the MSVC toolchain on Windows",
|
||||
"configuration": "Release"
|
||||
},
|
||||
{
|
||||
"name": "linux-clang-debug",
|
||||
"inherits": "default",
|
||||
"configurePreset": "linux-clang-debug",
|
||||
"displayName": "EXPERIMENTAL - [Debug] Linux (Clang)",
|
||||
"description": "This preset is used to build in debug mode using the Clang toolchain on Linux",
|
||||
"configuration": "Debug"
|
||||
},
|
||||
{
|
||||
"name": "linux-clang-relwithdebinfo",
|
||||
"inherits": "default",
|
||||
"configurePreset": "linux-clang-relwithdebinfo",
|
||||
"displayName": "EXPERIMENTAL - [RelWithDebInfo] Linux (Clang)",
|
||||
"description": "This preset is used to build in release mode with debug info using the Clang toolchain on Linux",
|
||||
"configuration": "RelWithDebInfo"
|
||||
},
|
||||
{
|
||||
"name": "linux-clang-release",
|
||||
"inherits": "default",
|
||||
"configurePreset": "linux-clang-release",
|
||||
"displayName": "EXPERIMENTAL - [Release] Linux (Clang)",
|
||||
"description": "This preset is used to build in release mode using the Clang toolchain on Linux",
|
||||
"configuration": "Release"
|
||||
},
|
||||
{
|
||||
"name": "linux-gnu-debug",
|
||||
"inherits": "default",
|
||||
"configurePreset": "linux-gnu-debug",
|
||||
"displayName": "[Debug] Linux (GNU)",
|
||||
"description": "This preset is used to build in debug mode using the GNU toolchain on Linux",
|
||||
"configuration": "Debug"
|
||||
},
|
||||
{
|
||||
"name": "linux-gnu-relwithdebinfo",
|
||||
"inherits": "default",
|
||||
"configurePreset": "linux-gnu-relwithdebinfo",
|
||||
"displayName": "[RelWithDebInfo] Linux (GNU)",
|
||||
"description": "This preset is used to build in release mode with debug info using the GNU toolchain on Linux",
|
||||
"configuration": "RelWithDebInfo"
|
||||
},
|
||||
{
|
||||
"name": "linux-gnu-release",
|
||||
"inherits": "default",
|
||||
"configurePreset": "linux-gnu-release",
|
||||
"displayName": "[Release] Linux (GNU)",
|
||||
"description": "This preset is used to build in release mode using the GNU toolchain on Linux",
|
||||
"configuration": "Release"
|
||||
},
|
||||
{
|
||||
"name": "macos-debug",
|
||||
"inherits": "default",
|
||||
"configurePreset": "macos",
|
||||
"displayName": "[Debug] MacOS",
|
||||
"description": "This preset is used to build in debug mode on MacOS",
|
||||
"configuration": "Debug"
|
||||
},
|
||||
{
|
||||
"name": "macos-relwithdebinfo",
|
||||
"inherits": "default",
|
||||
"configurePreset": "macos",
|
||||
"displayName": "[RelWithDebInfo] MacOS",
|
||||
"description": "This preset is used to build in release mode with debug info on MacOS",
|
||||
"configuration": "RelWithDebInfo"
|
||||
},
|
||||
{
|
||||
"name": "macos-release",
|
||||
"inherits": "default",
|
||||
"configurePreset": "macos",
|
||||
"displayName": "[Release] MacOS",
|
||||
"description": "This preset is used to build in release mode on MacOS",
|
||||
"configuration": "Release"
|
||||
}
|
||||
],
|
||||
"testPresets": [
|
||||
{
|
||||
"name": "default",
|
||||
"configurePreset": "default",
|
||||
"execution": {
|
||||
"jobs": 2
|
||||
},
|
||||
"output": {
|
||||
"outputOnFailure": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "windows-msvc-test",
|
||||
"inherits": "default",
|
||||
"configurePreset": "windows-msvc",
|
||||
"hidden": true,
|
||||
"filter": {
|
||||
"exclude": {
|
||||
"name": "((example)|(minigzip))+"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "windows-msvc-debug",
|
||||
"inherits": "windows-msvc-test",
|
||||
"configurePreset": "windows-msvc",
|
||||
"displayName": "[Debug] Windows (MSVC)",
|
||||
"description": "Runs all tests on a Windows configuration",
|
||||
"configuration": "Debug"
|
||||
},
|
||||
{
|
||||
"name": "windows-msvc-relwithdebinfo",
|
||||
"inherits": "windows-msvc-test",
|
||||
"configurePreset": "windows-msvc",
|
||||
"displayName": "[RelWithDebInfo] Windows (MSVC)",
|
||||
"description": "Runs all tests on a Windows configuration",
|
||||
"configuration": "RelWithDebInfo"
|
||||
},
|
||||
{
|
||||
"name": "windows-msvc-release",
|
||||
"inherits": "windows-msvc-test",
|
||||
"configurePreset": "windows-msvc",
|
||||
"displayName": "[Release] Windows (MSVC)",
|
||||
"description": "Runs all tests on a Windows configuration",
|
||||
"configuration": "Release"
|
||||
},
|
||||
{
|
||||
"name": "linux-clang-debug",
|
||||
"inherits": "default",
|
||||
"configurePreset": "linux-clang-debug",
|
||||
"displayName": "EXPERIMENTAL - [Debug] Linux (Clang)",
|
||||
"description": "Runs all tests on a Linux Clang configuration",
|
||||
"configuration": "Release"
|
||||
},
|
||||
{
|
||||
"name": "linux-clang-relwithdebinfo",
|
||||
"inherits": "default",
|
||||
"configurePreset": "linux-clang-relwithdebinfo",
|
||||
"displayName": "EXPERIMENTAL - [RelWithDebInfo] Linux (Clang)",
|
||||
"description": "Runs all tests on a Linux Clang configuration",
|
||||
"configuration": "RelWithDebInfo"
|
||||
},
|
||||
{
|
||||
"name": "linux-clang-release",
|
||||
"inherits": "default",
|
||||
"configurePreset": "linux-clang-release",
|
||||
"displayName": "EXPERIMENTAL - [Release] Linux (Clang)",
|
||||
"description": "Runs all tests on a Linux Clang configuration",
|
||||
"configuration": "Release"
|
||||
},
|
||||
{
|
||||
"name": "linux-gnu-debug",
|
||||
"inherits": "default",
|
||||
"configurePreset": "linux-gnu-debug",
|
||||
"displayName": "[Debug] Linux (GNU)",
|
||||
"description": "Runs all tests on a Linux GNU configuration",
|
||||
"configuration": "Release"
|
||||
},
|
||||
{
|
||||
"name": "linux-gnu-relwithdebinfo",
|
||||
"inherits": "default",
|
||||
"configurePreset": "linux-gnu-relwithdebinfo",
|
||||
"displayName": "[RelWithDebInfo] Linux (GNU)",
|
||||
"description": "Runs all tests on a Linux GNU configuration",
|
||||
"configuration": "RelWithDebInfo"
|
||||
},
|
||||
{
|
||||
"name": "linux-gnu-release",
|
||||
"inherits": "default",
|
||||
"configurePreset": "linux-gnu-release",
|
||||
"displayName": "[Release] Linux (GNU)",
|
||||
"description": "Runs all tests on a Linux GNU configuration",
|
||||
"configuration": "Release"
|
||||
},
|
||||
{
|
||||
"name": "macos-debug",
|
||||
"inherits": "default",
|
||||
"configurePreset": "macos",
|
||||
"displayName": "[Debug] MacOS",
|
||||
"description": "Runs all tests on a MacOS configuration",
|
||||
"configuration": "Debug"
|
||||
},
|
||||
{
|
||||
"name": "macos-relwithdebinfo",
|
||||
"inherits": "default",
|
||||
"configurePreset": "macos",
|
||||
"displayName": "[RelWithDebInfo] MacOS",
|
||||
"description": "Runs all tests on a MacOS configuration",
|
||||
"configuration": "RelWithDebInfo"
|
||||
},
|
||||
{
|
||||
"name": "macos-release",
|
||||
"inherits": "default",
|
||||
"configurePreset": "macos",
|
||||
"displayName": "[Release] MacOS",
|
||||
"description": "Runs all tests on a MacOS configuration",
|
||||
"configuration": "Release"
|
||||
}
|
||||
],
|
||||
"workflowPresets": [
|
||||
{
|
||||
"name": "default",
|
||||
"steps": [
|
||||
{
|
||||
"type": "configure",
|
||||
"name": "default"
|
||||
},
|
||||
{
|
||||
"type": "build",
|
||||
"name": "default"
|
||||
},
|
||||
{
|
||||
"type": "test",
|
||||
"name": "default"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "windows-msvc-debug",
|
||||
"displayName": "[Debug] Windows (MSVC)",
|
||||
"description": "MSVC debug workflow preset for Windows",
|
||||
"steps": [
|
||||
{
|
||||
"type": "configure",
|
||||
"name": "windows-msvc"
|
||||
},
|
||||
{
|
||||
"type": "build",
|
||||
"name": "windows-msvc-debug"
|
||||
},
|
||||
{
|
||||
"type": "test",
|
||||
"name": "windows-msvc-debug"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "windows-msvc-relwithdebinfo",
|
||||
"displayName": "[RelWithDebInfo] Windows (MSVC)",
|
||||
"description": "MSVC release with debug info workflow preset for Windows",
|
||||
"steps": [
|
||||
{
|
||||
"type": "configure",
|
||||
"name": "windows-msvc"
|
||||
},
|
||||
{
|
||||
"type": "build",
|
||||
"name": "windows-msvc-relwithdebinfo"
|
||||
},
|
||||
{
|
||||
"type": "test",
|
||||
"name": "windows-msvc-relwithdebinfo"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ci-windows-2022",
|
||||
"displayName": "[Release] Windows (MSVC)",
|
||||
"description": "CI workflow preset for Windows",
|
||||
"steps": [
|
||||
{
|
||||
"type": "configure",
|
||||
"name": "windows-msvc"
|
||||
},
|
||||
{
|
||||
"type": "build",
|
||||
"name": "windows-msvc-release"
|
||||
},
|
||||
{
|
||||
"type": "test",
|
||||
"name": "windows-msvc-release"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "linux-gnu-debug",
|
||||
"displayName": "[Debug] Linux (GNU)",
|
||||
"description": "GNU debug workflow preset for Linux",
|
||||
"steps": [
|
||||
{
|
||||
"type": "configure",
|
||||
"name": "linux-gnu-debug"
|
||||
},
|
||||
{
|
||||
"type": "build",
|
||||
"name": "linux-gnu-debug"
|
||||
},
|
||||
{
|
||||
"type": "test",
|
||||
"name": "linux-gnu-debug"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "linux-gnu-relwithdebinfo",
|
||||
"displayName": "[RelWithDebInfo] Linux (GNU)",
|
||||
"description": "GNU release with debug info workflow preset for Linux",
|
||||
"steps": [
|
||||
{
|
||||
"type": "configure",
|
||||
"name": "linux-gnu-relwithdebinfo"
|
||||
},
|
||||
{
|
||||
"type": "build",
|
||||
"name": "linux-gnu-relwithdebinfo"
|
||||
},
|
||||
{
|
||||
"type": "test",
|
||||
"name": "linux-gnu-relwithdebinfo"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ci-ubuntu-22.04",
|
||||
"displayName": "[Release] Linux (GNU)",
|
||||
"description": "CI workflow preset for Ubuntu",
|
||||
"steps": [
|
||||
{
|
||||
"type": "configure",
|
||||
"name": "linux-gnu-release"
|
||||
},
|
||||
{
|
||||
"type": "build",
|
||||
"name": "linux-gnu-release"
|
||||
},
|
||||
{
|
||||
"type": "test",
|
||||
"name": "linux-gnu-release"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "linux-clang-debug",
|
||||
"displayName": "EXPERIMENTAL - [Debug] Linux (Clang)",
|
||||
"description": "Clang debug workflow preset for Linux",
|
||||
"steps": [
|
||||
{
|
||||
"type": "configure",
|
||||
"name": "linux-clang-debug"
|
||||
},
|
||||
{
|
||||
"type": "build",
|
||||
"name": "linux-clang-debug"
|
||||
},
|
||||
{
|
||||
"type": "test",
|
||||
"name": "linux-clang-debug"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "linux-clang-relwithdebinfo",
|
||||
"displayName": "EXPERIMENTAL - [RelWithDebInfo] Linux (Clang)",
|
||||
"description": "Clang release with debug info workflow preset for Linux",
|
||||
"steps": [
|
||||
{
|
||||
"type": "configure",
|
||||
"name": "linux-clang-relwithdebinfo"
|
||||
},
|
||||
{
|
||||
"type": "build",
|
||||
"name": "linux-clang-relwithdebinfo"
|
||||
},
|
||||
{
|
||||
"type": "test",
|
||||
"name": "linux-clang-relwithdebinfo"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "linux-clang-release",
|
||||
"displayName": "EXPERIMENTAL - [Release] Linux (Clang)",
|
||||
"description": "Clang release workflow preset for Linux",
|
||||
"steps": [
|
||||
{
|
||||
"type": "configure",
|
||||
"name": "linux-clang-release"
|
||||
},
|
||||
{
|
||||
"type": "build",
|
||||
"name": "linux-clang-release"
|
||||
},
|
||||
{
|
||||
"type": "test",
|
||||
"name": "linux-clang-release"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "macos-debug",
|
||||
"displayName": "[Debug] MacOS",
|
||||
"description": "Release workflow preset for MacOS",
|
||||
"steps": [
|
||||
{
|
||||
"type": "configure",
|
||||
"name": "macos"
|
||||
},
|
||||
{
|
||||
"type": "build",
|
||||
"name": "macos-debug"
|
||||
},
|
||||
{
|
||||
"type": "test",
|
||||
"name": "macos-debug"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "macos-relwithdebinfo",
|
||||
"displayName": "[RelWithDebInfo] MacOS",
|
||||
"description": "Release with debug info workflow preset for MacOS",
|
||||
"steps": [
|
||||
{
|
||||
"type": "configure",
|
||||
"name": "macos"
|
||||
},
|
||||
{
|
||||
"type": "build",
|
||||
"name": "macos-relwithdebinfo"
|
||||
},
|
||||
{
|
||||
"type": "test",
|
||||
"name": "macos-relwithdebinfo"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ci-macos-13",
|
||||
"displayName": "[Release] MacOS",
|
||||
"description": "CI workflow preset for MacOS",
|
||||
"steps": [
|
||||
{
|
||||
"type": "configure",
|
||||
"name": "macos"
|
||||
},
|
||||
{
|
||||
"type": "build",
|
||||
"name": "macos-release"
|
||||
},
|
||||
{
|
||||
"type": "test",
|
||||
"name": "macos-release"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
3
build.sh
3
build.sh
@ -6,8 +6,7 @@ mkdir -p build
|
||||
cd build
|
||||
|
||||
# Run cmake to generate make files
|
||||
cmake ..
|
||||
cmake -DCMAKE_BUILD_TYPE="Release" ..
|
||||
|
||||
# To build utilizing multiple cores, append `-j` and the amount of cores to utilize, for example `cmake --build . --config Release -j8'
|
||||
cmake --build . --config Release $1
|
||||
|
||||
|
14
cmake/toolchains/linux-clang.cmake
Normal file
14
cmake/toolchains/linux-clang.cmake
Normal file
@ -0,0 +1,14 @@
|
||||
# Try and find a clang-16 install, falling back to a generic clang install otherwise
|
||||
find_program(CLANG_C_COMPILER clang-16 | clang REQUIRED)
|
||||
find_program(CLANG_CXX_COMPILER clang++-16 | clang++ REQUIRED)
|
||||
|
||||
# Debug messages
|
||||
message(DEBUG "CLANG_C_COMPILER = ${CLANG_C_COMPILER}")
|
||||
message(DEBUG "CLANG_CXX_COMPILER = ${CLANG_CXX_COMPILER}")
|
||||
|
||||
# Set compilers to clang
|
||||
set(CMAKE_C_COMPILER ${CLANG_C_COMPILER})
|
||||
set(CMAKE_CXX_COMPILER ${CLANG_CXX_COMPILER})
|
||||
|
||||
# Set linker to lld
|
||||
add_link_options("-fuse-ld=lld")
|
11
cmake/toolchains/linux-gnu.cmake
Normal file
11
cmake/toolchains/linux-gnu.cmake
Normal file
@ -0,0 +1,11 @@
|
||||
# Try and find a gcc/g++ install
|
||||
find_program(GNU_C_COMPILER cc | gcc REQUIRED)
|
||||
find_program(GNU_CXX_COMPILER c++ | g++ REQUIRED)
|
||||
|
||||
# Debug messages
|
||||
message(DEBUG "GNU_C_COMPILER = ${GNU_C_COMPILER}")
|
||||
message(DEBUG "GNU_CXX_COMPILER = ${GNU_C_COMPILER}")
|
||||
|
||||
# Set compilers to clang
|
||||
set(CMAKE_C_COMPILER ${GNU_C_COMPILER})
|
||||
set(CMAKE_CXX_COMPILER ${GNU_CXX_COMPILER})
|
@ -102,7 +102,7 @@ void VanityUtilities::SpawnVanity() {
|
||||
}
|
||||
|
||||
LWOOBJID SpawnSpawner(const VanityObject& object, const VanityObjectLocation& location) {
|
||||
SceneObject obj;
|
||||
SceneObject obj{};
|
||||
obj.lot = object.m_LOT;
|
||||
// guratantee we have no collisions
|
||||
do {
|
||||
|
@ -6,7 +6,7 @@ set(DMASTERSERVER_SOURCES
|
||||
|
||||
add_library(dMasterServer ${DMASTERSERVER_SOURCES})
|
||||
add_executable(MasterServer "MasterServer.cpp")
|
||||
add_compile_definitions(MasterServer PRIVATE PROJECT_VERSION="\"${PROJECT_VERSION}\"")
|
||||
target_compile_definitions(MasterServer PRIVATE PROJECT_VERSION="\"${PROJECT_VERSION}\"")
|
||||
target_include_directories(dMasterServer PUBLIC "."
|
||||
"${PROJECT_SOURCE_DIR}/dZoneManager" # InstanceManager.h uses dZMCommon.h
|
||||
${PROJECT_SOURCE_DIR}/dServer/ # BinaryPathFinder.h
|
||||
|
@ -4,8 +4,6 @@ enable_testing()
|
||||
find_package(GoogleTest REQUIRED)
|
||||
include(GoogleTest)
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
|
||||
|
||||
if(APPLE)
|
||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH True)
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH True)
|
||||
|
@ -363,7 +363,7 @@ TEST(dCommonTests, AMFBadConversionTest) {
|
||||
ASSERT_EQ(result->Get<double>("BehaviorID"), nullptr);
|
||||
|
||||
// Does not exist in the associative portion
|
||||
ASSERT_EQ(result->Get<nullptr_t>("DOES_NOT_EXIST"), nullptr);
|
||||
ASSERT_EQ(result->Get<std::nullptr_t>("DOES_NOT_EXIST"), nullptr);
|
||||
|
||||
result->Push(true);
|
||||
|
||||
|
@ -78,7 +78,7 @@ TEST(dCommonTests, AMF3InsertionAssociativeTest) {
|
||||
ASSERT_EQ(array.Get<int32_t>("Integer")->GetValueType(), eAmf::Integer);
|
||||
ASSERT_EQ(array.Get<double>("Double")->GetValueType(), eAmf::Double);
|
||||
ASSERT_EQ(array.GetArray("Array")->GetValueType(), eAmf::Array);
|
||||
ASSERT_EQ(array.Get<nullptr_t>("Null")->GetValueType(), eAmf::Null);
|
||||
ASSERT_EQ(array.Get<std::nullptr_t>("Null")->GetValueType(), eAmf::Null);
|
||||
ASSERT_EQ(array.Get<std::vector<uint32_t>>("Undefined")->GetValueType(), eAmf::Undefined);
|
||||
}
|
||||
|
||||
@ -101,6 +101,6 @@ TEST(dCommonTests, AMF3InsertionDenseTest) {
|
||||
ASSERT_EQ(array.Get<int32_t>(4)->GetValueType(), eAmf::Integer);
|
||||
ASSERT_EQ(array.Get<double>(5)->GetValueType(), eAmf::Double);
|
||||
ASSERT_EQ(array.GetArray(6)->GetValueType(), eAmf::Array);
|
||||
ASSERT_EQ(array.Get<nullptr_t>(7)->GetValueType(), eAmf::Null);
|
||||
ASSERT_EQ(array.Get<std::nullptr_t>(7)->GetValueType(), eAmf::Null);
|
||||
ASSERT_EQ(array.Get<std::vector<uint32_t>>(8)->GetValueType(), eAmf::Undefined);
|
||||
}
|
||||
|
2
thirdparty/CMakeLists.txt
vendored
2
thirdparty/CMakeLists.txt
vendored
@ -25,7 +25,7 @@ endif()
|
||||
|
||||
# Need to define this on Clang and GNU for 'strdup' support
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
|
||||
target_compile_definitions(bcrypt PRIVATE "_POSIX_C_SOURCE=200809L")
|
||||
target_compile_definitions(bcrypt PRIVATE "_POSIX_C_SOURCE=200809L")
|
||||
endif()
|
||||
|
||||
target_include_directories(bcrypt INTERFACE "libbcrypt/include")
|
||||
|
2
thirdparty/SQLite/CMakeLists.txt
vendored
2
thirdparty/SQLite/CMakeLists.txt
vendored
@ -11,7 +11,7 @@ if(UNIX)
|
||||
|
||||
# -Wno-unused-result -Wno-unknown-pragmas -fpermissive
|
||||
target_compile_options(sqlite3 PRIVATE)
|
||||
if(NOT APPLE)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(sqlite3 PRIVATE "-Wno-return-local-addr" "-Wno-maybe-uninitialized")
|
||||
else()
|
||||
target_compile_options(sqlite3 PRIVATE "-Wno-return-stack-address" "-Wno-uninitialized" "-Wno-deprecated-declarations")
|
||||
|
Loading…
Reference in New Issue
Block a user