Skip to content
Snippets Groups Projects
Commit 23a765a8 authored by Fons Rademakers's avatar Fons Rademakers
Browse files

correct version detection of the Apple Xcode 4 clang compiler.

git-svn-id: http://root.cern.ch/svn/root/trunk@38419 27541ba8-7e3a-0410-8455-c3a389f83636
parent 7eb036c3
Branches
Tags
No related merge requests found
...@@ -394,6 +394,11 @@ CXXOUT ?= -o # keep whitespace after "-o" ...@@ -394,6 +394,11 @@ CXXOUT ?= -o # keep whitespace after "-o"
ifneq ($(findstring clang,$(CXX)),) ifneq ($(findstring clang,$(CXX)),)
CLANG_MAJOR := $(shell $(CXX) -v 2>&1 | awk '{if (NR==1) print $$3}' | cut -d'.' -f1) CLANG_MAJOR := $(shell $(CXX) -v 2>&1 | awk '{if (NR==1) print $$3}' | cut -d'.' -f1)
CLANG_MINOR := $(shell $(CXX) -v 2>&1 | awk '{if (NR==1) print $$3}' | cut -d'.' -f2) CLANG_MINOR := $(shell $(CXX) -v 2>&1 | awk '{if (NR==1) print $$3}' | cut -d'.' -f2)
ifeq ($(CLANG_MAJOR),version)
# Apple version of clang has different -v layout
CLANG_MAJOR := $(shell $(CXX) -v 2>&1 | awk '{if (NR==1) print $$4}' | cut -d'.' -f1)
CLANG_MINOR := $(shell $(CXX) -v 2>&1 | awk '{if (NR==1) print $$4}' | cut -d'.' -f2)
endif
else else
ifneq ($(findstring gnu,$(COMPILER)),) ifneq ($(findstring gnu,$(COMPILER)),)
GCC_MAJOR := $(shell $(CXX) -dumpversion 2>&1 | cut -d'.' -f1) GCC_MAJOR := $(shell $(CXX) -dumpversion 2>&1 | cut -d'.' -f1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment