Commit graph

389 commits

Author SHA1 Message Date
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
Mark de Wever
ca6b656d25 Fixes strict compilation with gcc-4.8 and CMake.
In gcc-4.8 there will be a new warning -Wunused-local-typedefs. This
warning is triggered by boost's static asserts, causing strict
compilation to fail when using this compiler.

Note the compiler is not officially released yet so used a recent
snapshot.
2012-06-09 21:41:05 +00:00
Mark de Wever
f42e941975 Adds the ENABLE_SHARED_LIBRARIES CMake option.
The use of shared libraries makes compilation debug versions faster but
results in extra shared libraries. For installation this is not
practical since the libraries need to be given SONAMES and kept in sync.
Therefore installation is not supported for this option and will
probably fail.

The statistics for the change are:

Static build:
  - Normal:
      real 20m51.604s
      user 19m47.838s
      sys  1m5.100s
      size 94MB
  - Debug:
      real 24m48.577s
      user 23m3.114s
      sys  1m22.305s
      size 1.9GB

Shared build:
  - Normal:
      real 21m5.141s
      user 19m56.879s
      sys  1m7.692s
      size 29MB
  - Debug:
      real 24m24.239s
      user 22m55.278s
      sys  1m20.193s
      size 596MB

So the build times don't change that much but the sizes do. When
rebuilding after changing a file the build times start to improve for
the shared build, but not timing done.
2012-06-08 18:58:10 +00:00
Jérémy Rosen
9ec70dabc5 patch #3092 : Allow to specify default system-wide preferences by lipk 2012-03-05 22:36:26 +00:00
Ignacio R. Morelle
20bcf49f3e Remove custom pool memory allocator per wesnoth-dev mailing list discussion
This affects the cmake and scons scripts, and various project files in
projectfiles/. I have only tested my changes to scons (and loonycyborg
might still want to review the diff regarding a line in src/SConscript
involving game.cpp).
2012-02-19 18:43:20 +00:00
Mark de Wever
b79a56c69a Changed: Default man installation directory.
The new directory confirms to FHS (based on patch #3138).
2012-02-18 13:00:27 +00:00
Mark de Wever
76a112eaa8 Add -Wno-strict-aliasing to compiler flags.
This reverts 2011-07-24T15:10:34Z!crazy-ivanovic@gmx.net, 
since it breaks building the unit tests with g++ 4.4.
2011-08-15 05:26:14 +00:00
Mark de Wever
9e7c002c76 Updated files to bumped Boost requirements.
Updated INSTALL and cmake files. Omitted scons since some parts refer to
versions others don't and the version mentioned differs as well.
2011-08-11 19:37:19 +00:00
Nils Kneuper
c2268b1e9d since 2011-07-24T12:27:21Z!loonycyborg@gmail.com strict-aliasing should be possible again...
...for the old network code, too, so remove this (now no longer
required) flag by default
2011-07-24 15:10:34 +00:00
Nils Kneuper
14bbbf79c9 disable compilation of ANA by default when using cmake...
...(since there seem to be too many problems with it and eg the
official server does not use it anymore either)
2011-07-24 10:49:57 +00:00
Mark de Wever
75be32120b Make boost system mandatory for CMake.
This due to the work loonycyborg does on boost asio. Anonymissimus
please test whether it suffices on Windows.
2011-06-19 12:05:19 +00:00