cmake: stop detecting <experimental/filesystem>
authorKefu Chai <kchai@redhat.com>
Mon, 7 Jun 2021 08:39:22 +0000 (16:39 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 9 Jun 2021 15:25:22 +0000 (23:25 +0800)
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>
cmake/modules/FindStdFilesystem.cmake
cmake/modules/FindStdFilesystem_test.cc

index c66f572459b6601daaa09dd7556a8ae82c2bd4a0..421450c001ea0401d61e7d350dec399f9d15d614 100644 (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)
index 8b308fff432f36bfe3e74573d07a4cd0101b6880..413ac31796e227a3d5535f6aca06c803f2b0d3a3 100644 (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");