aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/testdata/cxx-language-version
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2017-08-22 17:12:47 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2017-08-23 15:09:56 +0000
commit29ff75ef89d93934bdbc38e24398e766e6597508 (patch)
tree1db4075256f98eeb9536b3750c15ddc0e80eb82a /tests/auto/blackbox/testdata/cxx-language-version
parent1b046f750bb3bd26d97073c648662c672eb0fc95 (diff)
Support MSVC's /std option
We failed to notice that it was introduced with update 3 of VS 2013. [ChangeLog] The cpp.cxxLanguageVersion property now gets mapped to MSVC's /std option, if applicable. Change-Id: I00d45aecefb2ad27f2b5891d62d591179f2dbeec Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'tests/auto/blackbox/testdata/cxx-language-version')
-rw-r--r--tests/auto/blackbox/testdata/cxx-language-version/cxx-language-version.qbs30
-rw-r--r--tests/auto/blackbox/testdata/cxx-language-version/main.cpp1
2 files changed, 31 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/cxx-language-version/cxx-language-version.qbs b/tests/auto/blackbox/testdata/cxx-language-version/cxx-language-version.qbs
new file mode 100644
index 000000000..436c64c5e
--- /dev/null
+++ b/tests/auto/blackbox/testdata/cxx-language-version/cxx-language-version.qbs
@@ -0,0 +1,30 @@
+import qbs
+
+CppApplication {
+ name: "app"
+
+ files: ["main.cpp"]
+
+ Probe {
+ id: compilerProbe
+ property stringList toolchain: qbs.toolchain
+ property string compilerVersion: cpp.compilerVersion
+
+ configure: {
+ var isNewerMsvc;
+ var isOlderMsvc;
+ var isGcc;
+ if (toolchain.contains("msvc")) {
+ if (compilerVersion >= "18.00.30723")
+ isNewerMsvc = true;
+ else
+ isOlderMsvc = true;
+ } else {
+ isGcc = true;
+ }
+ console.info("is newer MSVC: " + isNewerMsvc);
+ console.info("is older MSVC: " + isOlderMsvc);
+ console.info("is GCC: " + isGcc);
+ }
+ }
+}
diff --git a/tests/auto/blackbox/testdata/cxx-language-version/main.cpp b/tests/auto/blackbox/testdata/cxx-language-version/main.cpp
new file mode 100644
index 000000000..237c8ce18
--- /dev/null
+++ b/tests/auto/blackbox/testdata/cxx-language-version/main.cpp
@@ -0,0 +1 @@
+int main() {}