Commit graph

199 commits

Author SHA1 Message Date
Jyrki Vesterinen
406893963f Explicitly link to GObject (should fix #3840) 2019-01-05 19:59:53 +01:00
Ferdinand Thiessen
789588d11e cmake: Fix 'missing-DSO' error when linking against boost_filesystem 2017-08-09 19:18:20 +11:00
Ignacio R. Morelle
2765b538b7 cmake: Disable strict compilation by default
It's no good for users who are likely to hit issues with compilers not
used by the release team.
2015-06-27 20:25:19 -03:00
Nils Kneuper
caf812dd56 enforce cmake default build type (bug #23445)
If no build type is selected it can happen that the game builds without
any optimization. Now the user has to explicitly specify the 'none'
type if they want it.
2015-04-12 11:57:35 +02:00
Nils Kneuper
a41e5e319b fixed building wesnothd without game
thanks mr_bones_ for reporting the issue
2015-01-20 08:08:21 +01:00
Nils Kneuper
c41727fd9e fixed version detection for pandora version
should not require more recent libsdl
building fails miserably when linking:
2014-11-02 22:15:22 +01:00
Chris Beck
f33f8bb3ed in cmake, make PANDORA option force the BFS option to false
Conflicts:
	CMakeLists.txt

I also fix up earlier backport of this content,

cef5e2ed9c

so that when pandora overrides BFS setting, the SDL mixer
requirement is relaxed appropriately.
2014-10-26 15:57:43 -04:00
Chris Beck
433798acb1 Fixup boost filesystem options for cmake, scons
The option should control the compilation, in wesnoth-core, of
filesystem_boost.cpp, and gettext_boost.cpp, vs. the old versions.

Using the new code is now the default option, you must explicitly
deactivate with both cmake and scons to get the old stuff back.

Conflicts:
	CMakeLists.txt
	SConstruct

Also I squash in this commit, adding boost locale to travis:
48217f8da0
2014-10-26 15:57:42 -04:00
Chris Beck
9d48adbfe1 fixup pandora compilation with SDL < 1.2.12
This was checked to compile (but not link of course) on my system,
using cmake with pandora enabled, and pointed to the SDL_mixer
1.2.0 header. (the master version, not this cherry-pick)

I also essentially backported this commit:

cef5e2ed9c

which checks reduces the CMake version requirement for pandora
2014-10-26 02:04:38 -04:00
Chris Beck
55e7ebdfd7 cherry-pick of ab9baacf6e -SDL_RWops
Also adds a saucy repository to travis
2014-10-26 00:27:45 -04:00
Nils Kneuper
9b36ef3207 fix the issue with cmake adding -NDEBUG 2014-02-16 10:45:08 +01:00
Mark de Wever
8a1ff1eca2 Adds -Wold-style-cast to the CMake strict flags. 2014-02-14 21:42:48 +01:00
Mark de Wever
074731d6ac Adds the -Wconditional-uninitialized flag.
The flag is used for pedantic compilation. It also fixes some false
positives in Clang. Since the changes are trival silence the warnings.
2014-02-02 23:03:43 +01:00
Mark de Wever
a2b8589143 Adds -Wextra-semi to pedantic compilation.
Also fixes all warning messages.
2014-01-26 14:24:12 +01:00
Mark de Wever
c8d95a0a92 Disable -Woverloaded-virtual for clang.
Clang 3.4 compiles cleanly with this warning enabled, but Clang 3.2
fails. (Clang 3.3 hasn't been tested.)

This reverts 5fb8dc8a33
2014-01-18 22:30:11 +01:00
Alexander van Gessel
5fb8dc8a33 Don't silence a useful warning in cmake 2014-01-05 18:10:44 +01:00
Mark de Wever
5bb7e90a43 Adds -Wno-documentation-deprecated-sync flag.
Clang 3.4 is unhappy that Doxygen comment with @deprecated is not
accompanied with a deprecated attribute. Since we don't do that, disable
the warning.
2014-01-05 15:37:32 +01:00
Nils Kneuper
2b210da5c9 make sure the OpenPandora build does not crash because of libvorbis
Extension of commit 329e7cea96 by fendrin. Now when a build parameter
is defined, the cmake recipe will no longer link in libvorbisfile (just
linking it in makes the app crash when ogg-vorbis music is played).
2014-01-02 19:04:01 +01:00
Mark de Wever
05ad49a955 Adds -Wno-deprecated-register compiler flag.
This flag is used on strict compilation to avoid warnings regarding the
register keyword being used. It is used in several system headers and the
upcomming Clang 3.4 warns about it.
2013-10-06 17:26:37 +02:00
anonymissimus
afc463b83f cmake/MSVC: deactivate -Wall which doesn't make much sense for MSVC 2013-06-24 23:00:28 -04:00
anonymissimus
f0142feee1 cmake/MSVC: add define NOMINMAX
Not setting this can cause compiler errors when using std::max or
std::min, as the windows header defines macros with these names otherwise.
The standalone project file was doing it that is why I didn't get said
errors there.
2013-06-24 23:00:27 -04:00
anonymissimus
37091437b4 cmake/MSVC: vorbisfile is not required since that code is #ifndef win32 2013-06-24 23:00:27 -04:00
Mark de Wever
dfef23aebc Decreases the pango cairo dependency.
The dependency's version is decreased to version 1.21.3. This is the
version currently used in XCode (on the Mac). Upgrading there is
troublesome.

This partly reverts 2b939cebc7.
2013-06-03 21:32:07 +02:00
Mark de Wever
5301eedbe6 Disable null conversion warning in CMake.
It gives problems when using Clang and boost::shared_ptr when compiling
for C++11. The issue can't be fixed since Wesnoth uses C++98. (So we use
NULL instead of nullptr.)
2013-06-01 11:22:10 +02:00
Mark de Wever
1e766c2246 Add Vorbis support to the CMake build system.
Applies patch #3920.
2013-05-29 20:27:49 +02:00
Mark de Wever
b2353cc016 Improve the autorevision in cmake.
It now sets its default based on an initial testrun.
2013-03-30 19:37:44 +01:00
Eric S. Raymond
7f85fa000c The git transition.
Most references to and dependencies on Subversion have been removed.
"+svn" is now "+dev". Files that can't be fixed yet have a FIXME-GIT
comment in them; most of these are in the website tests.
2013-03-26 10:44:47 -04:00
Mark de Wever
4cb7351cd2 Disable the revision numbers by default.
With the option enable the compilation fails with an exported directory.
Need to look for a better fix later.
2013-03-21 21:39:36 +00:00
Mark de Wever
43f617179e Adds autorevision based revision numbers.
This commit adds the support for CMake.
2013-03-15 20:28:52 +00:00
Mark de Wever
53259cf8c8 Increased the pango cairo dependency to 1.24.4.
Loonycyborg I didn't see a version check in SCons and I didn't add one,
please review.
2013-02-16 09:07:31 +00:00
Mark de Wever
51d837cf65 Adds -Wdocumentation to the CMake pedantic flags. 2013-01-23 19:59:27 +00:00
Mark de Wever
d6ec2a42fb Adds -Wnoexcept to the CMake pedantic flags. 2012-11-05 19:19:20 +00:00
Mark de Wever
17e542dac1 Add -Wc++11-compat to the pedantic flags. 2012-10-07 09:17:50 +00:00
Mark de Wever
7a3fa073da Add -Wuseless-cast to the pedantic flags. 2012-10-07 09:17:47 +00:00
Mark de Wever
300b7702c5 Disable the systemd installation for CMake.
It has the following issues:

- Only works if the user has installed systemd development headers.

- Must install the game or unit test to be able to detect systemd.

- Doesn't work if wesnothd has a prefix or suffix in its name.

- The user has no way to opt-out; installing wesnothd doesn't mean it
  has to be started by default.

It is intended to address all those issues, but it should delay the
release of 1.11.0.
2012-08-25 07:06:19 +00:00
Sergey Popov
c62cccd0ab Added support for installing a systemd unit file for wesnothd 2012-08-24 15:55:19 +00:00
Mark de Wever
7e13a53e4e Add -Wmismatched-tags to the pedantic flags. 2012-07-21 21:10:34 +00:00
Mark de Wever
659d19c4f4 Add -Wdouble-promotion to the pedantic flags. 2012-07-21 21:10:32 +00:00
Mark de Wever
5c38ce6151 Add -Wnon-virtual-dtor to the pedantic flags. 2012-07-21 21:10:29 +00:00
Mark de Wever
00af0909c2 Add -Wctor-dtor-privacy to the pedantic flags. 2012-07-21 21:10:26 +00:00
Mark de Wever
20de726f8a Add -Wredundant-decls to the pedantic flags. 2012-07-17 19:50:56 +00:00
Mark de Wever
0bba0e5afb Add -Wmissing-declarations to the pedantic flags. 2012-07-17 18:42:06 +00:00
Mark de Wever
6f0ffcf9df Fix some issues when using MSVC.
There are still issues remaining, but this fixes some of them. The other
issues are still being investigated.
2012-07-15 20:48:32 +00:00
Mark de Wever
a9732b47fb Add -Wlogical-op to the pedantic flags. 2012-07-15 20:48:27 +00:00
Mark de Wever
9901df4f8b Add -Winit-self to the pedantic flags. 2012-07-14 12:52:39 +00:00
Mark de Wever
1901ab0520 Adds ENABLE_PEDANTIC_COMPILATION CMake option.
The option is disabled by default. More flags will be added after
testing with several compilers.
2012-07-12 18:08:17 +00:00
Mark de Wever
4cbef957f6 Changes the CMake compiler flags.
At the moment the flags are determined on the first run and stored in
CMAKE_CXX_FLAGS, CMAKE_CXX_FLAGS_DEBUG and CMAKE_CXX_FLAGS_RELEASE[*].
This was actuall not a good idea, since CMake combines CMAKE_CXX_FLAGS
with the CMAKE_CXX_FLAGS_<BUILD_TYPE>. The problem with this setup is
when the compiler is changed the flags are reset to their defaults and
the user made changes to the flags are lost. The second issue with the
old implementation is that the ENABLE_STRICT_COMPILATION CMake option
must be directly set; changing its value after the initial generation
had no effect.

The change will only set CMAKE_CXX_FLAGS, based on the environment
variable $CXXFLAGS, this is stored in its own variable, named
CXX_FLAGS_USER, in CMake and can be changed later. This flag is only
initialised on the first run. It is also based on the default flags we
use for Wesnoth and the _current_ state of the ENABLE_STRICT_COMPILATION
option. For the transition from the old to the new system the old
CMAKE_CXX_FLAGS are used as initial value for the CXX_FLAGS_USER. This
means no flags are lost, but some extra flags are added, will CMake to
cause a recompilation. So it's advised to regenerate the project files
or change the CXX_FLAGS_USER after CMake as updated the flags.

[*] Note I removed the CFlags since all C based code has been removed,
with the removal of the poolallocator.
2012-07-10 19:07:04 +00:00
Mark de Wever
3db07df42f Disable a new GCC-4.8 warning.
If triggers in an external C header (png.h).
2012-07-03 19:16:33 +00:00
Mark de Wever
7dec0c6904 Enables strict compilation for Clang in CMake.
The Clang compiler now also defaults to strict compilation when building
with CMake. Also the default flags have changed to the ones used for GCC.
This has only be tested with Clang 3.1.
2012-06-30 19:36:12 +00:00
Mark de Wever
909eb9bd42 Add a cmake macro to test for compiler flags.
This method is more expandable, when adding more tests.
2012-06-30 11:30:32 +00:00