From cb7a0e25200783808e1dde6fee1b4efedc823f23 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 5 Oct 2015 00:45:55 +0200 Subject: [PATCH] Fix PandaSystem.getCompiler() for clang (it erroneously reported GCC) --- dtool/src/dtoolutil/pandaSystem.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dtool/src/dtoolutil/pandaSystem.cxx b/dtool/src/dtoolutil/pandaSystem.cxx index d54029ecf2..2663797172 100644 --- a/dtool/src/dtoolutil/pandaSystem.cxx +++ b/dtool/src/dtoolutil/pandaSystem.cxx @@ -270,6 +270,11 @@ get_compiler() { return strm.str(); +#elif defined(__clang__) + // Clang has this macro. This case has to go before __GNUC__ + // because that is also defined by clang. + return "Clang " __clang_version__; + #elif defined(__GNUC__) // GCC defines this simple macro. return "GCC " __VERSION__;