diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2017-03-04 09:33:35 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2017-03-31 21:08:32 +0000 |
commit | a03390a8b0318e30ae3b6dc9954093c137a20c32 (patch) | |
tree | df22fd510d9d6b8889e7cc531beb20f6b75b61aa /configure.json | |
parent | 62013d77721820976102581b4cbd31404c109903 (diff) |
Detect the (stated) C++ standard edition at build time
The configure-time detection (cxx11default) isn't enough if the compiler
can be changed. This is especially necessary if Qt is compiled with a
compiler that defaults to >= C++11 (e.g., GCC 6) and then the user
selects a compiler another compiler (e.g., Clang) via -spec option. In
that case, we'd miss adding the -std=c++11 or -std=gnu++11 option to the
command-line, causing the compilation to fail.
As a nice side-effect, even moc without moc_predefs.h will now get the
__cplusplus setting.
Task-number: QTBUG-58321
Change-Id: I74966ed02f674a7295f8fffd14a8be35da9640e1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'configure.json')
-rw-r--r-- | configure.json | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/configure.json b/configure.json index d987832fba..06a1e639fe 100644 --- a/configure.json +++ b/configure.json @@ -245,11 +245,6 @@ "type": "compile", "test": "common/c++1z" }, - "cxx11default": { - "label": "compiler defaulting to C++11 or higher", - "type": "compile", - "test": "common/c++98default" - }, "precompile_header": { "label": "precompiled header support", "type": "compile", @@ -451,11 +446,6 @@ "condition": "call.crossCompile", "output": [ "publicConfig", "privateConfig", "crossCompile" ] }, - "cxx11default": { - "label": "Compiler defaults to C++11 or higher", - "condition": "!tests.cxx11default", - "output": [ { "type": "publicConfig", "name": "c++11" } ] - }, "compiler-flags": { "output": [ "compilerFlags" ] }, |