Files
TCPlayerbotCore/src/common/CompilerDefs.h
T

59 lines
2.0 KiB
C
Raw Normal View History

2010-10-07 15:54:07 +02:00
/*
2019-01-01 10:13:49 +01:00
* Copyright (C) 2008-2019 TrinityCore <https://www.trinitycore.org/>
2010-10-07 15:54:07 +02:00
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
2008-10-02 16:23:55 -05:00
*/
2009-10-17 15:51:44 -07:00
2008-10-14 11:57:03 -05:00
#ifndef TRINITY_COMPILERDEFS_H
#define TRINITY_COMPILERDEFS_H
2009-10-17 15:51:44 -07:00
#define TRINITY_PLATFORM_WINDOWS 0
#define TRINITY_PLATFORM_UNIX 1
#define TRINITY_PLATFORM_APPLE 2
#define TRINITY_PLATFORM_INTEL 3
2009-10-17 15:51:44 -07:00
// must be first (win 64 also define _WIN32)
2008-10-02 16:23:55 -05:00
#if defined( _WIN64 )
# define TRINITY_PLATFORM TRINITY_PLATFORM_WINDOWS
2008-10-02 16:23:55 -05:00
#elif defined( __WIN32__ ) || defined( WIN32 ) || defined( _WIN32 )
# define TRINITY_PLATFORM TRINITY_PLATFORM_WINDOWS
2008-10-02 16:23:55 -05:00
#elif defined( __APPLE_CC__ )
# define TRINITY_PLATFORM TRINITY_PLATFORM_APPLE
2008-10-02 16:23:55 -05:00
#elif defined( __INTEL_COMPILER )
# define TRINITY_PLATFORM TRINITY_PLATFORM_INTEL
2008-10-02 16:23:55 -05:00
#else
# define TRINITY_PLATFORM TRINITY_PLATFORM_UNIX
2008-10-02 16:23:55 -05:00
#endif
2009-10-17 15:51:44 -07:00
#define TRINITY_COMPILER_MICROSOFT 0
#define TRINITY_COMPILER_GNU 1
#define TRINITY_COMPILER_BORLAND 2
#define TRINITY_COMPILER_INTEL 3
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
#ifdef _MSC_VER
# define TRINITY_COMPILER TRINITY_COMPILER_MICROSOFT
2008-10-02 16:23:55 -05:00
#elif defined( __BORLANDC__ )
# define TRINITY_COMPILER TRINITY_COMPILER_BORLAND
2008-10-02 16:23:55 -05:00
#elif defined( __INTEL_COMPILER )
# define TRINITY_COMPILER TRINITY_COMPILER_INTEL
2008-10-02 16:23:55 -05:00
#elif defined( __GNUC__ )
# define TRINITY_COMPILER TRINITY_COMPILER_GNU
2012-10-02 15:06:19 +02:00
# define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
2008-10-02 16:23:55 -05:00
#else
2012-10-02 15:06:19 +02:00
# error "FATAL ERROR: Unknown compiler."
2008-10-02 16:23:55 -05:00
#endif
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
#endif