cmake: stop detecting <experimental/filesystem>

since we've dropped the support of GCC older than v8.0, there is no need
to detect <experimental/filesystem>

Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2021-06-07 16:39:22 +08:00
parent b6e6d15a28
commit d2b0382ec6
2 changed files with 1 additions and 8 deletions

View File

@ -28,7 +28,6 @@ set(_std_filesystem_already_included FALSE)
foreach(library
""
"stdc++fs"
"c++experimental"
"c++fs")
try_std_filesystem_library("${library}" StdFilesystem_LIBRARY _std_filesystem_already_included)
if(_std_filesystem_already_included)

View File

@ -1,12 +1,6 @@
#if __has_include(<filesystem>)
#include <filesystem>
namespace fs = std::filesystem;
#elif __has_include(<experimental/filesystem>)
#include <experimental/filesystem>
namespace fs = std::experimental::filesystem;
#else
#error std::filesystem not available!
#endif
int main() {
fs::create_directory("sandbox");