diff options
author | Peter Powell <petpow@saberuk.com> | 2015-09-23 21:45:02 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2015-09-23 21:52:27 +0100 |
commit | cd67a0a6f9380d4a54bc92370f2925f2d2a684dc (patch) | |
tree | b92008566fa98511fefac3da5564e4ef5f4a1971 /make/configure.pm | |
parent | 5544649cd2058ba6d30925e61d20ae4a0245c0fa (diff) |
Fix detection of the Apple variant of Clang.
This splitting of compiler names mirrors the change implemented by
other build systems like cmake.
Diffstat (limited to 'make/configure.pm')
-rw-r--r-- | make/configure.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/make/configure.pm b/make/configure.pm index 9a53221a8..e314e6d15 100644 --- a/make/configure.pm +++ b/make/configure.pm @@ -238,9 +238,11 @@ sub write_configure_cache(%) { sub get_compiler_info($) { my $binary = shift; my $version = `$binary -v 2>&1`; - if ($version =~ /clang\sversion\s(\d+\.\d+)/i || $version =~ /^apple.+\(based\son\sllvm\s(\d+\.\d+)/i) { + if ($version =~ /Apple\sLLVM\sversion\s(\d+\.\d+)/i) { # Apple version their LLVM releases slightly differently to the mainline LLVM. # See https://trac.macports.org/wiki/XcodeVersionInfo for more information. + return (NAME => 'AppleClang', VERSION => $1); + } elsif ($version =~ /clang\sversion\s(\d+\.\d+)/i) { return (NAME => 'Clang', VERSION => $1); } elsif ($version =~ /gcc\sversion\s(\d+\.\d+)/i) { return (NAME => 'GCC', VERSION => $1); |