mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-26 03:23:05 +01:00
17 lines
452 B
Bash
17 lines
452 B
Bash
#! /bin/sh
|
|
#
|
|
# 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
|