mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-11 11:39:02 -04:00
Merge pull request #1098 from SaberUK/master+appleclang
Fix detection of the Apple variant of Clang.
This commit is contained in:
commit
009cc92180
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user