Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/buildsystem2/cmake/BuildConfigMSVC.cmake @ 2621

Last change on this file since 2621 was 2621, checked in by rgrieder, 15 years ago

This commit gets a little ugly, couldn't separate that anymore:

  • Renamed UseTolua.cmake to GenerateLuaBindings.cmake
  • Applied the macros for compiler flags, linker flags, header files and source groups Updated the whole build tree for that
  • Created real compiler config scripts (BuildConfigGCC.cmake and BuildConfigMSVC.cmake)
  • Large scale clean up in BuildConfig.cmake
  • You can now specify your own LibraryConfig and BuildConfig script via CMake Cache
  • Lots of small changes and fixes
  • Property svn:eol-style set to native
File size: 2.5 KB
Line 
1 #
2 #   ORXONOX - the hottest 3D action shooter ever to exist
3 #                    > www.orxonox.net <
4 #
5 #
6 #   License notice:
7 #
8 #   This program is free software; you can redistribute it and/or
9 #   modify it under the terms of the GNU General Public License
10 #   as published by the Free Software Foundation; either version 2
11 #   of the License, or (at your option) any later version.
12 #
13 #   This program is distributed in the hope that it will be useful,
14 #   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 #   GNU General Public License for more details.
17 #
18 #   You should have received a copy of the GNU General Public License
19 #   along with this program; if not, write to the Free Software
20 #   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 #
22 #   Author:
23 #      Reto Grieder
24 #   Co-authors:
25 #      ...
26 #
27
28#################### Compiler Flags #####################
29
30# -MD    Minimal Rebuild
31# -RTC1  Both basic runtime checks
32# -MD[d] Multithreaded [debug] DLL
33# -Zi    Program Database
34# -ZI    Program Database for Edit & Continue
35# -WX    General warning Level X
36# -wdX   Disable specific warning X
37# -wnX   Set warning level of specific warning X to level n
38
39# Overwrite CMake default flags first. Be careful with this
40# Only add (not set) the general compiler flags.
41# CMake default flags : -DWIN32 -D_WINDOWS -W3 -Zm1000
42# additionally for CXX: -EHsc -GR
43ADD_COMPILER_FLAGS("-D__WIN32__ -D_WIN32"      CACHE)
44ADD_COMPILER_FLAGS("-D_CRT_SECURE_NO_WARNINGS" CACHE)
45ADD_COMPILER_FLAGS("-DUNICODE -D_UNICODE"      CACHE)
46ADD_COMPILER_FLAGS("-w44522 -w44251 -w44800"   CACHE)
47
48# Increase warning level if requested
49IF(EXTRA_WARNINGS)
50  REMOVE_COMPILER_FLAGS("-W1 -W2 -W3" CACHE)
51  ADD_COMPILER_FLAGS   ("-W4" CACHE)
52ELSE(EXTRA_WARNINGS)
53  REMOVE_COMPILER_FLAGS("-W1 -W2 -W4" CACHE)
54  ADD_COMPILER_FLAGS   ("-W3" CACHE)
55ENDIF(EXTRA_WARNINGS) 
56
57# Overwrite CMake default flags here.
58SET_COMPILER_FLAGS("-MDd -Od -ZI -D_DEBUG -Gm -RTC1" Debug          CACHE)
59SET_COMPILER_FLAGS("-MD  -O2     -DNDEBUG -MP2"      Release        CACHE)
60SET_COMPILER_FLAGS("-MD  -O2 -Zi -DNDEBUG"           RelWithDebInfo CACHE)
61SET_COMPILER_FLAGS("-MD  -O1     -DNDEBUG -MP2"      MinSizeRel     CACHE)
62
63##################### Linker Flags ######################
64
65# CMake default flags: -MANIFEST -STACK:10000000 -machine:I386
66# and INCREMENTAL and DEBUG for debug versions
67ADD_LINKER_FLAGS("-OPT:REF -OPT:ICF -OPT:NOWIN98" Release MinSizeRel CACHE)
Note: See TracBrowser for help on using the repository browser.