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>bb10
parent
c3a4d36082
commit
907652e1ed
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue