summaryrefslogtreecommitdiffstats
path: root/src/corelib/configure.cmake
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2020-03-27 23:19:36 +0200
committerMartin Storsjö <martin@martin.st>2020-03-30 13:31:05 +0300
commit907652e1ed3c95e3fdb1620cec4d5a1034153398 (patch)
tree3c2c88892bc2dd6e50ad23e5e422695299037f7b /src/corelib/configure.cmake
parentc3a4d3608245c5614fcaf95bbe37f2300bbac4cb (diff)
Extend the configure test for C++17 filesystem
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 <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/configure.cmake')
-rw-r--r--src/corelib/configure.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/configure.cmake b/src/corelib/configure.cmake
index eaeb7862c4..679346188e 100644
--- a/src/corelib/configure.cmake
+++ b/src/corelib/configure.cmake
@@ -165,7 +165,9 @@ int main(int argc, char **argv)
{
(void)argc; (void)argv;
/* BEGIN TEST: */
-std::filesystem::path p(\"./file\");
+std::filesystem::copy(
+ std::filesystem::path("./file"),
+ std::filesystem::path("./other"));
/* END TEST: */
return 0;
}