diff options
author | Mårten Nordheim <marten.nordheim@qt.io> | 2020-02-07 14:01:18 +0100 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2020-02-07 23:51:06 +0100 |
commit | 3568ad58f5e273d60f089a1b2d8c91c9535c8cad (patch) | |
tree | 36b1b8e8c5a90f21785be571f726bcad154268fb /src | |
parent | f64694647a9a3d54fa5ecdaf2570e8c7404271a6 (diff) |
Introduce a configure-time check for C++17 filesystem
Various compilers have various fun ways of failing to compile when it
is used so let's check if they will work properly during configure
rather than much later.
Change-Id: Ia93d4b91b3d269b4cab2a5f677c3c89e06b44ce3
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/configure.json | 16 | ||||
-rw-r--r-- | src/corelib/global/qconfig-bootstrapped.h | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/corelib/configure.json b/src/corelib/configure.json index b607c300dd..667f6e2104 100644 --- a/src/corelib/configure.json +++ b/src/corelib/configure.json @@ -366,6 +366,15 @@ "main": "std::mt19937 mt(0);" } }, + "cxx17_filesystem": { + "label": "C++17 <filesystem>", + "type": "compile", + "test": { + "include": "filesystem", + "main": "std::filesystem::path p(\"./file\");", + "qmake": "CONFIG += c++17" + } + }, "eventfd": { "label": "eventfd", "type": "compile", @@ -613,6 +622,13 @@ "condition": "tests.cxx11_future", "output": [ "publicFeature" ] }, + "cxx17_filesystem": { + "label": "C++17 <filesystem>", + "condition": "tests.cxx17_filesystem", + "output": [ + "publicFeature" + ] + }, "eventfd": { "label": "eventfd", "condition": "!config.wasm && tests.eventfd", diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h index 4a8a4598a0..5733864459 100644 --- a/src/corelib/global/qconfig-bootstrapped.h +++ b/src/corelib/global/qconfig-bootstrapped.h @@ -79,6 +79,7 @@ #define QT_FEATURE_cborstreamwriter 1 #define QT_CRYPTOGRAPHICHASH_ONLY_SHA1 #define QT_FEATURE_cxx11_random (__has_include(<random>) ? 1 : -1) +#define QT_FEATURE_cxx17_filesystem -1 #define QT_NO_DATASTREAM #define QT_FEATURE_datestring 1 #define QT_FEATURE_datetimeparser -1 |