71 Commits

Author SHA1 Message Date
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
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
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
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
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
261a237cfa Core/Misc: Fixed windows nopch build 2024-03-11 18:17:08 +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
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
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
Treeston
cfcfe71097 Build: Add Clang version guard to CMake (PR #25324)
(cherry picked from commit 27b1930d97)
2022-02-04 00:27:13 +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
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
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
Naios
db5d5a03be Build: Export a default interface which doesn't hide symbols in unix automatically 2017-12-20 04:04:28 +01:00
Naios
891960edbe Build: Require Visual Studio 2017 or greater
* See the deprecation notice at
  https://community.trinitycore.org/topic/13294-gcc-49-visual-studio-2015-end-of-life/

(cherry picked from commit b9b667f925)
2017-12-20 04:04:28 +01:00
Naios
edafb45b79 Build: Experimentally disable the /Zm workaround for MSVC
(cherry picked from commit 697b4dbef2)
2017-12-20 04:04:27 +01:00
Naios
ff35262a3a 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

(cherry picked from commit e60c1f84a7)
2017-12-20 04:04:27 +01:00
Shauren
650ab693a8 Buildsystem: Enforce Visual Studio 2015 Update 3 in CMake 2016-08-18 17:45:49 +02:00
Naios
848b8a4136 Core/Scripts: Split script subdirectories into independent modules
* Makes it possible to define the linkage for every module
* Move the ScriptPCH into the root directory
* Changes the SCRIPTS cmake variable to a string type:
  -> -DSCRIPTS=0 is -DSCRIPTS="minimal-static" now
     (builds commands and spells statically)
  -> -DSCRIPTS=1 is -DSCRIPTS="static" now
     (builds all modules statically)
  -> -DSCRIPTS="dynamic"
     (builds all modules dynamically)
  -> Also the default value which is provided by the SCRIPTS
     variable is overwriteable through the SCRIPTS_COMMANDS,
     SCRIPTS_SPELLS... variable.
2016-04-11 21:13:58 +02:00
Shauren
3ebec1e2ce oops, pushed too soon (now with proper msbuild check) 2016-04-09 00:40:43 +02:00
Shauren
509a27fd51 Buildsystem: Improved logic for _BUILD_DIRECTIVE in msvc builds 2016-04-09 00:37:41 +02:00
Shauren
4a3a178d7f Buildsystem: Initial changes to support building with vs clang toolset 2016-04-05 22:43:41 +02:00
Naios
183f970055 Core/Build: Enable /bigobj for most MSVC builds.
* exluding 32 bit when dyynamic linking is disabled.
2016-03-24 01:28:56 +01:00
Naios
f4e0945b13 Core/Build: Add the possibility to link libraries dynamically.
* makes it possible to access exported singletons from other shared lib's.
* reduces binary size
2016-03-24 01:28:55 +01:00
Naios
6eba8493e2 CMake: Disable incremental linking in msvc debug builds
* Requested by Shauren

(cherry picked from commit fbc23c0713)
2016-03-19 23:19:57 +01:00
Naios
0946fcf2aa Core/Build: Never overwrite the msvc cxx flags in the cache
* Setting all compiler flags in the cache led to circular bloating of
  msvc cxx parameters (was visible in console) which caused MSVC to
  rebuild the whole solution even on a small CMake change.
  It's not neccessary anyway to set the cxx parameters to the cache
  to take effect.
* I'm not sure if the workarround is still needed for MSVC 12+.
* Cleaning the CMake cache is recommended!
* ref #15671
2015-10-17 13:11:49 +02:00
Shauren
7732ad5153 Buildsystem/MSVC: Added missed change 2015-08-07 09:29:28 +02:00
Shauren
dcb1990e93 Buildsystem/MSVC: Enabled /Zc:throwingNew for Visual Studio 2015 builds
More info here: http://blogs.msdn.com/b/vcblog/archive/2015/08/06/new-in-vs-2015-zc-throwingnew.aspx

Closes #15230
2015-08-07 00:12:41 +02:00
Shauren
52127197ec Buildsystem/MSVC: Enabled /bigobj for all x64 build types 2015-07-24 19:21:31 +02:00
Shauren
a22e4e121a Core/Misc: Fixing warnings detected by Visual Studio 2015 compiler 2015-07-21 00:33:36 +02:00
Shauren
b7f254db3d Buildsystem/MSVC: Disabled C4351: new behavior: elements of array 'x' will be default initialized for all builds, even when using WITH_WARNINGS 2015-01-06 14:25:23 +01:00
Duarte Duarte
cd0372ce7b CMake: Fix typo in MSVC_EXPECTED_VERSION
Thanks @Aridev

Closes #13820
2014-12-30 16:50:30 +00:00
Nayd
56a665ccf3 CMake: Require VS 2013 Update 3
Update 4 (includes 3) can be downloaded at http://www.microsoft.com/en-us/download/details.aspx?id=44921

Closes #13813
2014-12-29 20:55:53 +00:00
Nayd
702f774a49 CMake: Ignore MSVC warning C4351
new behavior: elements of array 'array' will be default initialized

"If you want the new behavior, which is likely, because the array was explicitly added to the constructor's member initialization list, use the warning pragma to disable the warning. The new behavior should be fine for most users."
2014-12-28 21:22:57 +00:00
Shauren
48b7e0c60c Buildsystem/MSVC: Removed /SAFESEH linker option from x86 debug builds as it doesn't make sense in debug builds and interferes with Edit and Continue
Closes #13233
2014-09-28 12:03:34 +02:00
Shauren
99dd35da14 Buildsystem/MSVC: Disable C4512 warning 2014-07-19 13:31:17 +02:00
leak
e0aed65c8c ACE cleanup on game, now the major issue remains WorldSocket 2014-07-02 02:20:53 +02:00
Shauren
f357597ec1 Buildsystem: Changed required CMake version to 2.8.9 and removed a check for version we no longer support in msvc settings 2014-03-25 16:40:22 +01:00
Vincent-Michael
b4dec55b96 Cmake: Added level restriction for msvc 2013 2014-03-24 15:54:40 +01:00
Nay
1b0c604848 Revert "CMake/MSVC: Fix VS 2013 compile -- Zm500 hack is no longer required"
This reverts commit ca7377369f.
2013-07-30 13:50:29 +01:00
Nay
ca7377369f CMake/MSVC: Fix VS 2013 compile -- Zm500 hack is no longer required
Signed-off-by: Nay <dnpd.dd@gmail.com>
2013-07-19 01:13:26 +01:00