diff options
author | Jake Petroules <jake.petroules@qt.io> | 2018-02-15 15:09:10 -0800 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2018-02-21 23:20:57 +0000 |
commit | f4f295b5197d7a38dfba5675ff576929ec8aee48 (patch) | |
tree | d40348593af18eb903a41d429191daa05b92c92d /doc/reference | |
parent | 9379e0eae0f05614313083c8b46b8dae6da8b230 (diff) |
Only use fallback values for the -std= command line option when needed
Instead of always using the fallback value, we instead always use the
standard value unless we know we're running an older toolchain
which does not support it. This alleviates the potential for differing
behavior in newer versions of compilers which may attempt to remain
compatible with earlier drafts of corresponding standards.
[ChangeLog] Always use standard values for -std= when possible
Change-Id: I61ff3ecd863caa24cb8fb54500e62dc310a2af02
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'doc/reference')
-rw-r--r-- | doc/reference/modules/cpp-module.qdoc | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/doc/reference/modules/cpp-module.qdoc b/doc/reference/modules/cpp-module.qdoc index fe4761116..d900abd8e 100644 --- a/doc/reference/modules/cpp-module.qdoc +++ b/doc/reference/modules/cpp-module.qdoc @@ -673,6 +673,49 @@ */ /*! + \qmlproperty bool cpp::useLanguageVersionFallback + \since Qbs 1.11 + + Whether to explicitly use the language standard version fallback values in + compiler command line invocations. + + By default, \QBS will automatically substitute fallback values for the C and + C++ language standard versions specified by the \l cLanguageVersion and + \l cxxLanguageVersion properties, which are passed to the \c{-std=} compiler + command line option with GNU-compatible toolchains, if it detects that you + are using an older toolchain which does not support the standard values. The + substitutions are made as follows: + + \table + \header + \li Value + \li Substitute + \row + \li c++11 + \li c++0x + \row + \li c11 + \li c1x + \row + \li c++14 + \li c++1y + \row + \li c++17 + \li c++1z + \endtable + + If this property is explicitly set to \c true, \QBS will always use the + fallback values. + + If this property is explicitly set to \c false, \QBS will never use the + fallback values. + + This property has no effect with the Microsoft Visual C++ compiler. + + \nodefaultvalue +*/ + +/*! \qmlproperty string cpp::cxxStandardLibrary \since Qbs 1.4 |