Skip to content

Commit

Permalink
fix: add WASI build support (#679)
Browse files Browse the repository at this point in the history
Addresses:

  wasm-ld: error:
  CMakeFiles/WebAssemblyInterfaceHeaderTest1.dir/test/WebAssemblyInterfaceHeaderTest1.cxx.o:
  undefined symbol:
  std::__2::__fs::filesystem::__status(std::__2::__fs::filesystem::path
  const&, std::__2::error_code*)

  /usr/wasi-sdk-14.0/share/wasi-sysroot/include/c++/v1/filesystem:256:3:
  error: "The Filesystem library is not supported by this configuration
  of libc++"
  # error "The Filesystem library is not supported by this configuration
  of libc++"
  • Loading branch information
thewtex committed Dec 2, 2021
1 parent 52ee425 commit 612f458
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/CLI/Validators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
// Filesystem cannot be used if targeting macOS < 10.15
#if defined __MAC_OS_X_VERSION_MIN_REQUIRED && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500
#define CLI11_HAS_FILESYSTEM 0
#elif defined(__wasi__)
// As of wasi-sdk-14, filesystem is not implemented
#define CLI11_HAS_FILESYSTEM 0
#else
#include <filesystem>
#if defined __cpp_lib_filesystem && __cpp_lib_filesystem >= 201703
Expand Down

0 comments on commit 612f458

Please sign in to comment.