From 14d2830e4942da51e544fe0b5b46a2851a0e374e Mon Sep 17 00:00:00 2001 From: Simon Martin Date: Sat, 14 Nov 2015 07:53:34 +0100 Subject: [PATCH] Restore build on OSX, where make defines CXX as "c++" by default. --- Makefile | 4 ++++ tools/dmake.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Makefile b/Makefile index a49d13cff..0402b3249 100644 --- a/Makefile +++ b/Makefile @@ -87,6 +87,10 @@ ifeq ($(CXX), g++) override CXXFLAGS += -std=c++0x else ifeq ($(CXX), clang++) override CXXFLAGS += -std=c++0x +else ifeq ($(CXX), c++) + ifeq ($(shell uname -s), Darwin) + override CXXFLAGS += -std=c++0x + endif endif ifeq ($(HAVE_RULES),yes) diff --git a/tools/dmake.cpp b/tools/dmake.cpp index 696faad2a..6d6978db7 100644 --- a/tools/dmake.cpp +++ b/tools/dmake.cpp @@ -359,6 +359,10 @@ int main(int argc, char **argv) << " override CXXFLAGS += -std=c++0x\n" << "else ifeq ($(CXX), clang++)\n" << " override CXXFLAGS += -std=c++0x\n" + << "else ifeq ($(CXX), c++)\n" + << " ifeq ($(shell uname -s), Darwin)\n" + << " override CXXFLAGS += -std=c++0x\n" + << " endif\n" << "endif\n" << "\n";