diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2014-09-15 17:37:12 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2014-09-15 17:39:00 +0200 |
commit | 411e18028d39ace54096c99dafbdc4f19a2a01b5 (patch) | |
tree | 27f1b593a426e21686b1be1d3dde2eef885171ab /solenv | |
parent | a309ddbb9e92c3c9c9318735b26410413573dffc (diff) |
check that ODK headers compile with C++03
Change-Id: Ief191a5bbbdca45aaaa8ae5bcc395124ed189796
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/platform/com_GCC_defs.mk | 8 | ||||
-rw-r--r-- | solenv/gbuild/platform/com_MSC_defs.mk | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index 1ca76d0fb90b..04864574a111 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -97,6 +97,14 @@ endif gb_CFLAGS_WERROR := $(if $(ENABLE_WERROR),-Werror) +# This is the default in non-C++11 mode +ifeq ($(COM_GCC_IS_CLANG),TRUE) +# doesn't know gnu++03 and this seems to be the same anyway +gb_CXX03FLAGS := -std=gnu++98 -Werror=c++11-extensions -Wno-c++11-long-long +else +gb_CXX03FLAGS := -std=gnu++03 -pedantic-errors -Wno-long-long +endif + ifeq ($(ENABLE_LTO),TRUE) ifeq ($(COM_GCC_IS_CLANG),TRUE) gb_LTOFLAGS := -flto diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk index 1702218bf70b..c1ce1f1b32e1 100644 --- a/solenv/gbuild/platform/com_MSC_defs.mk +++ b/solenv/gbuild/platform/com_MSC_defs.mk @@ -247,6 +247,9 @@ gb_STDLIBS := \ gb_CFLAGS_WERROR := $(if $(ENABLE_WERROR),-WX) +# there does not seem to be a way to force C++03 with MSVC +gb_CXX03FLAGS := + gb_LinkTarget_EXCEPTIONFLAGS := \ -DEXCEPTIONS_ON \ -EHa \ |