Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/buildsystem2/cmake/BuildConfigGCC.cmake @ 2614

Last change on this file since 2614 was 2612, checked in by rgrieder, 16 years ago

Rearranged CMake configuration code. I split serveral files in two and moved some code around.
There are no actual code changes!

Details:

  • Everything that involves library finding is in LibraryConfig.cmake. It includes other LibraryConfigXXX.cmake files that set specific options for certain platforms or package configurations (like MSVC or MinGW dependency package).
  • All build related code is in BuildConfig.cmake. The actual compiler configuration is done in BuildConfigXXX.cmake where XXX can be GCC or MSVC.
  • The changes above implied splitting FindOGRE.cmake in two (was going to do it anyway, but rather in a later commit) so that CheckOGREPlugins.cmake is now a separate module.
  • Property svn:eol-style set to native
File size: 1.8 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###### Default Compiler/Linker Options ##########
29# Most people use GCC to compile orxonox, so use that as default
30
31SET(CMAKE_C_FLAGS   "$ENV{CFLAGS}   ${ORXONOX_WARNING_FLAGS} -fPIC")
32SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} ${ORXONOX_WARNING_FLAGS} -fPIC")
33# These flags are added to the flags above
34SET(CMAKE_C_FLAGS_DEBUG            "    -g -ggdb")
35SET(CMAKE_CXX_FLAGS_DEBUG          "    -g -ggdb")
36SET(CMAKE_C_FLAGS_RELEASE          "-O3          -DNDEBUG")
37SET(CMAKE_CXX_FLAGS_RELEASE        "-O3          -DNDEBUG")
38SET(CMAKE_C_FLAGS_RELWITHDEBINFO   "-O2 -g -ggdb -DNDEBUG")
39SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -ggdb -DNDEBUG")
40SET(CMAKE_C_FLAGS_MINSIZEREL       "-Os          -DNDEBUG")
41SET(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os          -DNDEBUG")
42
43SET(CMAKE_LD_FLAGS "$ENV{LDFLAGS}")
44SET(CMAKE_EXE_LINKER_FLAGS    " --no-undefined")
45SET(CMAKE_SHARED_LINKER_FLAGS " --no-undefined")
46SET(CMAKE_MODULE_LINKER_FLAGS " --no-undefined")
Note: See TracBrowser for help on using the repository browser.