Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2639


Ignore:
Timestamp:
Feb 8, 2009, 12:10:57 AM (15 years ago)
Author:
rgrieder
Message:

Cleanup in OrxonoxConfig.h.in. Made use of various CMake features like CheckInclude or CheckCompiles to determine some options and macros in the config header file.

Also removed util/Integers.h and placed the code directory in OrxonoxConfig.h.in.

Location:
code/branches/buildsystem2
Files:
1 deleted
24 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem2/cmake/BuildConfigMSVC.cmake

    r2626 r2639  
    2424 #
    2525
     26######################## Options ########################
     27
     28OPTION(ACTIVATE_VISUAL_LEAK_DETECTOR "Memory leak detector" FALSE)
     29
    2630#################### Compiler Flags #####################
    2731
     
    4246ADD_COMPILER_FLAGS("-D_CRT_SECURE_NO_WARNINGS" CACHE)
    4347ADD_COMPILER_FLAGS("-DUNICODE -D_UNICODE"      CACHE)
    44 ADD_COMPILER_FLAGS("-w44522 -w44251 -w44800"   CACHE)
     48
     49# Overwrite CMake default flags here.
     50SET_COMPILER_FLAGS("-MDd -Od -ZI -D_DEBUG -Gm -RTC1" Debug          CACHE)
     51SET_COMPILER_FLAGS("-MD  -O2     -DNDEBUG -MP2"      Release        CACHE)
     52SET_COMPILER_FLAGS("-MD  -O2 -Zi -DNDEBUG"           RelWithDebInfo CACHE)
     53SET_COMPILER_FLAGS("-MD  -O1     -DNDEBUG -MP2"      MinSizeRel     CACHE)
     54
     55
     56####################### Warnings ########################
    4557
    4658# Increase warning level if requested
     
    5365ENDIF()
    5466
    55 # Overwrite CMake default flags here.
    56 SET_COMPILER_FLAGS("-MDd -Od -ZI -D_DEBUG -Gm -RTC1" Debug          CACHE)
    57 SET_COMPILER_FLAGS("-MD  -O2     -DNDEBUG -MP2"      Release        CACHE)
    58 SET_COMPILER_FLAGS("-MD  -O2 -Zi -DNDEBUG"           RelWithDebInfo CACHE)
    59 SET_COMPILER_FLAGS("-MD  -O1     -DNDEBUG -MP2"      MinSizeRel     CACHE)
     67# "<type> needs to have dll-interface to be used by clients'
     68# Happens on STL member variables which are not public
     69ADD_COMPILER_FLAGS("-w44251" CACHE)
     70
     71# Multiple assignment operators specified
     72ADD_COMPILER_FLAGS("-w44522" CACHE)
     73
     74# Forcing values to bool
     75ADD_COMPILER_FLAGS("-w44800" CACHE)
     76
     77# This warns about truncation to 255 characters in debug/browse info
     78# ADD_COMPILER_FLAGS("-w44786 -w44503" CACHE)
     79
     80# conversion from 'double' to 'float', possible loss of data
     81# conversion from 'ogg_int64_t' to 'long', possible loss of data
     82# ADD_COMPILER_FLAGS("-w44244" CACHE)
     83
     84# "conversion from 'size_t' to 'unsigned int', possible loss of data
     85# ADD_COMPILER_FLAGS("-w44267" CACHE)
     86
     87# "truncation from 'double' to 'float'
     88# ADD_COMPILER_FLAGS("-w44305" CACHE)
     89
     90# "non dll-interface class used as base for dll-interface class"
     91# ADD_COMPILER_FLAGS("-w44275" CACHE)
     92
     93# "C++ Exception Specification ignored"
     94# This is because MSVC 6 did not implement all the C++ exception
     95# specifications in the ANSI C++ draft.
     96# ADD_COMPILER_FLAGS("-w44290" CACHE)
     97
     98# "no suitable definition provided for explicit template
     99# instantiation request" Occurs in VC7 for no justifiable reason.
     100# ADD_COMPILER_FLAGS("-w44661" CACHE)
     101
     102# Deprecation warnings when using CRT calls in VC8
     103# These show up on all C runtime lib code in VC8, disable since they clutter
     104# the warnings with things we may not be able to do anything about (e.g.
     105# generated code from nvparse etc). I doubt very much that these calls
     106# will ever be actually removed from VC anyway, it would break too much code.
     107# Note: Probably handled by "-DCRT_SECURE_NO_WARNINGS"
     108# ADD_COMPILER_FLAGS("-w44996" CACHE)
     109
     110# "conditional expression constant"
     111# ADD_COMPILER_FLAGS("-w4201" CACHE)
    60112
    61113
  • code/branches/buildsystem2/src/CMakeLists.txt

    r2634 r2639  
    3535################ OrxonoxConfig.h ################
    3636
     37# Check endianness
     38INCLUDE(TestBigEndian)
     39TEST_BIG_ENDIAN(ORXONOX_BIG_ENDIAN)
     40IF(NOT ORXONOX_BIG_ENDIAN)
     41  SET(ORXONOX_LITTLE_ENDIAN TRUE)
     42ENDIF()
     43
     44# 32/64 bit system check
     45IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
     46  SET(ORXONOX_ARCH_64 TRUE)
     47ELSE()
     48  SET(ORXONOX_ARCH_32 TRUE)
     49ENDIF()
     50
     51# Platforms
     52SET(ORXONOX_PLATFORM_WINDOWS ${WIN32})
     53SET(ORXONOX_PLATFORM_APPLE ${APPLE})
     54SET(ORXONOX_PLATFORM_UNIX ${UNIX})
     55IF(UNIX AND NOT APPLE)
     56  SET(ORXONOX_PLATFORM_LINUX TRUE)
     57ENDIF()
     58
     59# Check __forceinline
     60INCLUDE(CheckCXXSourceCompiles)
     61SET(_source "int main() { return 0; } __forceinline void test() { return; }")
     62CHECK_CXX_SOURCE_COMPILES("${_source}" HAVE_FORCEINLINE)
     63
     64# Check ciso646 include (operators in words)
     65INCLUDE(CheckIncludeFileCXX)
     66CHECK_INCLUDE_FILE_CXX(cstdint HAVE_CSTDINT)
     67CHECK_INCLUDE_FILE_CXX(cstddef HAVE_CSTDDEF)
     68CHECK_INCLUDE_FILE_CXX(ciso646 HAVE_CISO646)
     69
     70SET(GENERATED_FILE_COMMENT
     71   "DO NOT EDIT THIS FILE!
     72    It has been automatically generated by CMake from OrxonoxConfig.h.in")
    3773# Copy and configure OrxonoxConfig which gets included in every file
    3874CONFIGURE_FILE(OrxonoxConfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/OrxonoxConfig.h)
  • code/branches/buildsystem2/src/OrxonoxConfig.h.in

    r2619 r2639  
    2121 *
    2222 *   Author:
     23 *      Reto Grieder
     24 *   Co-authors:
    2325 *      ...
    24  *   Co-authors:
    25  *      Reto Grieder
    2626 *
    2727 *   Original code: OgrePlatform.h, licensed under the LGPL. The code
    28  *   has changed quite a bit however.
     28 *   has changed almost completely though.
    2929 *
    3030 */
     
    3434 @brief
    3535    Various constants for compiler, architecture and platform.
     36
     37    @GENERATED_FILE_COMMENT@
    3638 */
    3739
    38 #ifndef _OrxonoxPlatform_H__
    39 #define _OrxonoxPlatform_H__
     40#ifndef _OrxonoxConfig_H__
     41#define _OrxonoxConfig_H__
    4042
    41 /* Initial platform/compiler-related stuff to set. */
     43/*---------------------------------
     44 * Platform and compiler related options
     45 *-------------------------------*/
     46#cmakedefine ORXONOX_PLATFORM_WINDOWS
     47#cmakedefine ORXONOX_PLATFORM_LINUX
     48#cmakedefine ORXONOX_PLATFORM_APPLE
     49#cmakedefine ORXONOX_PLATFORM_UNIX /* Apple and Linux */
    4250
    43 #define ORXONOX_PLATFORM_WIN32 1
    44 #define ORXONOX_PLATFORM_LINUX 2
    45 #define ORXONOX_PLATFORM_APPLE 3
    46 
    47 #define ORXONOX_COMPILER_MSVC 1
    48 #define ORXONOX_COMPILER_GNUC 2
    49 #define ORXONOX_COMPILER_BORL 3
    50 
    51 #define ORXONOX_ENDIAN_LITTLE 1
    52 #define ORXONOX_ENDIAN_BIG 2
    53 
    54 #define ORXONOX_ARCHITECTURE_32 1
    55 #define ORXONOX_ARCHITECTURE_64 2
    56 
    57 
    58 /* Finds the compiler type and version. */
    59 
     51/* Determine compiler and set ORXONOX_COMP_VER */
    6052#if defined( _MSC_VER )
    61 #  define ORXONOX_COMPILER ORXONOX_COMPILER_MSVC
     53#  define ORXONOX_COMPILER_MSVC
    6254#  define ORXONOX_COMP_VER _MSC_VER
    6355
    6456#elif defined( __GNUC__ )
    65 #  define ORXONOX_COMPILER ORXONOX_COMPILER_GNUC
     57#  define ORXONOX_COMPILER_GCC
    6658#  define ORXONOX_COMP_VER (((__GNUC__)*100) + \
    6759        (__GNUC_MINOR__*10) + \
    6860        __GNUC_PATCHLEVEL__)
     61#  if defined(__MINGW32__)
     62#    define ORXONOX_COMPILER_MINGW
     63#  endif
    6964
    7065#elif defined( __BORLANDC__ )
    71 #  define ORXONOX_COMPILER ORXONOX_COMPILER_BORL
     66#  define ORXONOX_COMPILER_BORLAND
    7267#  define ORXONOX_COMP_VER __BCPLUSPLUS__
    7368
    7469#else
    75 #  pragma error "No known compiler. Abort! Abort!"
     70#  pragma error "No known compiler. Abort!"
    7671
    7772#endif
    7873
     74/* Endianness */
     75#cmakedefine ORXONOX_BIG_ENDIAN
     76#cmakedefine ORXONOX_LITTLE_ENDIAN
     77
     78/* Architecture */
     79#cmakedefine ORXONOX_ARCH_32
     80#cmakedefine ORXONOX_ARCH_64
    7981
    8082/* See if we can use __forceinline or if we need to use __inline instead */
    81 #if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
    82 #  if ORXONOX_COMP_VER >= 1200
    83 #    define FORCEINLINE __forceinline
    84 #  endif
    85 #elif defined(__MINGW32__)
    86 #  if !defined(FORCEINLINE)
    87 #    define FORCEINLINE __inline
    88 #  endif
     83#cmakedefine HAVE_FORCEINLINE
     84#ifdef HAVE_FORCEINLINE
     85#  define FORCEINLINE __forceinline
    8986#else
    9087#  define FORCEINLINE __inline
    9188#endif
    9289
    93 /* Finds the current platform */
    94 #if defined( __WIN32__ ) || defined( _WIN32 )
    95 #  define ORXONOX_PLATFORM ORXONOX_PLATFORM_WIN32
    96 #elif defined( __APPLE_CC__)
    97 #  define ORXONOX_PLATFORM ORXONOX_PLATFORM_APPLE
    98 #else
    99 #  define ORXONOX_PLATFORM ORXONOX_PLATFORM_LINUX
    100 #endif
    101 
    102 /* Find the arch type */
    103 #if defined(__x86_64__) || defined(_M_X64) || defined(__powerpc64__) || defined(__alpha__) || defined(__ia64__) || defined(__s390__) || defined(__s390x__)
    104 #  define ORXONOX_ARCH_TYPE ORXONOX_ARCHITECTURE_64
    105 #else
    106 #  define ORXONOX_ARCH_TYPE ORXONOX_ARCHITECTURE_32
    107 #endif
    108 
    10990/* Try to define function information */
    11091#ifndef __FUNCTIONNAME__
    111 #  if ORXONOX_COMPILER == ORXONOX_COMPILER_BORL
     92#  ifdef ORXONOX_COMPILER_BORLAND
    11293#    define __FUNCTIONNAME__ __FUNC__
    113 #  elif ORXONOX_COMPILER == ORXONOX_COMPILER_GNUC
     94#  elif defined(ORXONOX_COMPILER_GCC)
    11495#    define __FUNCTIONNAME__ __PRETTY_FUNCTION__
    115 #  elif ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
     96#  elif defined(ORXONOX_COMPILER_MSVC)
    11697#    define __FUNCTIONNAME__ __FUNCTION__
    11798#  else
     
    120101#endif
    121102
    122 /* Determine whether we're building in debug mode */
    123 #if defined(_DEBUG) || defined(DEBUG)
    124 #  define ORXONOX_DEBUG_MODE 1
    125 #else
    126 #  define ORXONOX_DEBUG_MODE 0
    127 #endif
    128103
    129 /* Define configurable floating point type */
    130 namespace orxonox
    131 {
    132 #ifdef ORXONOX_DOUBLE_PRECISION
    133     typedef double Real;
    134 #else
    135     typedef float  Real;
    136 #endif
    137 }
    138 
    139 /* Set whether we must suffix "ceguilua/" for the CEGUILua.h include */
    140 #cmakedefine CEGUILUA_USE_INTERNAL_LIBRARY
    141 
    142 //-----------------------------------------------------------------------
    143 // Version Information
    144 //-----------------------------------------------------------------------
    145 
    146 #define ORXONOX_VERSION_MAJOR 0
    147 #define ORXONOX_VERSION_MINOR 1
    148 #define ORXONOX_VERSION_PATCH 2
    149 #define ORXONOX_VERSION_SUFFIX ""
    150 #define ORXONOX_VERSION_NAME "Bellatrix"
     104/*---------------------------------
     105 * Version information
     106 *-------------------------------*/
     107#define ORXONOX_VERSION_MAJOR @ORXONOX_VERSION_MAJOR@
     108#define ORXONOX_VERSION_MINOR @ORXONOX_VERSION_MINOR@
     109#define ORXONOX_VERSION_PATCH @ORXONOX_VERSION_PATCH@
     110#define ORXONOX_VERSION_NAME "@ORXONOX_VERSION_NAME@"
    151111
    152112#define ORXONOX_VERSION ((ORXONOX_VERSION_MAJOR << 16) | (ORXONOX_VERSION_MINOR << 8) | ORXONOX_VERSION_PATCH)
     
    154114
    155115/*---------------------------------
    156  * Windows Settings
     116 * Unix settings
    157117 *-------------------------------*/
    158 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
    159 /* Disable unicode support on MingW at the moment, poorly supported in stdlibc++
    160  * STLPORT fixes this though so allow if found
    161  * MinGW C++ Toolkit supports unicode and sets the define __MINGW32_TOOLKIT_UNICODE__ in _mingw.h */
    162 #  if defined( __MINGW32__ ) && !defined(_STLPORT_VERSION)
    163 #    include<_mingw.h>
    164 #    if defined(__MINGW32_TOOLBOX_UNICODE__)
    165 #      define ORXONOX_UNICODE_SUPPORT 1
    166 #    else
    167 #      define ORXONOX_UNICODE_SUPPORT 0
    168 #    endif
    169 #  else
    170 #    define ORXONOX_UNICODE_SUPPORT 1
    171 #  endif
    172 #endif /* Platform Win32 */
    173 
    174 
    175 /*---------------------------------
    176  * Linux/Apple Settings
    177  *-------------------------------*/
    178 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_LINUX || ORXONOX_PLATFORM == ORXONOX_PLATFORM_APPLE
    179 
    180 /* A quick define to overcome different names for the same function */
    181 #  define stricmp strcasecmp
     118#ifdef ORXONOX_PLATFORM_UNIX
    182119
    183120/* TODO: Check what this actually is and whether we need it or not */
    184121#if 0
    185 #  if ORXONOX_PLATFORM == ORXONOX_PLATFORM_APPLE
     122#  ifdef ORXONOX_PLATFORM_APPLE
    186123#    define ORXONOX_PLATFORM_LIB "OrxonoxPlatform.bundle"
    187124#  else
     
    191128#endif
    192129
    193 /* Always enable unicode support for the moment
    194  * Perhaps disable in old versions of gcc if necessary */
    195 #  define ORXONOX_UNICODE_SUPPORT 1
    196 
    197 #endif /* Patform Linux/Apple */
     130#endif /* Patform Unix */
    198131
    199132
     
    201134 * Apple Settings
    202135 *-------------------------------*/
    203 /* For apple, we always have a custom config.h file */
    204 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_APPLE
    205 #  include "config.h"
    206 #endif
    207136
    208137
    209138/*---------------------------------
    210  * Visual Studio Settings
     139 * Includes
    211140 *-------------------------------*/
    212 #if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
    213 /* Turn off warnings generated by long std templates
    214  * This warns about truncation to 255 characters in debug/browse info */
    215 /*#   pragma warning (disable : 4786)*/
     141/* Set whether we must suffix "ceguilua/" for the CEGUILua.h include */
     142#cmakedefine CEGUILUA_USE_INTERNAL_LIBRARY
    216143
    217 /* Turn off warnings generated by long std templates
    218  * This warns about truncation to 255 characters in debug/browse info */
    219 /*#   pragma warning (disable : 4503)*/
     144/* Define the english written operators like and, or, xor
     145 * This is C++ standard, but the Microsoft compiler doesn't define them. */
     146#cmakedefine HAVE_CISO646
     147#ifdef HAVE_CISO646
     148#  include <ciso646>
     149#endif
    220150
    221 /* disable: conversion from 'double' to 'float', possible loss of data
    222  * disable: conversion from 'ogg_int64_t' to 'long', possible loss of data
    223  * This has been dealt with in base_properties of the solution since the
    224  * warning primarily occurs in library header files (which are mostly
    225  * included before OrxonoxPlatform.h is) */
    226 /*#   pragma warning (disable : 4244)*/
     151#cmakedefine HAVE_CSTDINT
     152#ifdef HAVE_CSTDINT
     153#  include <cstdint>
     154#elif defined(ORXONOX_COMPILER_MSVC)
     155typedef __int8            int8_t;
     156typedef __int16           int16_t;
     157typedef __int32           int32_t;
     158typedef __int64           int64_t;
     159typedef unsigned __int8   uint8_t;
     160typedef unsigned __int16  uint16_t;
     161typedef unsigned __int32  uint32_t;
     162typedef unsigned __int64  uint64_t;
     163#endif
    227164
    228 /* disable: "conversion from 'size_t' to 'unsigned int', possible loss of data */
    229 /*#   pragma warning (disable : 4267)*/
     165#cmakedefine HAVE_CSTDDEF
     166#ifdef HAVE_CSTDDEF
     167#  include <cstddef>
     168#endif
    230169
    231 /* disable: "truncation from 'double' to 'float' */
    232 /*#   pragma warning (disable : 4305)*/
     170/* Visual Leak Detector looks for memory leaks */
     171#cmakedefine ACTIVATE_VISUAL_LEAK_DETECTOR
     172#ifdef ACTIVATE_VISUAL_LEAK_DETECTOR
     173#  include <vld.h>
     174#endif
    233175
    234 /* set to level 4: "<type> needs to have dll-interface to be used by clients'
    235  * Happens on STL member variables which are not public therefore is ok */
    236 #   pragma warning (disable : 4251)
    237 
    238 /* disable: 'MultiTypeString' : multiple assignment operators specified
    239  * Used in MultiType and works fine so far */
    240 /*#   pragma warning (disable : 4522)*/
    241 
    242 /* disable: "non dll-interface class used as base for dll-interface class"
    243  * Happens when deriving from Singleton because bug in compiler ignores
    244  * template export */
    245 /*#   pragma warning (disable : 4275)*/
    246 
    247 /* disable: "C++ Exception Specification ignored"
    248  * This is because MSVC 6 did not implement all the C++ exception
    249  * specifications in the ANSI C++ draft. */
    250 /*#   pragma warning( disable : 4290 )*/
    251 
    252 /* disable: "no suitable definition provided for explicit template
    253  * instantiation request" Occurs in VC7 for no justifiable reason on all
    254  * #includes of Singleton */
    255 /*#   pragma warning( disable: 4661)*/
    256 
    257 /* disable: deprecation warnings when using CRT calls in VC8
    258  * These show up on all C runtime lib code in VC8, disable since they clutter
    259  * the warnings with things we may not be able to do anything about (e.g.
    260  * generated code from nvparse etc). I doubt very much that these calls
    261  * will ever be actually removed from VC anyway, it would break too much code. */
    262 /*# pragma warning( disable: 4996)*/
    263 
    264 /* disable: "conditional expression constant", always occurs on
    265  * ORXONOX_MUTEX_CONDITIONAL when no threading enabled */
    266 /*#   pragma warning (disable : 201)*/
    267 
    268 
    269 /* Define the english written operators like and, or, xor */
    270 #include <iso646.h>
    271 
    272 /* include visual leak detector to search for memory leaks */
    273 /* #include <vld.h> */
    274 
    275 #endif /* ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC */
    276 
    277 #endif /* _OrxonoxPlatform_H__ */
     176#endif /* _OrxonoxConfig_H__ */
  • code/branches/buildsystem2/src/audio/AudioPrereqs.h

    r2619 r2639  
    4040// Shared library settings
    4141//-----------------------------------------------------------------------
    42 #if (ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32) && !defined( AUDIO_STATIC_BUILD )
     42#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined( AUDIO_STATIC_BUILD )
    4343#  ifdef AUDIO_SHARED_BUILD
    4444#    define _AudioExport __declspec(dllexport)
     
    6868}
    6969
    70 //-----------------------------------------------------------------------
    71 // Warnings
    72 //-----------------------------------------------------------------------
    73 #if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
    74 
    75 // set to 4: conversion from 'ogg_int64_t' to 'long', possible loss of data
    76 #pragma warning (4 : 4244)
    77 
    78 #endif
    79 
    80 
    8170#endif /* _AudioPrereqs_H__ */
  • code/branches/buildsystem2/src/core/ArgumentCompletionFunctions.cc

    r2087 r2639  
    6363                    startdirectory = ".";
    6464                }
    65 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
     65#ifdef ORXONOX_PLATFORM_WINDOWS
    6666                else
    6767                {
  • code/branches/buildsystem2/src/core/CorePrereqs.h

    r2619 r2639  
    4242// Shared library settings
    4343//-----------------------------------------------------------------------
    44 #if (ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32) && !defined( CORE_STATIC_BUILD )
     44#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined( CORE_STATIC_BUILD )
    4545#  ifdef CORE_SHARED_BUILD
    4646#    define _CoreExport __declspec(dllexport)
  • code/branches/buildsystem2/src/core/Functor.h

    r2087 r2639  
    436436
    437437// disable annoying warning about forcing value to boolean
    438 #if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
     438#ifdef ORXONOX_COMPILER_MSVC
    439439#pragma warning(push)
    440440#pragma warning(disable:4100 4800)
     
    475475}
    476476
    477 #if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
     477#ifdef ORXONOX_COMPILER_MSVC
    478478#pragma warning(pop)
    479479#endif
  • code/branches/buildsystem2/src/network/NetworkPrereqs.h

    r2619 r2639  
    4040// Shared library settings
    4141//-----------------------------------------------------------------------
    42 #if (ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32) && !defined( NETWORK_STATIC_BUILD )
     42#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined( NETWORK_STATIC_BUILD )
    4343#  ifdef NETWORK_SHARED_BUILD
    4444#    define _NetworkExport __declspec(dllexport)
  • code/branches/buildsystem2/src/network/Synchronisable.h

    r2171 r2639  
    3535#include <map>
    3636#include <queue>
    37 #include "util/Integers.h"
    3837#include "core/OrxonoxClass.h"
    3938#include "core/XMLIncludes.h"
    4039#include "NetworkCallback.h"
    41 #include "util/Integers.h"
    4240
    4341#define REGISTERDATA(varname, ...) \
  • code/branches/buildsystem2/src/network/packet/Packet.h

    r2171 r2639  
    3434#include <enet/enet.h>
    3535#include <boost/thread/recursive_mutex.hpp>
    36 
    37 #include "util/Integers.h"
    3836
    3937namespace orxonox {
  • code/branches/buildsystem2/src/orxonox/Main.cc

    r2619 r2639  
    5353#include "gamestates/GSIOConsole.h"
    5454
    55 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_APPLE
     55#ifdef ORXONOX_PLATFORM_APPLE
    5656#include <CoreFoundation/CoreFoundation.h>
    5757
  • code/branches/buildsystem2/src/orxonox/OrxonoxPrereqs.h

    r2619 r2639  
    4141//-----------------------------------------------------------------------
    4242#define ORXONOX_NO_EXPORTS // This is an executable that needs no exports
    43 #if (ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32) && !(defined(ORXONOX_STATIC_BUILD) || defined(ORXONOX_NO_EXPORTS))
     43#if defined(ORXONOX_PLATFORM_WINDOWS) && !(defined(ORXONOX_STATIC_BUILD) || defined(ORXONOX_NO_EXPORTS))
    4444#  ifdef ORXONOX_SHARED_BUILD
    4545#    define _OrxonoxExport __declspec(dllexport)
  • code/branches/buildsystem2/src/orxonox/gamestates/GSGraphics.cc

    r2534 r2639  
    217217        delete this->ogreRoot_;
    218218
    219 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
     219#ifdef ORXONOX_PLATFORM_WINDOWS
    220220        // delete the ogre log and the logManager (since we have created it).
    221221        this->ogreLogger_->getDefaultLog()->removeListener(this);
     
    307307
    308308        // TODO: LogManager doesn't work on oli platform. The why is yet unknown.
    309 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
     309#ifdef ORXONOX_PLATFORM_WINDOWS
    310310        // create a new logManager
    311311        ogreLogger_ = new Ogre::LogManager();
     
    355355
    356356#if 0 // Ogre 1.4.3 doesn't yet support setDebugOutputEnabled(.)
    357 #if ORXONOX_PLATFORM != ORXONOX_PLATFORM_WIN32
     357#ifndef ORXONOX_PLATFORM_WINDOWS
    358358        // tame the ogre ouput so we don't get all the mess in the console
    359359        Ogre::Log* defaultLog = Ogre::LogManager::getSingleton().getDefaultLog();
  • code/branches/buildsystem2/src/orxonox/gamestates/GSRoot.cc

    r2171 r2639  
    4444#include "Settings.h"
    4545
    46 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
     46#ifdef ORXONOX_PLATFORM_WINDOWS
    4747#  ifndef WIN32_LEAN_AND_MEAN
    4848#    define WIN32_LEAN_AND_MEAN
     
    165165    void GSRoot::setThreadAffinity(unsigned int limitToCPU)
    166166    {
    167 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
     167#ifdef ORXONOX_PLATFORM_WINDOWS
    168168        // Get the current process core mask
    169169            DWORD procMask;
  • code/branches/buildsystem2/src/orxonox/pch/havepch/OrxonoxStableHeaders.h

    r2567 r2639  
    5757
    5858//Get around Windows hackery (windows.h is included by Ogre.h)
    59 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
     59#ifdef ORXONOX_PLATFORM_WINDOWS
    6060#  ifdef max
    6161#    undef max
     
    100100//#endif /* ifdef NDEBUG */
    101101
    102 #endif /* ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC && !defined(ORXONOX_DISABLE_PCH) */
     102#endif /* defined(ORXONOX_ENABLE_PCH) */
    103103
    104104#endif /* _OrxonoxStableHeaders_H__ */
  • code/branches/buildsystem2/src/util/CMakeLists.txt

    r2638 r2639  
    2525  Exception.h
    2626  ExprParser.h
    27   Integers.h
    2827  Math.h
    2928  MathConvert.h
     
    5453#SET(UTIL_FILES ${UTIL_SRC_FILES} ${UTIL_HDR_FILES})
    5554GENERATE_SOURCE_GROUPS(${UTIL_FILES})
    56 # Also add OrxonoxConfig.h to have it least somewhere in the IDE
    57 LIST(APPEND UTIL_FILES ${CMAKE_BINARY_DIR}/src/OrxonoxConfig.h)
    58 SOURCE_GROUP("" FILES ${CMAKE_BINARY_DIR}/src/OrxonoxConfig.h)
     55# Also add OrxonoxConfig to have it least somewhere in the IDE
     56LIST(APPEND UTIL_FILES
     57  ${CMAKE_BINARY_DIR}/src/OrxonoxConfig.h
     58  ${CMAKE_SOURCE_DIR}/src/OrxonoxConfig.h.in
     59)
     60SOURCE_GROUP("" FILES
     61  ${CMAKE_BINARY_DIR}/src/OrxonoxConfig.h
     62  ${CMAKE_SOURCE_DIR}/src/OrxonoxConfig.h.in
     63)
    5964
    6065IF(NOT GCC_SYSTEM_HEADER_SUPPORT)
  • code/branches/buildsystem2/src/util/CRC32.h

    r2171 r2639  
    3232#include "UtilPrereqs.h"
    3333#include <iostream>
    34 #include "Integers.h"
    3534
    3635namespace orxonox
  • code/branches/buildsystem2/src/util/Clipboard.cc

    r2171 r2639  
    3636#include "Clipboard.h"
    3737
    38 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
     38#ifdef ORXONOX_PLATFORM_WINDOWS
    3939
    4040/////////////
     
    104104}
    105105
    106 #else /* ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32 */
     106#else /* ORXONOX_PLATFORM_WINDOWS */
    107107
    108108/////////////
     
    135135}
    136136
    137 #endif /* ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32 */
     137#endif /* ORXONOX_PLATFORM_WINDOWS */
  • code/branches/buildsystem2/src/util/Convert.h

    r2171 r2639  
    5050// This is however exactly what convertValue does, so we need to suppress these warnings.
    5151// They only occur when using the ImplicitConversion template.
    52 #if ORXONOX_COMPILER == ORXONOX_COMPILER_GNUC
     52#ifdef ORXONOX_COMPILER_GCC
    5353#  pragma GCC system_header
    5454#endif
     
    6363
    6464// disable warnings about possible loss of data
    65 #if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
     65#ifdef ORXONOX_COMPILER_MSVC
    6666#  pragma warning(push)
    6767#  pragma warning(disable:4244)
     
    8888}
    8989
    90 #if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
     90#ifdef ORXONOX_COMPILER_MSVC
    9191#  pragma warning(pop)
    9292#endif
  • code/branches/buildsystem2/src/util/Math.h

    r2171 r2639  
    5252
    5353//Get around Windows hackery
    54 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
     54#ifdef ORXONOX_PLATFORM_WINDOWS
    5555#  ifdef max
    5656#    undef max
  • code/branches/buildsystem2/src/util/SignalHandler.cc

    r2596 r2639  
    4545}
    4646
    47 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_LINUX
     47#ifdef ORXONOX_PLATFORM_LINUX
    4848
    4949#include <wait.h>
     
    358358}
    359359
    360 #endif /* ORXONOX_PLATFORM == ORXONOX_PLATFORM_LINUX */
     360#endif /* ORXONOX_PLATFORM_LINUX */
  • code/branches/buildsystem2/src/util/SignalHandler.h

    r2596 r2639  
    4545}
    4646
    47 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_LINUX
     47#ifdef ORXONOX_PLATFORM_LINUX
    4848#include <signal.h>
    4949
     
    9797}
    9898
    99 #else /* ORXONOX_PLATFORM == ORXONOX_PLATFORM_LINUX */
     99#else /* ORXONOX_PLATFORM_LINUX */
    100100
    101101namespace orxonox
     
    114114}
    115115
    116 #endif /* ORXONOX_PLATFORM == ORXONOX_PLATFORM_LINUX */
     116#endif /* ORXONOX_PLATFORM_LINUX */
    117117
    118118#endif /* _SignalHandler_H__ */
  • code/branches/buildsystem2/src/util/Sleep.h

    r2619 r2639  
    3838#include "UtilPrereqs.h"
    3939
    40 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
     40#ifdef ORXONOX_PLATFORM_WINDOWS
    4141#include <winbase.h>
    4242
  • code/branches/buildsystem2/src/util/UtilPrereqs.h

    r2619 r2639  
    4040// Shared library settings
    4141//-----------------------------------------------------------------------
    42 #if (ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32) && !defined( UTIL_STATIC_BUILD )
     42#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined( UTIL_STATIC_BUILD )
    4343#  ifdef UTIL_SHARED_BUILD
    4444#    define _UtilExport __declspec(dllexport)
Note: See TracChangeset for help on using the changeset viewer.