168 Commits

Author SHA1 Message Date
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
Anonymissimus
23eb9861be exclude LUA_USE_POSIX define from MSVC project file generator 2011-06-13 23:32:16 +00:00
Mark de Wever
ff2f64c59f Use a better way for mkstemp. 2011-06-13 17:24:14 +00:00
Mark de Wever
5f7ad19888 Let Lua use mkstemp' instead of tmpnam'.
It also fixes a linker warning.
2011-06-13 15:58:19 +00:00
Anonymissimus
e25b0ce62d mute more MSVC warnings in the MSVC+cmake build system...
...by adding defines

-D_SCL_SECURE_NO_WARNINGS and

-D_CRT_SECURE_NO_WARNINGS
2011-06-02 19:56:51 +00:00
Lukasz Dobrogowski
91435494d8 Created new command_options object,
...which will be responsible for commandline parsing. Introduces
Boost.Program_options dependency.
2011-05-29 17:31:07 +00:00
Mark de Wever
6e49fbb15d Add some support for the clang compiler.
It fails to link some standard libraries.
Forcing files to be C++ files doesn't set the proper compiler switches
for clang.

Tested with clang 2.9, there are still compilation errors to be sorted
out.
2011-04-25 07:19:25 +00:00
Mark de Wever
e398b69bf8 Fix a compilation error with cmake.
When the game is disabled from the command line the unit tests no
longer compiled. When using cmake normally the game is automatically
enabled and disabling it afterwards doesn't introduce the bug.
2011-04-25 07:19:22 +00:00
Nils Kneuper
fde02c868c revert 2011-04-03T08:21:47Z!crazy-ivanovic@gmx.net to fix bug #17988 introduced by this very commit... 2011-04-03 09:43:12 +00:00
Nils Kneuper
5613b9fc8c zaroth reported that there is a problem in the embedded lua code...
...that automatically results in a warning (and thus error) due to
this flag, so remove it.
2011-04-03 08:21:47 +00:00
Mark de Wever
a2c7ca056e Add OpenMP support to cmake. 2011-03-05 21:17:36 +00:00
Mark de Wever
ff422edc9c Remove the editor option.
This changes causes the editor to be always build. It also sorts the
file entries in the build systems.

loonycyborg please review the scons changes.
2011-02-19 12:25:05 +00:00
Mark de Wever
1f91733b39 Let cmake use absolute locale dirs.
This patch doesn't change the behaviour on Windows.
(Applies patch #2280).
2011-02-17 20:57:45 +00:00
Nils Kneuper
7ba9fa4e8a "tiny gui support"-removal part 2:
remove tinygui specific stuff from CMake

TODO: remove tinygui from scons and data files
2011-02-12 16:24:56 +00:00
Mark de Wever
ea9ff40e58 Add a cmake target to build the design document. 2011-02-08 19:37:36 +00:00
Mark de Wever
7c3380c556 Link to libintl with cmake.
Applied the patch attached to bug #17152.
2011-01-08 20:40:56 +00:00
Mark de Wever
14db2d8b01 Move pot-update dependencies in a separate file.
This allows to move the po4a update tools in the same file and keep the
dependencies better together.
2011-01-02 18:50:00 +00:00
Mark de Wever
3dc8cb92e8 Set the compiler mode to c++98.
It was ansi, which will change to c++0x at some point in the future. In
order to activate that as default by accident force the c++98 mode.
2010-08-27 20:34:58 +00:00
Mark de Wever
72bbd5e443 Update status 2010-07-31 07:11:24 +00:00
Mark de Wever
a1db53630e Convert leading spaces to tabs. 2010-07-30 21:49:42 +00:00
Mark de Wever
6a082b676d Some more consitency in the cmake files. 2010-07-30 21:49:36 +00:00
Nils Kneuper
9a19432e86 add lua support to the cmake recipe
@crab_, mordante, timotei, ...: please check that it really works as
expected (eg msvc builds!), looks good over here with plain
commandline builds
2010-07-30 13:22:34 +00:00