File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22# https://launchpad.net/ubuntu/focal/+source/cmake
33cmake_minimum_required (VERSION 3.16.3 )
44
5- # Needed for C++17 (std::variant)
6- # TODO(https://github.com/WebAssembly/binaryen/issues/4299): We need
7- # to reduce this for compatability with emsdk.
8- set (CMAKE_OSX_DEPLOYMENT_TARGET "10.14" CACHE STRING "Minimum OS X deployment version" )
5+ # Needed for C++17 (std::path)
6+ set (CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version" )
97
108project (binaryen LANGUAGES C CXX VERSION 125)
119include (GNUInstallDirs )
Original file line number Diff line number Diff line change 1818// Command line helpers.
1919//
2020
21+ #include < filesystem>
22+
2123#include " support/path.h"
2224#ifdef USE_WSTRING_PATHS
2325#include " windows.h"
@@ -52,15 +54,7 @@ std::string wstring_to_string(const std::wstring& s) {
5254PathString to_path (const std::string& s) { return s; }
5355#endif
5456
55- char getPathSeparator () {
56- // TODO: use c++17's path separator
57- // http://en.cppreference.com/w/cpp/experimental/fs/path
58- #if defined(WIN32) || defined(_WIN32)
59- return ' \\ ' ;
60- #else
61- return ' /' ;
62- #endif
63- }
57+ char getPathSeparator () { return std::filesystem::path::preferred_separator; }
6458
6559static std::string getAllPathSeparators () {
6660 // The canonical separator on Windows is `\`, but it also accepts `/`.
You can’t perform that action at this time.
0 commit comments