mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
* Core/Metric: Add new cmake option WITH_DETAILED_METRICS to enable more metrics
Add more detailed metrics in World::UpdateSessions().
* Attempt using C++17 features
* Fix cmake typo
Co-authored-by: NoName <322016+Faq@users.noreply.github.com>
* Fix build with WITHOUT_METRICS
* Update Performance profiling dashboard with Update sessions panel
* Add panel to show sessions with update time above 100 ms
* Move legends on the right and add max update time diff in the legend of sessions
Co-authored-by: NoName <322016+Faq@users.noreply.github.com>
(cherry picked from commit 36ef487a90)
63 lines
3.3 KiB
CMake
63 lines
3.3 KiB
CMake
# This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
|
|
#
|
|
# This file is free software; as a special exception the author gives
|
|
# unlimited permission to copy and/or distribute it, with or without
|
|
# modifications, as long as this notice is preserved.
|
|
#
|
|
# This program is distributed in the hope that it will be useful, but
|
|
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
option(SERVERS "Build worldserver and bnetserver" 1)
|
|
|
|
set(SCRIPTS_AVAILABLE_OPTIONS none static dynamic minimal-static minimal-dynamic)
|
|
|
|
# Log a fatal error when the value of the SCRIPTS variable isn't a valid option.
|
|
if(SCRIPTS)
|
|
list(FIND SCRIPTS_AVAILABLE_OPTIONS "${SCRIPTS}" SCRIPTS_INDEX)
|
|
if(${SCRIPTS_INDEX} EQUAL -1)
|
|
message(FATAL_ERROR "The value (${SCRIPTS}) of your SCRIPTS variable is invalid! "
|
|
"Allowed values are: ${SCRIPTS_AVAILABLE_OPTIONS} if you still "
|
|
"have problems search on forum for TCE00019.")
|
|
endif()
|
|
endif()
|
|
|
|
set(SCRIPTS "static" CACHE STRING "Build core with scripts")
|
|
set_property(CACHE SCRIPTS PROPERTY STRINGS ${SCRIPTS_AVAILABLE_OPTIONS})
|
|
|
|
# Build a list of all script modules when -DSCRIPT="custom" is selected
|
|
GetScriptModuleList(SCRIPT_MODULE_LIST)
|
|
foreach(SCRIPT_MODULE ${SCRIPT_MODULE_LIST})
|
|
ScriptModuleNameToVariable(${SCRIPT_MODULE} SCRIPT_MODULE_VARIABLE)
|
|
set(${SCRIPT_MODULE_VARIABLE} "default" CACHE STRING "Build type of the ${SCRIPT_MODULE} module.")
|
|
set_property(CACHE ${SCRIPT_MODULE_VARIABLE} PROPERTY STRINGS default disabled static dynamic)
|
|
endforeach()
|
|
|
|
option(TOOLS "Build map/vmap/mmap extraction/assembler tools" 1)
|
|
option(USE_SCRIPTPCH "Use precompiled headers when compiling scripts" 1)
|
|
option(USE_COREPCH "Use precompiled headers when compiling servers" 1)
|
|
option(WITH_DYNAMIC_LINKING "Enable dynamic library linking." 0)
|
|
IsDynamicLinkingRequired(WITH_DYNAMIC_LINKING_FORCED)
|
|
if(WITH_DYNAMIC_LINKING AND WITH_DYNAMIC_LINKING_FORCED)
|
|
set(WITH_DYNAMIC_LINKING_FORCED OFF)
|
|
endif()
|
|
if(WITH_DYNAMIC_LINKING OR WITH_DYNAMIC_LINKING_FORCED)
|
|
set(BUILD_SHARED_LIBS ON)
|
|
else()
|
|
set(BUILD_SHARED_LIBS OFF)
|
|
endif()
|
|
option(WITH_WARNINGS "Show all warnings during compile" 0)
|
|
option(WITH_COREDEBUG "Include additional debug-code in core" 0)
|
|
option(WITH_STRICT_DATABASE_TYPE_CHECKS "Enable strict checking of database field value accessors" 0)
|
|
option(WITHOUT_METRICS "Disable metrics reporting (i.e. InfluxDB and Grafana)" 0)
|
|
option(WITH_DETAILED_METRICS "Enable detailed metrics reporting (i.e. time each session takes to update)" 0)
|
|
option(COPY_CONF "Copy authserver and worldserver .conf.dist files to the project dir" 1)
|
|
set(WITH_SOURCE_TREE "hierarchical" CACHE STRING "Build the source tree for IDE's.")
|
|
set_property(CACHE WITH_SOURCE_TREE PROPERTY STRINGS no flat hierarchical hierarchical-folders)
|
|
option(WITHOUT_GIT "Disable the GIT testing routines" 0)
|
|
option(BUILD_TESTING "Build test suite" 0)
|
|
|
|
if(UNIX)
|
|
option(USE_LD_GOLD "Use GNU gold linker" 0)
|
|
endif()
|