Module: check_mk
Branch: master
Commit: 768c76a5498b5a8fb70bce213167028b633d375e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=768c76a5498b5a…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Wed May 10 11:48:17 2017 +0200
Added hack to easily switch back and forth between recent versions of g++ and clang++.
Change-Id: I94adddd48ec416239d85e0b21e113fdcfb9eb665
---
Makefile | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Makefile b/Makefile
index cc05538..24fd917 100644
--- a/Makefile
+++ b/Makefile
@@ -46,6 +46,14 @@ TAROPTS := --owner=root --group=root --exclude=.svn
--exclude=*~ \
--exclude=.gitignore --exclude=*.swp --exclude=.f12
CXX_FLAGS := -g -O3 -Wall -Wextra
+# HACK: Starting with GCC 6.1, g++ defaults to C++14, but even clang++-4.0 still
+# defaults to C++11. So when configure finds such a g++ first, the resulting
+# compilation database does not contain a -std=c++14 flag, because it's simply
+# not needed. But when we want to use our clang-based tools, it *is* needed. :-/
+# To work around that issue, we hackily add that flag below. This is ugly and
+# should be removed when the compiler defaults are in sync again.
+CXX_FLAGS += -std=c++14
+
CLANG_VERSION := 4.0
CLANG_FORMAT := clang-format-$(CLANG_VERSION)
CLANG_TIDY := clang-tidy-$(CLANG_VERSION)