#! /bin/sh # # $Id: //poco/1.4/build/script/cpp11-appleclang#1 $ # # cpp11-appleclang # # Detect compatible AppleClang version and add c++11/14 flags # CLANGVERSION := $(shell $(CXX) -E -dM - < /dev/null | grep __apple_build_version__ | sed -e 's/^.* //g') # C++14 needs AppleClang 500.x ifeq ($(shell test $(CLANGVERSION) -ge 5000275 && echo 1), 1) CXXFLAGS += -std=c++1y # C++11 needs AppleClang 503.x else ifeq ($(shell test $(CLANGVERSION) -ge 5030038 && echo 1), 1) CXXFLAGS += -std=c++0x endif