Add compiler check in platform.hpp
This commit is contained in:
parent
5b7dadf815
commit
fe38ffcd80
11
platform.hpp
11
platform.hpp
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user