Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
# https://launchpad.net/ubuntu/focal/+source/cmake
cmake_minimum_required(VERSION 3.16.3)

# Needed for C++17 (std::variant)
# TODO(https://github.com/WebAssembly/binaryen/issues/4299): We need
# to reduce this for compatability with emsdk.
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14" CACHE STRING "Minimum OS X deployment version")
# Needed for C++17 (std::path)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version")

project(binaryen LANGUAGES C CXX VERSION 125)
include(GNUInstallDirs)
Expand Down
12 changes: 3 additions & 9 deletions src/support/path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
// Command line helpers.
//

#include <filesystem>

#include "support/path.h"
#ifdef USE_WSTRING_PATHS
#include "windows.h"
Expand Down Expand Up @@ -52,15 +54,7 @@ std::string wstring_to_string(const std::wstring& s) {
PathString to_path(const std::string& s) { return s; }
#endif

char getPathSeparator() {
// TODO: use c++17's path separator
// http://en.cppreference.com/w/cpp/experimental/fs/path
#if defined(WIN32) || defined(_WIN32)
return '\\';
#else
return '/';
#endif
}
char getPathSeparator() { return std::filesystem::path::preferred_separator; }

static std::string getAllPathSeparators() {
// The canonical separator on Windows is `\`, but it also accepts `/`.
Expand Down
Loading