diff --git a/.travis.yml b/.travis.yml index c824842..5e1487e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,10 +27,10 @@ matrix: addons: { apt: { packages: ["clang-6.0"] } } - env: MATRIX_EVAL="CC=clang-7 && CXX=clang++-7 && GENERATOR='Unix Makefiles'" - addons: { apt: { packages: ["clang-7"], sources: ["llvm-toolchain-xenial-7"] } } + addons: { apt: { packages: ["clang-7", "libc++-7-dev", "libc++abi-7-dev"], sources: ["llvm-toolchain-xenial-7"] } } - env: MATRIX_EVAL="CC=clang-8 && CXX=clang++-8 && GENERATOR='Unix Makefiles'" - addons: { apt: { packages: ["clang-8"], sources: ["llvm-toolchain-xenial-8"] } } + addons: { apt: { packages: ["clang-8", "libc++-8-dev", "libc++abi-8-dev"], sources: ["llvm-toolchain-xenial-8"] } } - os: osx env: MATRIX_EVAL="CC=clang && CXX=clang++ && GENERATOR=Xcode" diff --git a/README.md b/README.md index 01ff41b..b89aeb6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![Supported Platforms](https://img.shields.io/badge/platform-windows%20%7C%20macos%20%7C%20linux-blue.svg) +![Supported Platforms](https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows-blue.svg) [![Build Status](https://travis-ci.org/gulrak/filesystem.svg?branch=master)](https://travis-ci.org/gulrak/filesystem) [![Build status](https://ci.appveyor.com/api/projects/status/t07wp3k2cddo0hpo?svg=true)](https://ci.appveyor.com/project/gulrak/filesystem) ![Latest Release Tag](https://img.shields.io/github/tag/gulrak/filesystem.svg) @@ -58,11 +58,12 @@ where full C++17 is available, it doesn't try to be a "better" `std::filesystem`, just a drop-in if you can't use it (with the exception of the UTF-8 preference on Windows). -Tests are currently run with: + +Unit tests are currently run with: * macOS 10.12: XCode 9.2 (clang-900.0.39.2), GCC 8.1.0, Clang 7.0.0 * Windows 10: Visual Studio 2017 15.8.5, MingW GCC 5.3 -* Linux: Ubuntu 18.04LTS GCC 7.3 & GCC 8.2.0 +* Linux (Ubuntu): GCC (5.5, 6.5, 7.4, 8.1, 8.2), Clang (5.0, 6.0) ## Tests @@ -93,6 +94,9 @@ succeed with all filesystem implementations, but in reality, there are some differences in behavior, sometimes due to room for interpretation in in the standard, and there might be issues in these implementations too. +### Tests on Windows + +As ## Usage @@ -311,7 +315,7 @@ Besides this still being work-in-progress, there are a few cases where there will be no implementation in the close future: ```cpp -// methods in path: +// methods in ghc::filesystem::path: path& operator+=(basic_string_view x); int compare(basic_string_view s) const; ``` diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 5ad4ba0..817200b 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -12,6 +12,13 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND (CMAKE_CXX_COMPILER_VERSION endif() add_executable(std_fs_dir dir.cpp) set_property(TARGET std_fs_dir PROPERTY CXX_STANDARD 17) + if(APPLE) + target_link_libraries(std_fs_dir -lc++fs) + else() + target_compile_options(std_fs_dir PRIVATE "-stdlib=libc++") + target_link_libraries(std_fs_dir -stdlib=libc++ -lc++fs) + endif() + target_link_libraries(std_fs_dir -lc++fs) endif() @@ -24,7 +31,7 @@ endif() if(CMAKE_CXX_COMPILER_ID MATCHES MSVC AND (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 19.15 OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 19.15)) add_executable(std_fs_dir dir.cpp) set_property(TARGET std_fs_dir PROPERTY CXX_STANDARD 17) - set_property(TARGET std_fs_dir PROPERTY CXX_STANDARD_REQUIRED ON) - target_compile_options(std_fs_dir PRIVATE "/Zc:__cplusplus") - target_compile_definitions(std_fs_dir PRIVATE _CRT_SECURE_NO_WARNINGS) + set_property(TARGET std_fs_dir PROPERTY CXX_STANDARD_REQUIRED ON) + target_compile_options(std_fs_dir PRIVATE "/Zc:__cplusplus") + target_compile_definitions(std_fs_dir PRIVATE _CRT_SECURE_NO_WARNINGS) endif() diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 6c0884e..e8a2f13 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -26,8 +26,8 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND (CMAKE_CXX_COMPILER_VERSION if(APPLE) target_link_libraries(std_filesystem_test -lc++fs) else() - add_compile_options("-stdlib=libc++") - target_link_libraries(std_filesystem_test -lc++fs) + target_compile_options(std_filesystem_test PRIVATE "-stdlib=libc++") + target_link_libraries(std_filesystem_test -stdlib=libc++ -lc++fs) endif() endif() if (CMAKE_COMPILER_IS_GNUCXX AND (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 8.0 OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0)) @@ -39,7 +39,7 @@ endif() if(CMAKE_CXX_COMPILER_ID MATCHES MSVC AND (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 19.15 OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 19.15)) add_executable(std_filesystem_test filesystem_test.cpp catch.hpp) set_property(TARGET std_filesystem_test PROPERTY CXX_STANDARD 17) - target_compile_options(std_filesystem_test PRIVATE "/Zc:__cplusplus") + target_compile_options(std_filesystem_test PRIVATE "/Zc:__cplusplus") target_compile_definitions(std_filesystem_test PRIVATE USE_STD_FS _CRT_SECURE_NO_WARNINGS) endif()