Commit Graph

166 Commits

Author SHA1 Message Date
Shauren
94668343c6 Build: Prevent Catch from messing with user cmake preferences
Closes #25348

(cherry picked from commit 822a1a86d1)
2022-02-04 11:01:08 +01:00
Carbenium
f837f28171 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
(cherry picked from commit 6a28ee7b2a)
2022-01-23 22:48:35 +01:00
ipriver
bde36062b7 fixed indentation for cmake files
(cherry picked from commit a46d047f94)
2022-01-06 23:40:39 +01:00
jackpoz
8d2509eee5 Build/CMake: Code cleanup
(cherry picked from commit 404dbcdcf6)
2021-12-31 21:56:38 +01:00
Shauren
4d153b6cb9 Build: Update FindOpenSSL.cmake and remove custom FindGit
(cherry picked from commit 77596dba67)
2021-10-01 13:02:03 +02:00
Carbenium
f387673aa3 CMake: Use target_precompile_headers instead of cotire with CMake >= 3.16.0 2020-06-16 09:29:31 +02:00
Carbenium
18ad767226 CMake: Remove guards around CMP0043 and CMP0054
We require CMake >= 3.8 which includes the policies.
CMP0043 OLD behaviour is still required by cotire.
2020-06-16 09:29:31 +02:00
jackpoz
c3a7a604f4 Build/CMake: Increase minimum version to 3.8
(cherry picked from commit 965ac6fb08)
2020-06-16 09:29:31 +02:00
Giacomo Pozzoni
0f390606a1 Build/CMake: Set some policies to NEW (#23779)
* Build/CMake: Set CMP0005 to NEW

See https://cmake.org/cmake/help/v3.2/policy/CMP0005.html

* Build/CMake: Set CMP0043 to NEW

See https://cmake.org/cmake/help/v3.2/policy/CMP0043.html

* Build/CMake: Set CMP0074 to NEW

See https://cmake.org/cmake/help/v3.12/policy/CMP0074.html

(cherry picked from commit 18cc36bc67)
2020-06-16 09:29:31 +02:00
Shauren
369b618d4f Build system: Support new in cmake 3.17 Ninja Multi-Config generator 2020-04-16 17:53:36 +02:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
vincent-michael
7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
Naios
964d6bd1b2 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

(cherry picked from commit 92f96fc10e)
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
Naios
01355dc101 Build: Require CMake 3.2
* This is below current package version of
  debian stretch stable CMake on which we
  orientate at.
* Required for CMake target features

(cherry picked from commit e5e7919b64)
2017-10-16 22:54:23 +02:00
Naios
24d3260ab8 Build: Fix the in-source build prevention
(cherry picked from commit 4aa476cbcc)
2017-10-16 22:54:23 +02:00
Shauren
f487ae12bd Buildsystem: Default to RelWithDebInfo instead of Release 2017-08-31 18:10:59 +02:00
vincent-michael
86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01: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
4a3a178d7f Buildsystem: Initial changes to support building with vs clang toolset 2016-04-05 22:43:41 +02: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
0db4f018e8 CMake: Use inherited dependencies in common and tools
(cherry picked from commit abda7a910a)
2016-03-19 23:19:52 +01:00
Naios
b0ac332d58 CMake: Provide proper interface targets from dependencies
* to make use of cmakes inherited link dependencies which
  imports all include directories/ definitions from the link library

(cherry picked from commit 1a572d2425)
2016-03-19 23:19:50 +01:00
Vincent-Michael
478cc756eb Update copyright note for 2016
Happy new year (Again new year with idiots ...)
2016-01-01 00:34:25 +01:00
Naios
1bce131bdc CMake: Fix bad generation of "revision_data.h" not including MYSQL_EXECUTABLE.
* was caused through invoking "FindMySQL" after using ${MYSQL_EXECUTABLE}.
* better re-run CMake if you are affected by the mysql exe wasn't found issue.

(cherry picked from commit 45a60c2d22)
2015-10-05 17:18:15 +02:00
StormBytePP
1d2aafd39b Core/Build: Merge common library and move database out of shared 2015-08-21 17:52:42 +02:00
Naios
ed4722b6e6 CMake: Use source_groups to represent the source tree
* It let ide's (like vs) display the source tree.
* Disabled by default.
* Soft requirement is cmake >= 2.8.12 .
* Offers 2 modes: flat & hierarchical.
* For detailed description see #14471
* Thanks @click for help and advises.
* Closes #14471

(cherry picked from commit c386711972)

Conflicts:
	src/server/authserver/CMakeLists.txt
2015-03-29 16:13:22 +02:00
Vincent-Michael
ab90f74486 Update copyright note for 2015
Happy new year
2015-01-01 00:28:09 +01:00
Shauren
f773a9e053 Core: Implemented IPC (Inter-process communication) between worldserver and bnetserver using ZeroMQ library.
* Implemented ToonReady and ToonLoggedOut battle.net packets
2014-10-17 22:48:06 +02:00
Shauren
febb26d4b7 Core/Deps: MySQL sources out.
Windows users are now required to download and install mysql server with headers and libraries
2014-08-26 18:45:54 +02:00
DDuarte
de3aed580e Build/CMake: Fix build on older cmakes that don't support the recently added policy 2014-07-30 15:52:05 +01:00
DDuarte
202255d935 Build/CMake: Mute a CMake Warning (dev) in mysqllite project 2014-07-30 14:20:17 +01:00
leak
da3f6e923a Completely remove ACE as dependency for TC - kkthxbye 2014-07-06 01:42:35 +02:00
leak
af675195df Enabling Boost by default as it seems to work under linux aswell (Gentoo 13.0 that is) 2014-05-13 21:14:50 +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
20004050bc Update copyright note for 2014.
Happy new year.
2014-01-01 00:07:53 +01:00
Spp
3e2e210890 Core/Build: Force minimum ACE (5.8.3) and OpenSSL (1.0.0) version detection
Core/Build: Do not ignore command line cmake options: ACE_INCLUDE_DIR, ACE_LIBRARY and OPENSSL_INCLUDE_DIR
2013-08-28 15:44:06 +02:00
Spp
d3c2af0f66 Core/Build: Fix compile under Ubuntu 13.04 and openSUSE 12.3 (and probably other new distros)
Closes #9832
Closes #9740
2013-05-21 08:36:52 +02:00
click
dfa56a33e0 Buildsystem/CMake: Correct a few mistakes regarding WITHOUT_GIT, and add a better warning during configure-phase. 2013-02-11 23:27:20 +01:00
click
3178fc4d96 Buildsystem/CMake: Forgot to change variable in main CMakeLists.txt 2013-02-11 20:11:15 +01:00
click
9bd8baf1ab Buildsystem/CMake: Fix an issue with MSVC not finding git-binary when updating the revisionhash/revisiondate + rename DISABLEGITCHECK parameter to WITHOUT_GIT (to adhere to our standard)
Also cleaned up the checks slightly + moved git-specific testing to its own macro (minor changes to shaurens original patch applied)
2013-02-11 20:04:27 +01:00
click
ea9c6524dd Buildsystem/CMake: Revoke commit 7b49da48f9 - it creates unwanted results when used with PCh on *nix platforms. 2013-01-29 23:18:25 +01:00
click
7b49da48f9 Buildsystem/CMake: Change policy CMP0005 to NEW and corect some buildvariables accordingly
** Info from CMake:
**   The OLD behavior for this policy is to place definition values given to add_definitions directly in the generated build rules without attempting to escape anything.
**  The NEW behavior for this policy is to generate correct escapes for all native build tools automatically.

If this breaks build, let us know on irc : irc.rizon.net/#trinity
2013-01-29 15:53:21 +01:00
Vincent_Michael
cc65aba789 Update copyright note for 2013.
Happy new year.
2013-01-01 00:41:01 +01:00
click
8ef48ecc99 Core/Buildsystem: Clean up compileflags when compiling with warnings fully enabled.
-Wwrite-strings is default enabled when -Wall is set in clang/gcc, hence removed.
 -Woverloaded-virtual is now enabled for C++-code only, this removes the useless warnings when dabbling with C-only code.
2012-11-27 00:43:38 +01:00
kiper
8299627ed9 Update headers for 2012. HAPPY NEW YEAR!!! 2012-01-01 00:32:13 +01:00
click
9762c17833 Core/Buildsystem: Update copyright-headers for 2011, and adjust with the correct teamname as well. 2011-04-27 18:17:00 +02:00
runningnak3d
804953911e Core/BuildSystem: Missed cmake file from previous commit. 2011-04-04 15:39:18 -04:00
Shauren
b2404c1a26 Buildsystem: Move EnsureVersion macro-loading into genrevision.cmake. Fixes ensure_version macro not being found. 2011-01-10 19:22:46 +01:00