Commit Graph

296 Commits

Author SHA1 Message Date
Winfidonarleyan 9d96e4852a Dep/fmt: update fmt library to 7.0.3 2020-09-11 19:25:35 +02:00
Shauren 19f69fcf06 Build: Put tests-common and sfmt under correct folders when WITH_SOURCE_TREE is set to hierarchical-folders 2020-08-28 15:10:21 +02:00
Shauren b3db50a3b4 Core/Misc: Fix compile errors found with msvc /permissive- 2020-08-04 15:42:08 +02:00
jackpoz 2ea511b9f4 Dep/Boost: Set boost msvc version on Windows to 14.2
14.2 is the only supported one (Visual Studio 2019)
2020-07-28 15:05:12 +02:00
Carbenium 6a28ee7b2a dep: Add catch2 unit test framework and wire it up
To enable the test suite, make sure to configure CMake with -DBUILD_TESTING=1 , since it is disabled by default. The catch2 dependency will be downloaded during configure time.

Also add a new target "tests-common", which includes unit tests for the "common" project. To finally run the tests use the "test" target.

CircleCI: Run unit tests
2020-07-24 12:00:54 +02:00
Giacomo Pozzoni cf5babc302 Dep/Boost: Remove unused thread library (#25076) 2020-07-19 17:43:09 +02:00
Giacomo Pozzoni c54dc3ef92 Dep/Boost: Set boost version to 1.67 on *nix and 1.70 on Windows (#25069) 2020-07-18 18:05:25 +02:00
Shauren 524d167398 Dep: Switch to boost process instead of old standalone version 2020-07-15 19:33:12 +02:00
Peter Keresztes Schmidt 202fd41389 Core/Misc: Replace boost::optional with std::optional (#25047)
C++17 is already mandatory, so it's a safe thing to do
2020-07-15 10:22:29 +02:00
Shauren 042b1abfd7 Fix warnings related to Vector3::operator= and remove -Wno-deprecated-copy suppression 2020-07-13 18:35:13 +02:00
ipriver a46d047f94 fixed indentation for cmake files 2020-06-24 14:42:02 +02:00
Shauren 749a825afe Build: Fix gcc pch builds
(cherry picked from commit 8c4e6c5e14)
2020-06-20 15:11:03 +02:00
Giacomo Pozzoni 995a443da2 Handle different slopes in mmaps (#24765)
* Tools/MMAPs: Remove input argument --maxAngle

Remove input argument --maxAngle . This should be just hardcoded in MapBuilder::GetMapSpecificConfig() so all settings are easily found in the same place instead of being spread around.

* Tools/MMAPs: Add new area type NAV_AREA_GROUND_STEEP

Add new area type NAV_AREA_GROUND_STEEP for ground with slope in the range (55, 70] .
NAV_AREA_GROUND is used for ground with range [0, 55] .
NAV_AREA_GROUND_STEEP takes priority over NAV_AREA_GROUND.

* Tools/MMAPs: Fix NAV_GROUND_STEEP flag not being saved in the mmtile

* Core/PathFinding: Implement NAV_GROUND_STEEP flag

Implement NAV_GROUND_STEEP flag, used only by Creatures that are in combat or evading.

* Distinguish between RC_WALKABLE_AREA and NAV_AREA_GROUND.

* Allow mobs in combat to walk on steeps up to 80°

* Allow mobs in combat to walk on steeps up to 85°.
Disable rcFilterLedgeSpans() filter as it removed long steep spans.

* Increase cost of steep spans to try making creatures walk around obstacles instead of walking on them

* Revert last commit
2020-06-17 22:20:26 +02:00
Giacomo Pozzoni 8c09b6e58b Cherry-pick some cmake commits (#24720)
* Build system: Support  new in cmake 3.17 Ninja Multi-Config generator

(cherry picked from commit 369b618d4f)

* Build system: Fixed PCH with MSVC & Ninja generator

(cherry picked from commit d669f46b6d)

* Core: Fix clang 10 warnings

(cherry picked from commit 7272508cb4)

# Conflicts:
#	src/common/Utilities/Util.h
#	src/server/bnetserver/REST/LoginRESTService.cpp
#	src/server/game/Entities/Object/Position.h
#	src/server/game/Entities/Player/Player.cpp
#	src/server/game/Guilds/GuildFinderMgr.h
#	src/server/game/Movement/Spline/MoveSplineFlag.h
#	src/server/shared/Dynamic/LinkedList.h

* Build system: Set -Wno-deprecated-copy only for clang 10

(cherry picked from commit 7fdeb259ba)

* Core/Misc: GCC build and warning fixes

(cherry picked from commit 4d69cc1c56)

# Conflicts:
#	src/common/Utilities/Util.cpp
#	src/server/database/Database/MySQLConnection.cpp
#	src/server/game/Battlefield/Zones/BattlefieldTB.cpp
#	src/server/game/DataStores/M2Stores.cpp
#	src/server/game/DungeonFinding/LFGMgr.cpp
#	src/server/game/DungeonFinding/LFGPlayerData.cpp
#	src/server/game/Entities/GameObject/GameObject.cpp
#	src/server/game/Entities/Item/Item.cpp
#	src/server/game/Entities/Object/Updates/UpdateFields.h
#	src/server/game/Entities/Player/Player.cpp
#	src/server/game/Entities/Player/RestMgr.cpp
#	src/server/game/Entities/Unit/Unit.cpp
#	src/server/game/Handlers/PetHandler.cpp
#	src/server/game/Server/Packets/GuildPackets.h
#	src/server/game/Spells/Auras/SpellAuraEffects.cpp
#	src/server/game/Spells/Auras/SpellAuras.cpp
#	src/server/game/Spells/Spell.cpp
#	src/server/game/Spells/SpellInfo.cpp
#	src/server/game/Spells/SpellMgr.cpp
#	src/server/scripts/Argus/AntorusTheBurningThrone/boss_garothi_worldbreaker.cpp
#	src/server/scripts/Kalimdor/HallsOfOrigination/instance_halls_of_origination.cpp
#	src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
#	src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
#	src/server/scripts/Northrend/zone_sholazar_basin.cpp
#	src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp
#	src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp
#	src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp
#	src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.cpp
#	src/tools/vmap4_extractor/gameobject_extract.cpp
#	src/tools/vmap4_extractor/model.cpp
#	src/tools/vmap4_extractor/vec3d.h

* Build system: Print found git version when warning about it being too old

(cherry picked from commit 1ae72db201)

* Build system: Removed hard requirement on BOOST_ROOT being set as environment variable, it can now be also passed as command line argument to cmake and fix compile warning with boost 1.73

(cherry picked from commit 161944b764)

# Conflicts:
#	dep/boost/CMakeLists.txt

* Remove some code that was already removed from 335 and then cherry-picked into master

Co-authored-by: Shauren <shauren.trinity@gmail.com>
2020-05-31 14:17:26 +02:00
Shauren 6259763469 Core/Misc: Fix invalid utf-8 comments 2020-03-20 21:53:20 +01:00
daMaex cbe765df7a Core: Build on ARM64 - Raspberry Pi (preferable 4) (#23885)
* build again on aarch64

* include mm_malloc header instead of defining self
2020-02-23 22:37:02 +01:00
Aokromes ed93932537 New year
Say bye bye to every year changing dates
2020-01-02 06:25:50 +01:00
jackpoz 92b25070b9 Dep: Inherit C++ language version from CMake 2019-11-17 12:18:36 +01:00
Giacomo Pozzoni c152e0f415 Core/Build: Fix tools-only build 2019-11-16 16:25:54 +01:00
daMaex 4e0279b0e4 Dep/SFMT: updated to newest upstream version from https://github.com/MersenneTwister-Lab/SFMT
* only needed files added
* used CMake and SFMTRand from https://github.com/TrinityCore/TrinityCore/pull/23240 (Thank you Artox)
2019-11-09 15:09:22 +01:00
daMaex ed2c2941a7 Dep/efsw: updated efsw to newest version (#23894) 2019-11-05 18:38:30 +01:00
daMaex ce916165e2 Core: updated argon2 to latest release (#23893)
* - updated argon2 to latest release from https://github.com/P-H-C/phc-winner-argon2

- modified CMakeLists.txt to use the reference implementation on aarch64

* fixed indentation

* added ARGON2_NO_THREADS definition to argon2 library

* better indentation
2019-11-02 11:04:31 +01:00
daMaex 4bf80e2f18 added jemalloc configuration to CMake for CPU_SINWAIT (#23898) 2019-10-31 08:02:20 +01:00
jackpoz 89cb584780 Dep/Jemalloc: Update to Jemalloc 5.2.1 2019-10-27 18:07:05 +01:00
Shauren 9f7cc32c6e Core/Build: Fix build with boost 1.71 2019-09-14 14:25:33 +02:00
Treeston 4211645834 [3.3.5] Core/Authserver: TOTP rewrite: (PR #23633)
- Proper management commands (.account 2fa)
- Secrets can now be encrypted (set TOTPTokenSecret in .conf)
- Secret now stored in binary
- Argon2 and AES primitives
- Base32/64 support
2019-08-10 21:34:51 +02:00
Shauren b64583b7c1 Build: Fixed dynamic PCH builds 2019-06-02 23:39:24 +02:00
Shauren 9b1dfe5e5e Build: Fixed VS always triggering a full build when PCH is enabled, even if only a source file was edited 2019-06-02 21:09:53 +02:00
jackpoz 5d986f0be4 Dep/Jemalloc: Update to Jemalloc 5.2.0 2019-05-05 20:05:45 +02:00
jackpoz 3d3b7f438c Buildsystem: Fix finding VS 2019 compiled boost libs 2019-04-19 22:37:50 +02:00
jackpoz e061663508 Dep/Recast: Update recastnavigation to https://github.com/recastnavigation/recastnavigation/commit/54bb0943e5174a71eeeca11919920f685760a4f0 2019-04-07 21:05:23 +02:00
jackpoz c602220e02 Core/MMaps: Fix infinite loop in Detour
Fix another infinite loop in Detour caused by degenerated triangles.
Check the result of some previously ignored Detour calls.
Update recastnavigation to 3a619d773deb7e3a15ee215217c825995fe71312 and apply some more custom changes
2019-03-02 19:53:46 +01:00
jackpoz a75fbe527a Dep/Recast: Validate input values more consistently and completely, including that points are finite
Merge https://github.com/recastnavigation/recastnavigation/pull/374 .
This should fix infinite loops happening with degenerated triangles with 0 area.
Fix #23028
2019-02-24 12:18:28 +01:00
jackpoz 12e6faa0fa Core/MMaps: Change infinite loop fix in Detour
Change the infinite loop fix in Detour to allow looping through all the m_nodePool nodes max once, otherwise it most likely means that we entered an infinite loop. This is currently set to 1024.
2019-02-08 22:21:03 +01:00
jackpoz c8ec2dd95d Core/MMaps: Fix infinite loop in Detour
Fix an infinite loop in Detour happening in Dalaran Sewers.
This is more of an emergency patch until we figure out why dtNodes have a circular reference (A -> B -> C -> A) happening quite often in this place
2019-02-06 19:32:31 +01:00
jackpoz 5ff88ea04a Dep/Recast: Update recastnavigation to https://github.com/recastnavigation/recastnavigation/commit/14b2631527c4792e95b2c78ebfa8ac4cd3413363
Rebuilding mmaps IS required
2019-01-26 20:44:27 +01:00
Shauren 5b4eefb6d8 Buildsystem: Configure boost to return error messages encoded using utf8 instead of whatever current system code page is on windows 2019-01-12 18:04:58 +01:00
Treeston fcfcb0eb6f Happy New Year, folks. It's 2019! 2019-01-01 15:45:25 +01:00
Treeston c16d461e16 Core/Util: Redesign SmartEnum to properly work for large enums (>64 entries) and play nice with IDEs (PR #22768) 2018-11-11 17:52:41 +01:00
Treeston ee68cf3392 grr gcc bugs 2018-10-26 19:17:19 +02:00
Treeston 207093475a Util/Enums: Implement constexpr operators ourselves instead of relying on boost, because boost doesn't make them constexpr. 2018-10-26 19:10:31 +02:00
Treeston 338e8ba0fe Core/Misc: Partial merge of 3.3.5-dbedit:
- Added SmartEnum.h for enum iteration, stringification, and more, courtesy of krabicezpapundeklu/smart_enum
- Moved a bunch of enums in SharedDefines.h to the new system
- Miscellaneous utility methods ported
2018-10-26 14:43:22 +02:00
Aokromes 58e297da10 Core/Mmaps: Revert a bad change
Closes #22470 by xvwyh

this doesn't needs to re-extract mmaps.
2018-09-25 12:41:37 +02:00
jackpoz 8fe74bf0f9 Dep/Jemalloc: Update to Jemalloc 5.1.0 2018-05-12 09:37:51 +02:00
jackpoz 171583b984 Dep/Boost: Set boost version to 1.58 on *nix 2018-03-07 20:13:19 +01:00
Shauren b2b4f9d1e4 Core/Misc: Added compatibility layer for boost 1.66 and future std:: networking stuff
* Based on work done by @dimiandre in PR #21173

Closes #21171
Closes #21173

(cherry picked from commit dfd2660a85)
2018-01-06 12:30:28 +01:00
tkrokli f6b6f57a6d Update copyright note for 2018
Best wishes for the new year.
2018-01-01 01:55:29 +01:00
Naios b4a42d1d06 Dep: Update fmt to fmtlib/fmt@f9c97de46b 2017-12-17 20:22:34 +01:00
Naios 92f96fc10e Build: Use the cotire library for precompiled header handling
* Required for handling flags inherited by linked projects
  correctly in the corresponding precompiled header.
* Reduces the maintenance effort for precompiled headers
2017-12-17 20:22:34 +01:00
Naios e60c1f84a7 Build: Use interface targets for inheriting flags and definitions
* Remove the usage of global flags and definitions
  set through the CMAKE_CXX_FLAGS variable.
* Use cmake target compile features for setting the
  CXX standard automatically.
* Make C++14 globally available in the project
* Closes #21033
2017-12-17 20:22:33 +01:00