122 Commits

Author SHA1 Message Date
Shauren
1c487de3b9 Build: Partial revert of 2b38f40988 2025-10-11 14:09:19 +02:00
Shauren
2b38f40988 Build: Enable debug format flag -ggdb3 instead of -g by default for debug builds 2025-10-11 12:47:42 +02:00
Shauren
ccb078da03 Build: Enable /utf-8 flag for msvc 2025-10-11 12:47:41 +02:00
Shauren
c5425196fd Build: Enable more msvc standard conformance options 2025-07-07 18:59:15 +02:00
Shauren
55a19f15d0 Build: Remove -fpch-instantiate-templates detection, it is enabled by default since CMake 3.19 2025-05-02 22:59:45 +02:00
Ovahlord
2b1ad96be1 Build: enable MSVC warning C5038 - member initialization order to get closer to the warning behavior of the other compilers
(cherry picked from commit e36a66d632)
2025-02-04 16:20:39 +01:00
Shauren
93c8993314 Build: Disable -Wmissing-field-initializers for clang, it now mirrors unwanted gcc behavior since version 18 2024-11-25 12:35:44 +01:00
Shauren
e8740fb2e1 Core/Misc: CompilerDefs/GitRevision improvements
* Removed INTEL as a separate platform (it does not belong there)
* Removed BORLAND from known compilers list (it was never supported)
* Simplified TRINITY_PLATFORM_WINDOWS detection (_WIN32 is always defined)
* Rename revision_data.h macros that begin with a underscore
* Added processor architecture to --version string
* Added Linux distribution name to .server debug
* Fixed some revision_data.h macros missing/wrong values when regenerated during compilation
* Removed manual adding of _WIN64 macro from cmake (it is predefined internally by compiler)
2024-09-03 12:06:16 +02:00
Shauren
d93002f9a9 Build: Disable maybe-uninitialized warning for GCC that incorrectly triggers with std::optional 2024-07-20 12:08:23 +02:00
Shauren
77fe2745fe Build: CMake cleanup
* Migrate all add_definitions to target_compile_definitions
* Remove -D from preprocessor definitions added by target_compile_definitions (unneccessary, cmake strips it anyway)
* Fixed NO_BUFFERPOOL not being set on g3d if jemalloc is used
* Moved library/compiler specific compile flag settings spread all over various CMakeLists to their related library/compiler file
* Remove ancient manual link flag settings for worldserver
2024-07-15 15:24:35 +02:00
Shauren
12d1f4448c Build: Decouple compiler specific settings from os settings 2024-06-15 17:07:25 +02:00
Shauren
a7c42f1ed5 Build: Normalize executable locations in build directory for all platforms 2024-06-15 16:01:22 +02:00
Shauren
078bc6fe3f Build: Unify setting _BUILD_DIRECTIVE preprocessor macro for all compilers 2024-06-15 13:34:44 +02:00
Shauren
1083e89da3 Build: Remove unneccessary /MP compile option when using ninja 2024-06-01 11:45:39 +02:00
Shauren
16853af7c8 Build: Update required GCC version to 11.1 2024-04-10 13:52:06 +02:00
Shauren
261a237cfa Core/Misc: Fixed windows nopch build 2024-03-11 18:17:08 +01:00
Shauren
20b29c5ff5 Core/Misc: Allow formatting optionals with Trinity::StringFormat 2024-02-28 20:42:20 +01:00
Shauren
7e51d17a0a Build: Improve ARM target detection in cmake (needed by MSVC) 2024-02-17 01:13:36 +01:00
Shauren
eb847ff537 Build: Fixed msvc version check 2023-10-29 12:14:36 +01:00
Shauren
0a0b420d86 Build: Support ASAN on msvc 2023-08-22 12:56:13 +02:00
Shauren
0aa644287c Build/GCC: Disable useless warning 2023-07-30 00:23:31 +02:00
Shauren
1ed8bfa080 Build: Increase required msvc version slightly 2023-07-25 11:42:08 +02:00
Ovahlord
d535977c6d Build: moved MSVC warning C5054 from warning level 4 to 3 2023-07-11 18:49:52 +02:00
Shauren
8d353f20fd Build: Fixed copypaste mistake in appleclang version check 2023-04-10 14:09:23 +02:00
Shauren
083b8d6c84 Core/Misc: Fix build with libc++
Closes #28909
2023-04-10 00:08:32 +02:00
Shauren
0a1b40241a Build: Update required compilers to current debian stable and VS 2022
GCC: 10
Clang: 11
MSVC: 2022
2023-01-01 00:26:53 +01:00
Shauren
0b846b2107 Build: Partial support for clang-cl 2022-02-16 20:22:15 +01:00
Shauren
bd4e5b6d0b Build: New CMake option -DBUILD_TIME_ANALYSIS=1 for clang (enables detailed compile time statistics that can be later viewed with ClangBuildAnalyzer) 2022-02-11 22:25:49 +01:00
Shauren
fe35971d2f Build: Instantiate templates during PCH generation with clang 11+ (this should make PCH more effective in reducing compile times, closer to MSVC) 2022-02-11 22:23:42 +01:00
Treeston
be9dadc189 Common/Utilities: Centralize string -> T conversion in StringConvert.h (PR #25335)
(cherry picked from commit cd30e0b86c)
2022-02-04 00:27:13 +01:00
Treeston
cfcfe71097 Build: Add Clang version guard to CMake (PR #25324)
(cherry picked from commit 27b1930d97)
2022-02-04 00:27:13 +01:00
Giacomo Pozzoni
f8b6137a4c Build/GCC: Raise required version to 8.3.0 (#25297)
Even when building with Clang, make sure to have libstdc++ >= 8

(cherry picked from commit 41d70a5905)
2022-02-04 00:27:11 +01:00
Shauren
2864efdc53 Build: Disable Visual Studio 2022 MSBuild resource manager to make compile take only as much time as it does in Visual Studio 2019 2022-01-28 12:52:05 +01:00
Shauren
41fe9a84d4 Build: Enable /permissive- flag on msvc
(cherry picked from commit c8fed48b16)
2022-01-26 14:20:47 +01:00
Peter Keresztes Schmidt
44ea32ace4 Build: Enable -Wimplicit-fallthrough on clang (#25056)
* Misc: Use [[fallthrough]] attribute instead of comment to mark intentional fallthroughs

Related: #25006

* Misc: Add some missing breaks (no-ops) to satisfy clang

Related: #25006
Closes #25055

* Build: Enable -Wimplicit-fallthrough on clang

Closes #25006
2022-01-23 22:16:15 +01:00
Shauren
d4568a90b1 Fix warnings related to Vector3::operator= and remove -Wno-deprecated-copy suppression
(cherry picked from commit 042b1abfd7)
2022-01-23 00:18:39 +01:00
Shauren
73b4b1733a Build: Enable some msvc warnings that are enabled for other compilers 2022-01-21 13:43:19 +01:00
ipriver
bde36062b7 fixed indentation for cmake files
(cherry picked from commit a46d047f94)
2022-01-06 23:40:39 +01:00
Giacomo Pozzoni
89e183704c Improve multithreading of mmaps_generator (#25625)
* Build/Misc: Add a few *San CMake flags

Add the following flags for the related tools:
- MSAN for Memory Sanitizer
- UBSAN for Undefined Behavior Sanitizer
- TSAN for Thread Sanitizer

* Remove unused parameter

* Fix UBSan reported issue

* Disable G3D buffer pools when using Thread Sanitizer as it has its custom locking mechanisms

* Code cleanup

* Move threads from maps to tiles

* Move tile building logic to TileBuilder class

* Fix memory leak in TileBuilder

* Fix build

* Store TileBuilder as raw pointer for now, it will be changed later on to use modern C++ constructs

* Fix crash on shutdown

* Revert pvs-studio change

* Fix generating 1 single tile not closing the program

(cherry picked from commit a4e93d779c)
2022-01-04 20:44:25 +01:00
daMaex
31efaaac40 Core: build on aarch64 with gcc (#24216)
* build on aarch64 with gcc

* Core/aarch64: readability on preprocessor macro

* Core/aarch64: TC C++ codestyle adjustment

(cherry picked from commit ce449f6b53)
2021-12-22 20:50:53 +01:00
Giacomo Pozzoni
fe489e2be1 Build: Enable and require c++17 (#23868)
* Build: Enable and require c++17

* Build: Raise Visual Studio version from 2017 15.2 to 2017 15.9

* Build: Raise GCC version from 6.3.0 to 7.1.0

* Reduce branch differences

* Fix build after latest merge

* Cleanup after latest merge

(cherry picked from commit 726d5e91b5)
2021-12-21 01:20:51 +01:00
jackpoz
58fe0f9e4a Build/Misc: Add ASan CMake flag
Allow to enable/disable Address Sanitizer in Clang and GCC from CMake flag "ASAN" of type Boolean. It can be enabled passing -DASAN=TRUE to CMake.

(cherry picked from commit 580f40769c)
2021-12-18 23:03:00 +01:00
Shauren
629ec3a14d Build: Check -Wno-deprecated-copy existence using check_cxx_source_compiles instead of hardcoding clang version number 2021-10-01 11:19:39 +02:00
Shauren
4d69cc1c56 Core/Misc: GCC build and warning fixes 2020-05-21 22:15:58 +02:00
Shauren
7fdeb259ba Build system: Set -Wno-deprecated-copy only for clang 10 2020-04-26 01:48:41 +02:00
Shauren
7272508cb4 Core: Fix clang 10 warnings 2020-04-26 01:25:50 +02:00
Shauren
369b618d4f Build system: Support new in cmake 3.17 Ninja Multi-Config generator 2020-04-16 17:53:36 +02:00
Giacomo Pozzoni
77154e0c03 Require Visual Studio 2019 16.4 or greater (#24214)
* CI/AppVeyor: Add appveyor.yml file

* Build: Require Visual Studio 2019 16.4 or greater

* CI/AppVeyor: Upgrade to VS2019 image

* Update cmake error message

* CI/AppVeyor: Fix appveyor VS 2019 configuration

(cherry picked from commit 1df52da0b0)
2020-04-04 18:35:58 +02:00
Shauren
b0609757d3 Build/Misc: Removed -DDEBUG from clang compile options 2018-03-16 21:13:09 +01:00
Naios
db5d5a03be Build: Export a default interface which doesn't hide symbols in unix automatically 2017-12-20 04:04:28 +01:00