282 Commits

Author SHA1 Message Date
pentarctagon
49b6ede463 Move most strict warning flags to the default build flags.
This moves all the warnings flags from the strict build to the regular build, except for -Werror. This means that the only difference between strict builds and non-strict builds will be if warnings are turned into errors.
2017-12-03 15:30:52 -06:00
Severin Glöckner
e0cebdd402 desktop_entry: include high resolution icons
wesnoth-optipng has been applied to the new images
2017-11-27 01:52:36 +01:00
pentarctagon
42a44ff668 Remove ENABLE_TOOLS and ENABLE_SDL2_TOOLS from cmake. 2017-11-25 12:01:49 -06:00
pentarctagon
75b73043e3 Remove MSVC support from cmake. 2017-11-25 12:01:49 -06:00
pentarctagon
7ff30491fe Make strict builds consistent between scons and cmake 2017-11-24 15:00:01 -06:00
Gregory A Lundberg
81fc44ad5d Fix typos in ad01dbd404e092e258fece5d1ad473fea1717d12 2017-11-23 16:32:56 -06:00
pentarctagon
a4a1cec637 Remove -rdynamic from the linker. 2017-11-22 07:16:16 +02:00
Gregory A Lundberg
5d7f268b59 Partially revert 321c350
Accidental revert of PR 2212 (whose commit is completely gone).
2017-11-20 10:52:06 -06:00
Jyrki Vesterinen
321c350d76 Merge branch 'static-libs'
Manual merge of pull request #2208.
2017-11-20 07:52:54 +02:00
David Seifert
0e57d0840a Use GNUInstallDirs to specify directories
* GNUInstallDirs is the only Kitware-supported
  way to change the default directories. Most
  distributions have hooks for changing these
  directories, which makes integrating wesnoth
  easier and more consistent with the rest of
  the CMake ecosystem.
* Make build system perfectly out-of-source
  compatible. The build system should never
  touch files in the source tree.
2017-11-20 07:44:46 +02:00
pentarctagon
e45e824499 Have scons and cmake link against same static libraries. 2017-11-20 07:38:18 +02:00
David Seifert
0f2b585fc5 Bring back LOCALEDIR
* The current infrastructure relies on `LOCALEDIR`
  in places beyond CMake, hence we need to keep
  it for the time being.

Fixes #2211
2017-11-18 10:36:12 -06:00
David Seifert
533c0b8005 Use GNUInstallDirs to specify directories
* GNUInstallDirs is the only Kitware-supported
  way to change the default directories. Most
  distributions have hooks for changing these
  directories, which makes integrating wesnoth
  easier and more consistent with the rest of
  the CMake ecosystem.
* Make build system perfectly out-of-source
  compatible. The build system should never
  touch files in the source tree.
2017-11-17 13:41:32 -06:00
pentarctagon
c9c0a9e762 Add extra_flags to cmake. 2017-11-13 00:23:02 +11:00
Gregory A Lundberg
ad01dbd404 Quell CMake Warning CMP005 Deprecated 2017-11-06 20:32:48 +02:00
Jyrki Vesterinen
0c137c79cf Globally suppress -Wmaybe-uninitialized
We have needed to suppress it in a bunch of places because GCC has kept
giving false positives depending on optimization settings. When I noticed
yet another false positive when I attempted to build the game with PGO
profiling data using CMake, it was the last straw.

Let's just suppress the warning globally and move on with our lives.
2017-10-27 21:28:06 +03:00
pentarctagon
757762b1e6 Add support for PGO builds. 2017-10-27 20:43:36 +03:00
pentarctagon
e43ccc670f Add Profile build to cmake to match scons. 2017-10-12 23:35:36 -05:00
pentarctagon
152c40d206 Address feedback. 2017-10-09 19:58:24 +03:00
pentarctagon
2f3502b607 Re-added things based on replies, and added glibcxx_debug ability to cmake. 2017-10-09 19:58:24 +03:00
pentarctagon
449bd3f632 Fixup as requested. 2017-10-07 09:53:30 +03:00
pentarctagon
76d0cc45af Removed Optimized build, improved gcc LTO support, add clang LTO support. 2017-10-07 09:53:30 +03:00
galegosimpatico
8b0d7e6799 On Boost: update build scripts and documentation.
At branch 'doc-from-discord-boost-discussion-20170926'.

The build documentation and scripts were slightly out of date about
Boost. This commit makes a (probably interim) update to them.

(CMakeLists.txt|SConstruct): `wesnoth` won't build using Boost earlier
than '1.50.0'. Boost 1.50.0 changed the location of version 3 of Boost
filesystem, from 'boost/filesystem/v3/' (e.g. for
'using boost::filesystem::v3::path;') to 'boost/filesystem/' (e.g. for
'using boost::filesystem::path;', enforced since the very introduction
of 'src/filesystem_boost.cpp'), making it incompatible unless using
precompiler directives for supporting backwards versions of Boost
filesystem prior than '1.50.0'. Using Boost 1.50.0 (and 51, 52 etc.)
`wesnoth` is able build and run. I checked using `ldd` that I am right
about the run time environment.

INSTALL.md: Requirement of Boost libraries version up to date.

projectfiles/VC12/README.md: Requirement of Boost libraries up to
date, only the statement of which one is the minimum version, not the
rest of the build guide for Boost as requirement.

.gitignore: Add KDevelop backup documents.
2017-10-06 20:38:50 +03:00
Jyrki Vesterinen
56433d12a3 Merge branch 'login_save_crypt' 2017-05-22 20:10:09 +03:00
Nils Kneuper
d41396ac32 bump version requirements for boost to meet INSTALL.md 2017-05-20 19:35:54 +02:00
Celtic Minstrel
c9191c9812 Add OpenSSL's libcrypto as a dependency
This also removes the included SHA1 and MD5 implementations
in favour of those from OpenSSL.

Thanks to @jyrkive for helping to get the CMake build working and
ensuring the game still compiles with OpenSSL 1.1.0.
(The SHA_xxx() aliases were removed in OpenSSL 1.1.0.)
2017-05-12 15:57:13 -04:00
Jyrki Vesterinen
6b8273e003 Require Cairo 1.10 or above
This is needed because the CAIRO_STATUS_INVALID_SIZE constant was added in
that version.

1.10 is old enough that this change shouldn't cause problems for anyone.
For example, Debian Wheezy (2013) has Cairo 1.12.2.
2017-05-02 19:49:13 +03:00
Jyrki Vesterinen
cd79780b68 CMake: demote failure to compile IEEE 754 test from error to warning
Apparently due to a CMake bug, some (but not all) CMake versions attempt to
compile the test with default flags, which means C++98 mode with GCC < 6.
As a result, compiling the test fails, and the whole game fails to build.

@gfgtdf pointed out to me that CMake reports the compile and run status
separately, and therefore it's possible to detect the situation where the
test fails to compile. Thus, I decided to allow building in that situation.
2017-03-13 21:37:44 +02:00
Celtic Minstrel
2417597028 Attempt to fix Travis build
Scons has a space here, and the scons builds work on Travis,
so I figure CMake should also work if a space is added.
2017-03-10 23:34:07 -05:00
loonycyborg
05f9f00289 Update autorevision script with upstream changes
this fixes autorevision errors if running from under su
2017-03-11 04:20:12 +03:00
Andreas Löf
90356fce46 Fix CMAKE build
This fixes the broken includes that stopepd the IEEE 754 check from compiling.
2016-12-28 16:36:17 +13:00
Jyrki Vesterinen
ea55e7dbbc Second attempt to fix builds failing with GCC < 6
9ad78036 fixed it for SCons but not for CMake.

I also removed some test output stuff that I no longer need.
2016-12-23 01:07:13 +02:00
Jyrki Vesterinen
9ad78036b5 Attempted fix for builds failing with compilers older than GCC 6 2016-12-23 00:26:01 +02:00
Jyrki Vesterinen
6c9ff7c4b3 Print the compile output too 2016-12-22 23:53:46 +02:00
Jyrki Vesterinen
1553cc6b6b CMake: print the bit representation of the test number
I need this to investigate why the test is failing in Travis CI.
2016-12-22 22:54:05 +02:00
Jyrki Vesterinen
7968f7ba5e Check that floats are in the IEEE 754 format when building with CMake
SCons version is coming a bit later.
2016-12-22 20:41:30 +02:00
loonycyborg
2ca7cb8a89 Fix naming of Optimized build variant in messages and comments of cmakelists 2016-11-28 15:34:48 +03:00
loonycyborg
60329a87a1 Rename Optimize build variant to Optimized for clarity 2016-11-26 14:59:42 +03:00
Sergey Popov
dd1351dc14 Merge pull request #847 from Pentarctagon/Pentarctagon-optimize-build
Add build which uses higher level of optimization
2016-11-26 01:18:22 +03:00
Celtic Minstrel
dc24fa16f7 Remove option to link libintl instead of Boost.Locale 2016-11-18 12:09:56 -05:00
pentarctagon
9de1f61924 Add -s flag, fix $OPT_FLAGS evaluating as an empty string, and correctly pass the arch needed by Windows with -O3 to the optimize build 2016-11-18 01:27:40 -06:00
pentarctagon
9bc33ff794 Add Optimize build to cmake 2016-11-18 01:27:40 -06:00
Pentarctagon
8ea76ce432 Fix compiling with TDM-GCC-64 and -O3
By default, TDM-GCC-64 was using -march=x86-64, which for whatever reason caused issues when compiling with -O3.  This makes scons force it to use -march=pentiumpro, the same as TDM-GCC-32.  This also changes the release build to use -O3 instead of -O2, which matches the release build default used by cmake and code::blocks.

Added -march=pentiumpro on Windows for -O3 build

m5
2016-11-18 01:27:40 -06:00
Pentarctagon
e55e4a6d60 Make cmake's Release and Debug builds match scons
Let cmake use its default -O3 again

m4
2016-11-18 01:27:40 -06:00
Gregory A Lundberg
f23127e65a Remove LOW_MEM compile-time option
Per @Vultraz
2016-11-11 09:20:56 -06:00
Gregory A Lundberg
0ecbbef033 Apply patch to boost
When using:

    scons strict=true ctool=clang

A number of issues appear concerning a known bug in Boost::Bind; applying the patch which should appear in Boost 1.63. Comments on the Boost ticket indicate this may also be an issue for earlier versions of GCC.

For the ticket, see

    https://svn.boost.org/trac/boost/ticket/12397

and the patch is at

    3c56630b54

NOTE: This does NOT create a dependency upon the patched header. If the header is changed, you must do a full re-build of all sources by hand.
2016-10-16 10:55:09 -05:00
Gregory A Lundberg
34dcd0657f Test for Travis and only require SDL 2.0.2 2016-10-16 03:36:57 -05:00
Gregory A Lundberg
907eb5bf7e Require SDL2 2.0.4 on all target platforms. 2016-10-16 00:55:24 -05:00
Ignacio R. Morelle
7e1798f342 cmake: Drop ENABLE_SDL_GPU option
The code conditionals using SDL_gpu in the source tree are unmaintained
and likely broken. From past discussions with vultraz and Aginor, the
plan ahead is to completely drop SDL_gpu and its support code once
there's no risk of conflict with certain WIP branches.
2016-10-03 07:23:12 -03:00
Ignacio R. Morelle
2c5904ae0a cmake: Remove ENABLE_PANDORA option
Pretty much all of the code for supporting OpenPandora is gone from the
source tree, and the last two mentions have just been slated for
removal, so it's effectively dead.
2016-10-03 07:19:21 -03:00