Browse Source

Merge branch 'release/v0.0.5'

Jérôme BUISINE 8 months ago
parent
commit
1c57ae5aa5
2 changed files with 3 additions and 72 deletions
  1. 2 2
      main/CMakeLists.txt
  2. 1 70
      main/rawls_merge.cpp

+ 2 - 2
main/CMakeLists.txt

@@ -3,8 +3,8 @@ add_executable(rawls_merge rawls_merge.cpp)
 add_executable(rawls_h_flip rawls_h_flip.cpp)
 
 target_link_libraries(rawls_convert LINK_PUBLIC rawls)
-target_link_libraries(rawls_merge LINK_PUBLIC rawls)
-target_link_libraries(rawls_h_flip LINK_PUBLIC rawls)
+target_link_libraries(rawls_merge LINK_PUBLIC rawls stdc++fs)
+target_link_libraries(rawls_h_flip LINK_PUBLIC rawls stdc++fs)
 
 set_property(TARGET rawls_merge PROPERTY CXX_STANDARD 17)
 set_property(TARGET rawls_convert PROPERTY CXX_STANDARD 17)

+ 1 - 70
main/rawls_merge.cpp

@@ -6,76 +6,7 @@
 #include "rawls.h"
 
 #include <algorithm>
-
-// We haven't checked which filesystem to include yet
-#ifndef INCLUDE_STD_FILESYSTEM_EXPERIMENTAL
-
-// Check for feature test macro for <filesystem>
-#   if defined(__cpp_lib_filesystem)
-#       define INCLUDE_STD_FILESYSTEM_EXPERIMENTAL 0
-
-// Check for feature test macro for <experimental/filesystem>
-#   elif defined(__cpp_lib_experimental_filesystem)
-#       define INCLUDE_STD_FILESYSTEM_EXPERIMENTAL 1
-
-// We can't check if headers exist...
-// Let's assume experimental to be safe
-#   elif !defined(__has_include)
-#       define INCLUDE_STD_FILESYSTEM_EXPERIMENTAL 1
-
-// Check if the header "<filesystem>" exists
-#   elif __has_include(<filesystem>)
-
-// If we're compiling on Visual Studio and are not compiling with C++17, we need to use experimental
-#       ifdef _MSC_VER
-
-// Check and include header that defines "_HAS_CXX17"
-#           if __has_include(<yvals_core.h>)
-#               include <yvals_core.h>
-
-// Check for enabled C++17 support
-#               if defined(_HAS_CXX17) && _HAS_CXX17
-// We're using C++17, so let's use the normal version
-#                   define INCLUDE_STD_FILESYSTEM_EXPERIMENTAL 0
-#               endif
-#           endif
-
-// If the marco isn't defined yet, that means any of the other VS specific checks failed, so we need to use experimental
-#           ifndef INCLUDE_STD_FILESYSTEM_EXPERIMENTAL
-#               define INCLUDE_STD_FILESYSTEM_EXPERIMENTAL 1
-#           endif
-
-// Not on Visual Studio. Let's use the normal version
-#       else // #ifdef _MSC_VER
-#           define INCLUDE_STD_FILESYSTEM_EXPERIMENTAL 0
-#       endif
-
-// Check if the header "<filesystem>" exists
-#   elif __has_include(<experimental/filesystem>)
-#       define INCLUDE_STD_FILESYSTEM_EXPERIMENTAL 1
-
-// Fail if neither header is available with a nice error message
-#   else
-#       error Could not find system header "<filesystem>" or "<experimental/filesystem>"
-#   endif
-
-// We priously determined that we need the exprimental version
-#   if INCLUDE_STD_FILESYSTEM_EXPERIMENTAL
-// Include it
-#       include <experimental/filesystem>
-
-// We need the alias from std::experimental::filesystem to std::filesystem
-namespace std {
-    namespace filesystem = experimental::filesystem;
-}
-
-// We have a decent compiler and can use the normal version
-#   else
-// Include it
-#       include <filesystem>
-#   endif
-
-#endif // #ifndef INCLUDE_STD_FILESYSTEM_EXPERIMENTAL
+#include <filesystem>
 
 void writeProgress(float progress){
     int barWidth = 200;