Skip to content

Commit 82dd644

Browse files
committed
Merge pull request cppcheck-opensource#705 from simartin/restore_osx_default_build
Restore build on OSX, where make defines CXX as "c++" by default.
2 parents e134243 + 14d2830 commit 82dd644

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ ifeq ($(CXX), g++)
8787
override CXXFLAGS += -std=c++0x
8888
else ifeq ($(CXX), clang++)
8989
override CXXFLAGS += -std=c++0x
90+
else ifeq ($(CXX), c++)
91+
ifeq ($(shell uname -s), Darwin)
92+
override CXXFLAGS += -std=c++0x
93+
endif
9094
endif
9195

9296
ifeq ($(HAVE_RULES),yes)

tools/dmake.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,10 @@ int main(int argc, char **argv)
359359
<< " override CXXFLAGS += -std=c++0x\n"
360360
<< "else ifeq ($(CXX), clang++)\n"
361361
<< " override CXXFLAGS += -std=c++0x\n"
362+
<< "else ifeq ($(CXX), c++)\n"
363+
<< " ifeq ($(shell uname -s), Darwin)\n"
364+
<< " override CXXFLAGS += -std=c++0x\n"
365+
<< " endif\n"
362366
<< "endif\n"
363367
<< "\n";
364368

0 commit comments

Comments
 (0)