Add compiler check in platform.hpp

This commit is contained in:
Danny Robson 2012-06-13 14:43:27 +10:00
parent 5b7dadf815
commit fe38ffcd80

View File

@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with libgim. If not, see <http://www.gnu.org/licenses/>.
*
* Copyright 2010-2012 Danny Robson <danny@nerdcruft.net>
* Copyright 2012 Danny Robson <danny@nerdcruft.net>
*/
#ifndef __UTIL_PLATFORM_HPP
@ -28,4 +28,13 @@
#error "Unknown platform"
#endif
// Clang needs to be checked before GCC as it pretends to be GCC
#if defined(__clang__)
#define COMPILER_CLANG
#elif defined(__GNUC__)
#define COMPILER_GCC
#else
#error "Unknown compiler"
#endif
#endif