From 907652e1ed3c95e3fdb1620cec4d5a1034153398 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Fri, 27 Mar 2020 23:19:36 +0200 Subject: Extend the configure test for C++17 filesystem MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If recent versions of libc++ are built with filesystem support disabled, the filesystem header still is installed., The std::filesystem::path() constructor is completely defined inline in that header, making the test pass on such configurations, despite C++17 filesystem not being implemented. Test a call to std::filesystem::copy instead, which requires the actual library implementation to be available as well (on recent libc++). Change-Id: Id997ab75f3299d8431b13cad871f2901f4d9f6ed Reviewed-by: MÃ¥rten Nordheim --- src/corelib/configure.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/corelib/configure.json') diff --git a/src/corelib/configure.json b/src/corelib/configure.json index a8efaa509c..4225574761 100644 --- a/src/corelib/configure.json +++ b/src/corelib/configure.json @@ -371,7 +371,11 @@ "type": "compile", "test": { "include": "filesystem", - "main": "std::filesystem::path p(\"./file\");", + "main": [ + "std::filesystem::copy(", + " std::filesystem::path(\"./file\"),", + " std::filesystem::path(\"./other\"));" + ], "qmake": "CONFIG += c++17" } }, -- cgit v1.2.3