mirror of
https://git.mirrors.martin98.com/https://github.com/gulrak/filesystem
synced 2025-09-19 23:03:12 +08:00
Compare commits
232 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
9fda7b0afb | ||
![]() |
076592ce6e | ||
![]() |
157feb3651 | ||
![]() |
f08e8b0064 | ||
![]() |
99c3500205 | ||
![]() |
f43846877b | ||
![]() |
b1982f06c8 | ||
![]() |
fbc5d213fc | ||
![]() |
72a03b3c6d | ||
![]() |
9fe68b91c7 | ||
![]() |
56776c92f7 | ||
![]() |
42ea4fc615 | ||
![]() |
eeed314237 | ||
![]() |
768b5cb11b | ||
![]() |
2fc4b46375 | ||
![]() |
fc19b58459 | ||
![]() |
f19cbbbd31 | ||
![]() |
0ef214a7a0 | ||
![]() |
fcea331ebb | ||
![]() |
1ab54e53cc | ||
![]() |
58e983167c | ||
![]() |
c4683aa4a1 | ||
![]() |
144954ff4e | ||
![]() |
48d46cccef | ||
![]() |
23710d3b56 | ||
![]() |
64f9c5a61a | ||
![]() |
a55c96a2ba | ||
![]() |
aaaf381d9d | ||
![]() |
72a76d774e | ||
![]() |
e5ae1bd3e3 | ||
![]() |
8a2edd6d92 | ||
![]() |
e9e32f8830 | ||
![]() |
9f61ee0eb5 | ||
![]() |
d1f0d79054 | ||
![]() |
61176cd82a | ||
![]() |
78b746d901 | ||
![]() |
9df22d5396 | ||
![]() |
9ffca3839f | ||
![]() |
2a81c2c355 | ||
![]() |
e3341b2f64 | ||
![]() |
6a94e84da4 | ||
![]() |
a7a6d930fb | ||
![]() |
7da9be91c9 | ||
![]() |
e6b34e29bf | ||
![]() |
b1ff2ce95e | ||
![]() |
3afbd9c315 | ||
![]() |
de64decd91 | ||
![]() |
f3c1058928 | ||
![]() |
f3033c29fb | ||
![]() |
4041174f96 | ||
![]() |
c8113e14b1 | ||
![]() |
b6d302f5b9 | ||
![]() |
efc077f553 | ||
![]() |
bc05cc59f4 | ||
![]() |
a9c18e0880 | ||
![]() |
9afb43851d | ||
![]() |
c57242b4bc | ||
![]() |
3337cc252a | ||
![]() |
655b0b354a | ||
![]() |
f0caeb7d58 | ||
![]() |
6c6f2c2ec0 | ||
![]() |
3e5b930d96 | ||
![]() |
d3d968e583 | ||
![]() |
404c57f1b0 | ||
![]() |
4c33b91fe9 | ||
![]() |
089ef64aa3 | ||
![]() |
4f0824fd76 | ||
![]() |
28f7c929e0 | ||
![]() |
ab8a78d806 | ||
![]() |
f6d7d5b826 | ||
![]() |
cd6805e94d | ||
![]() |
6cc60fb687 | ||
![]() |
fb4bb2b764 | ||
![]() |
c4907cc681 | ||
![]() |
5d1d579048 | ||
![]() |
7fa1bde113 | ||
![]() |
7a53650e73 | ||
![]() |
1ae0195287 | ||
![]() |
e5bbc754e7 | ||
![]() |
977e5d6284 | ||
![]() |
723c787b9e | ||
![]() |
91e71f7f54 | ||
![]() |
c4b507e9d8 | ||
![]() |
e8a17c1319 | ||
![]() |
d4e12344d6 | ||
![]() |
f437344e79 | ||
![]() |
f0467f4384 | ||
![]() |
a07ddedeae | ||
![]() |
614bbe87b8 | ||
![]() |
09908b7241 | ||
![]() |
1dbe2d9bec | ||
![]() |
7b8cf519f2 | ||
![]() |
d279a4f73d | ||
![]() |
97d7fa8d10 | ||
![]() |
1f3943b1c4 | ||
![]() |
6a835afddf | ||
![]() |
7bc5c17305 | ||
![]() |
924d84acf0 | ||
![]() |
d87ac130cf | ||
![]() |
1d3d5f5d7d | ||
![]() |
6fad24ecb9 | ||
![]() |
b3d9a50bb5 | ||
![]() |
cd68567543 | ||
![]() |
15e814e820 | ||
![]() |
4e21ab3057 | ||
![]() |
a0e5e43c90 | ||
![]() |
c029736d27 | ||
![]() |
19d0c63c29 | ||
![]() |
e402bad9b8 | ||
![]() |
51d62f88bb | ||
![]() |
231b64fec0 | ||
![]() |
31665c040a | ||
![]() |
70cf2f03ba | ||
![]() |
d0b13bbc8e | ||
![]() |
05a41f6dae | ||
![]() |
9c6ff202e7 | ||
![]() |
a697b05dd7 | ||
![]() |
cf4e05d42f | ||
![]() |
e51e6ee46b | ||
![]() |
873a55addf | ||
![]() |
7e009bcf6f | ||
![]() |
e65a6baf76 | ||
![]() |
37442cc5ea | ||
![]() |
134dffdcbd | ||
![]() |
777e3c9a34 | ||
![]() |
22d1133ea5 | ||
![]() |
b9faee7f5d | ||
![]() |
7fb50217da | ||
![]() |
6ab0cb2844 | ||
![]() |
fc875735dd | ||
![]() |
6dc4ece24b | ||
![]() |
494e751709 | ||
![]() |
76c3966df4 | ||
![]() |
2a8b380f8d | ||
![]() |
c29d535bb5 | ||
![]() |
865f09be7b | ||
![]() |
fd9bb43015 | ||
![]() |
9092e09c99 | ||
![]() |
1037c02950 | ||
![]() |
b82066f27e | ||
![]() |
d768b60d49 | ||
![]() |
b8cff0c99c | ||
![]() |
828062889a | ||
![]() |
67e708cc4f | ||
![]() |
399941fe55 | ||
![]() |
8d45dc4d41 | ||
![]() |
0858444609 | ||
![]() |
7b6b600fd1 | ||
![]() |
b15977a05a | ||
![]() |
dbf882b124 | ||
![]() |
6033320a1a | ||
![]() |
2a7ebf36c0 | ||
![]() |
f86be09be3 | ||
![]() |
f37cdd5af5 | ||
![]() |
264445eaee | ||
![]() |
5c02ca36b4 | ||
![]() |
8a19af1f63 | ||
![]() |
bc69aa355c | ||
![]() |
f98478c33b | ||
![]() |
0e5f2f5d1b | ||
![]() |
b78b0239a3 | ||
![]() |
daf0e7dfbf | ||
![]() |
34fe1e314a | ||
![]() |
011e039c4b | ||
![]() |
799fcb4d4d | ||
![]() |
31ea91b7bd | ||
![]() |
57f3186ee2 | ||
![]() |
0d109a7666 | ||
![]() |
402f462062 | ||
![]() |
77a8df068d | ||
![]() |
88f9c3613a | ||
![]() |
2dbb71acae | ||
![]() |
2298e68d5c | ||
![]() |
0f6f0af4b4 | ||
![]() |
3d3c02ce35 | ||
![]() |
9970d3354f | ||
![]() |
306ad540ed | ||
![]() |
967c563d07 | ||
![]() |
c1fcd93c29 | ||
![]() |
8353715199 | ||
![]() |
fdf5bb0179 | ||
![]() |
05f0aa8ae1 | ||
![]() |
4e0a591a59 | ||
![]() |
9e3d42fd72 | ||
![]() |
75c647f327 | ||
![]() |
ff271edfee | ||
![]() |
6699f6a3da | ||
![]() |
3eddea2ea8 | ||
![]() |
4944a87e18 | ||
![]() |
a7abc2ad4a | ||
![]() |
c96b0059c3 | ||
![]() |
8fac7e5254 | ||
![]() |
b869b9fc4b | ||
![]() |
973abff4b9 | ||
![]() |
de57485877 | ||
![]() |
0dde29d260 | ||
![]() |
6bf13c0ce1 | ||
![]() |
9206877fc8 | ||
![]() |
8166dd1546 | ||
![]() |
fed499b543 | ||
![]() |
56c58756aa | ||
![]() |
06433ccb3c | ||
![]() |
5bf0d440e7 | ||
![]() |
3225d122ac | ||
![]() |
ab3cb84648 | ||
![]() |
45d36a8e19 | ||
![]() |
0282098c13 | ||
![]() |
3629ba96e5 | ||
![]() |
5b5b529398 | ||
![]() |
dc8eb2d004 | ||
![]() |
3ad9525acc | ||
![]() |
b3451220ca | ||
![]() |
d2100b431f | ||
![]() |
011659ff75 | ||
![]() |
9c83cc14ff | ||
![]() |
0962f46650 | ||
![]() |
eef2c2ba55 | ||
![]() |
97577f4c3b | ||
![]() |
440e556f21 | ||
![]() |
b51fe02f1a | ||
![]() |
ff56073075 | ||
![]() |
10e0da40bc | ||
![]() |
1edf4a3339 | ||
![]() |
427108c8e2 | ||
![]() |
809d680df9 | ||
![]() |
b3f9635581 | ||
![]() |
b6dd2cd0f1 | ||
![]() |
3fd3482559 | ||
![]() |
cf7890719f | ||
![]() |
416c60a1d4 | ||
![]() |
1c7204285d | ||
![]() |
f824d0d46b |
@ -1,5 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd build
|
cd build
|
||||||
|
echo "Tests run as user: $USER"
|
||||||
ctest -E Windows
|
ctest -E Windows
|
||||||
if [ -f "test/std_filesystem_test" ]; then
|
if [ -f "test/std_filesystem_test" ]; then
|
||||||
test/std_filesystem_test || true
|
test/std_filesystem_test || true
|
||||||
|
27
.cirrus.yml
27
.cirrus.yml
@ -1,6 +1,6 @@
|
|||||||
freebsd_task:
|
freebsd_task:
|
||||||
freebsd_instance:
|
freebsd_instance:
|
||||||
image_family: freebsd-12-1
|
image_family: freebsd-14-0
|
||||||
install_script: |
|
install_script: |
|
||||||
pkg install -y cmake
|
pkg install -y cmake
|
||||||
pw groupadd testgrp
|
pw groupadd testgrp
|
||||||
@ -11,25 +11,24 @@ freebsd_task:
|
|||||||
test_script: |
|
test_script: |
|
||||||
sudo -u testuser .ci/unix-test.sh
|
sudo -u testuser .ci/unix-test.sh
|
||||||
|
|
||||||
centos7_task:
|
rockylinux8_task:
|
||||||
container:
|
container:
|
||||||
image: centos:7
|
image: docker.io/rockylinux:8
|
||||||
install_script: |
|
install_script: |
|
||||||
yum install -y centos-release-scl
|
dnf group install -y "Development Tools"
|
||||||
yum install -y devtoolset-9
|
dnf install cmake -y
|
||||||
curl -L https://github.com/Kitware/CMake/releases/download/v3.16.4/cmake-3.16.4-Linux-x86_64.tar.gz | tar xzvf - -C /usr/local --strip-components 1
|
|
||||||
build_script: |
|
build_script: |
|
||||||
source /opt/rh/devtoolset-9/enable && PATH=$PATH:/usr/local/bin .ci/unix-build.sh
|
.ci/unix-build.sh
|
||||||
test_script: |
|
test_script: |
|
||||||
PATH=$PATH:/usr/local/bin .ci/unix-test.sh
|
.ci/unix-test.sh
|
||||||
|
|
||||||
centos8_task:
|
rockylinux9_task:
|
||||||
container:
|
container:
|
||||||
image: centos:8
|
image: docker.io/rockylinux:9
|
||||||
install_script: |
|
install_script: |
|
||||||
yum group install -y "Development Tools"
|
dnf group install -y "Development Tools"
|
||||||
curl -L https://github.com/Kitware/CMake/releases/download/v3.16.4/cmake-3.16.4-Linux-x86_64.tar.gz | tar xzvf - -C /usr/local --strip-components 1
|
dnf install cmake -y
|
||||||
build_script: |
|
build_script: |
|
||||||
PATH=$PATH:/usr/local/bin .ci/unix-build.sh
|
.ci/unix-build.sh
|
||||||
test_script: |
|
test_script: |
|
||||||
PATH=$PATH:/usr/local/bin .ci/unix-test.sh
|
.ci/unix-test.sh
|
||||||
|
3
.clang-tidy
Normal file
3
.clang-tidy
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
Checks: -modernize-use-nodiscard
|
||||||
|
...
|
170
.github/workflows/build_cmake.yml
vendored
Normal file
170
.github/workflows/build_cmake.yml
vendored
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
name: CMake Build Matrix
|
||||||
|
|
||||||
|
on: [ push, pull_request ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: ${{ matrix.config.name }}
|
||||||
|
runs-on: ${{ matrix.config.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
config:
|
||||||
|
- name: "Ubuntu 22.04 GCC 11"
|
||||||
|
os: ubuntu-22.04
|
||||||
|
build_type: Release
|
||||||
|
packages: ninja-build
|
||||||
|
generator: Ninja
|
||||||
|
compatibility: "cxx_std_11;cxx_std_17;cxx_std_20"
|
||||||
|
cc: gcc
|
||||||
|
cxx: g++
|
||||||
|
|
||||||
|
- name: "Ubuntu 22.04 Clang 13.0"
|
||||||
|
os: ubuntu-22.04
|
||||||
|
build_type: Release
|
||||||
|
packages: ninja-build libc++-13-dev libc++abi-13-dev
|
||||||
|
generator: Ninja
|
||||||
|
compatibility: "cxx_std_11;cxx_std_17;cxx_std_20"
|
||||||
|
cc: clang-13
|
||||||
|
cxx: clang++-13
|
||||||
|
|
||||||
|
- name: "Ubuntu 22.04 Clang 15.0"
|
||||||
|
os: ubuntu-22.04
|
||||||
|
build_type: Release
|
||||||
|
packages: ninja-build libc++-15-dev libc++abi-15-dev
|
||||||
|
generator: Ninja
|
||||||
|
compatibility: "cxx_std_11;cxx_std_17;cxx_std_20"
|
||||||
|
cc: clang-15
|
||||||
|
cxx: clang++-15
|
||||||
|
|
||||||
|
- name: "Ubuntu 22.04 GCC 11 coverage"
|
||||||
|
os: ubuntu-22.04
|
||||||
|
build_type: Debug
|
||||||
|
packages: ninja-build lcov
|
||||||
|
generator: Ninja
|
||||||
|
compatibility: "cxx_std_11;cxx_std_17;cxx_std_20"
|
||||||
|
cc: gcc
|
||||||
|
cxx: g++
|
||||||
|
|
||||||
|
- name: "Ubuntu 20.04 GCC 9.3"
|
||||||
|
os: ubuntu-20.04
|
||||||
|
build_type: Release
|
||||||
|
packages: ninja-build
|
||||||
|
generator: Ninja
|
||||||
|
compatibility: "cxx_std_11;cxx_std_17;cxx_std_20"
|
||||||
|
cc: gcc
|
||||||
|
cxx: g++
|
||||||
|
|
||||||
|
- name: "Ubuntu 20.04 Clang 10.0"
|
||||||
|
os: ubuntu-20.04
|
||||||
|
build_type: Release
|
||||||
|
packages: ninja-build
|
||||||
|
generator: Ninja
|
||||||
|
compatibility: "cxx_std_11;cxx_std_17;cxx_std_20"
|
||||||
|
cc: clang-10
|
||||||
|
cxx: clang++-10
|
||||||
|
|
||||||
|
- name: "Ubuntu 20.04 Clang 11.0"
|
||||||
|
os: ubuntu-20.04
|
||||||
|
build_type: Release
|
||||||
|
packages: ninja-build clang-11 libc++-11-dev libc++abi-11-dev
|
||||||
|
generator: Ninja
|
||||||
|
compatibility: "cxx_std_11;cxx_std_17;cxx_std_20"
|
||||||
|
cc: clang-11
|
||||||
|
cxx: clang++-11
|
||||||
|
|
||||||
|
- name: "Ubuntu 20.04 GCC 9.3 coverage"
|
||||||
|
os: ubuntu-20.04
|
||||||
|
build_type: Debug
|
||||||
|
packages: ninja-build lcov
|
||||||
|
generator: Ninja
|
||||||
|
compatibility: "cxx_std_11;cxx_std_17;cxx_std_20"
|
||||||
|
cc: gcc
|
||||||
|
cxx: g++
|
||||||
|
|
||||||
|
- name: "Windows MSVC 2019"
|
||||||
|
os: windows-2019
|
||||||
|
build_type: Release
|
||||||
|
packages: ninja
|
||||||
|
generator: "Visual Studio 16 2019"
|
||||||
|
compatibility: "cxx_std_11;cxx_std_17;cxx_std_20"
|
||||||
|
cc: cl
|
||||||
|
cxx: cl
|
||||||
|
|
||||||
|
- name: "macOS 13 AppleClang"
|
||||||
|
os: macos-13
|
||||||
|
build_type: Release
|
||||||
|
packages: ninja
|
||||||
|
generator: Ninja
|
||||||
|
compatibility: "cxx_std_11;cxx_std_17;cxx_std_20"
|
||||||
|
cc: clang
|
||||||
|
cxx: clang++
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: print environment
|
||||||
|
run: |
|
||||||
|
echo github.event.action: ${{ github.event.action }}
|
||||||
|
echo github.event_name: ${{ github.event_name }}
|
||||||
|
|
||||||
|
- name: Install dependencies on Ubuntu
|
||||||
|
if: startsWith(matrix.config.os, 'ubuntu')
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install ${{ matrix.config.packages }}
|
||||||
|
|
||||||
|
- name: Install dependencies on windows
|
||||||
|
if: startsWith(matrix.config.os, 'windows')
|
||||||
|
run: |
|
||||||
|
choco install ${{ matrix.config.packages }}
|
||||||
|
|
||||||
|
- name: Install dependencies on macOS
|
||||||
|
if: startsWith(matrix.config.os, 'macos')
|
||||||
|
run: |
|
||||||
|
brew install ${{ matrix.config.packages }}
|
||||||
|
|
||||||
|
- name: Configure project
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
export CC=${{ matrix.config.cc }}
|
||||||
|
export CXX=${{ matrix.config.cxx }}
|
||||||
|
ninja --version
|
||||||
|
cmake --version
|
||||||
|
mkdir build
|
||||||
|
mkdir install
|
||||||
|
if [[ "${{ matrix.config.build_type }}" == "Debug" ]]; then
|
||||||
|
cmake -G "${{ matrix.config.generator }}" -S . -B build -DCMAKE_BUILD_TYPE=Debug -DGHC_COVERAGE=ON -DGHC_FILESYSTEM_TEST_COMPILE_FEATURES="${{ matrix.config.compatibility }}" -DCMAKE_INSTALL_PREFIX:PATH=install
|
||||||
|
else
|
||||||
|
cmake -G "${{ matrix.config.generator }}" -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DGHC_FILESYSTEM_TEST_COMPILE_FEATURES="${{ matrix.config.compatibility }}" -DCMAKE_INSTALL_PREFIX:PATH=install
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Build project
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cmake --build build --config ${{ matrix.config.build_type }}
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: |
|
||||||
|
cd build && ctest -C ${{ matrix.config.build_type }}
|
||||||
|
|
||||||
|
- name: Collect coverage info
|
||||||
|
if: startsWith(matrix.config.build_type, 'Debug')
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
lcov --compat-libtool --directory . --capture --output-file coverage_output.info
|
||||||
|
lcov --remove coverage_output.info '/usr/*' '*/c++/*' '*.h' '*/catch.hpp' -o coverage.info
|
||||||
|
# sed -i 's|SF:/.*/filesystem/|SF:../|g' coverage.info
|
||||||
|
|
||||||
|
- name: Upload coverage info
|
||||||
|
if: startsWith(matrix.config.build_type, 'Debug')
|
||||||
|
env:
|
||||||
|
COVERALLS_DEBUG: true
|
||||||
|
NODE_COVERALLS_DEBUG: 1
|
||||||
|
uses: coverallsapp/github-action@master
|
||||||
|
with:
|
||||||
|
path-to-lcov: ${{ github.workspace }}/build/coverage.info
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
100
.travis.yml
100
.travis.yml
@ -1,100 +0,0 @@
|
|||||||
language: cpp
|
|
||||||
|
|
||||||
dist: xenial # default distribution
|
|
||||||
os: linux # default os
|
|
||||||
sudo: false
|
|
||||||
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
fast_finish: true
|
|
||||||
include:
|
|
||||||
- env: MATRIX_EVAL="CC=gcc-5 && CXX=g++-5 && GENERATOR='Unix Makefiles' && CONFIG=Release"
|
|
||||||
addons: { apt: { packages: ["g++-5"], sources: ["ubuntu-toolchain-r-test"] } }
|
|
||||||
|
|
||||||
- env: MATRIX_EVAL="CC=gcc-6 && CXX=g++-6 && GENERATOR='Unix Makefiles' && CONFIG=Release"
|
|
||||||
addons: { apt: { packages: ["g++-6"], sources: ["ubuntu-toolchain-r-test"] } }
|
|
||||||
|
|
||||||
- env: MATRIX_EVAL="CC=gcc-7 && CXX=g++-7 && GENERATOR='Unix Makefiles' && CONFIG=Release"
|
|
||||||
addons: { apt: { packages: ["g++-7"], sources: ["ubuntu-toolchain-r-test"] } }
|
|
||||||
|
|
||||||
- env: MATRIX_EVAL="CC=gcc-7 && CXX=g++-7 && GENERATOR='Unix Makefiles' && CONFIG=Debug && GHC_COVERAGE=1"
|
|
||||||
addons: { apt: { packages: ["g++-7", "lcov"], sources: ["ubuntu-toolchain-r-test"] } }
|
|
||||||
|
|
||||||
- env: MATRIX_EVAL="CC=gcc-8 && CXX=g++-8 && GENERATOR='Unix Makefiles' && CONFIG=Release"
|
|
||||||
addons: { apt: { packages: ["g++-8"], sources: ["ubuntu-toolchain-r-test"] } }
|
|
||||||
|
|
||||||
- env: MATRIX_EVAL="CC=gcc-9 && CXX=g++-9 && GENERATOR='Unix Makefiles' && CONFIG=Release"
|
|
||||||
addons: { apt: { packages: ["g++-9"], sources: ["ubuntu-toolchain-r-test"] } }
|
|
||||||
|
|
||||||
- env: MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0 && GENERATOR='Unix Makefiles' && CONFIG=Release"
|
|
||||||
addons: { apt: { packages: ["clang-5.0"] } }
|
|
||||||
|
|
||||||
- env: MATRIX_EVAL="CC=clang-6.0 && CXX=clang++-6.0 && GENERATOR='Unix Makefiles' && CONFIG=Release"
|
|
||||||
addons: { apt: { packages: ["clang-6.0"] } }
|
|
||||||
|
|
||||||
- env: MATRIX_EVAL="CC=clang-7 && CXX=clang++-7 && GENERATOR='Unix Makefiles' && CONFIG=Release"
|
|
||||||
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' && CONFIG=Release"
|
|
||||||
addons: { apt: { packages: ["clang-8", "libc++-8-dev", "libc++abi-8-dev"], sources: ["llvm-toolchain-xenial-8"] } }
|
|
||||||
|
|
||||||
- env: MATRIX_EVAL="CC=clang-9 && CXX=clang++-9 && GENERATOR='Unix Makefiles' && CONFIG=Release"
|
|
||||||
addons: { apt: { packages: ["clang-9", "libc++-9-dev", "libc++abi-9-dev"], sources: [{sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main', key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'}] } }
|
|
||||||
|
|
||||||
- os: osx
|
|
||||||
env: MATRIX_EVAL="CC=clang && CXX=clang++ && GENERATOR=Xcode && CONFIG=Release"
|
|
||||||
osx_image: xcode9.2
|
|
||||||
|
|
||||||
- os: osx
|
|
||||||
env: MATRIX_EVAL="CC=clang && CXX=clang++ && GENERATOR=Xcode && CONFIG=Release"
|
|
||||||
osx_image: xcode10.1
|
|
||||||
|
|
||||||
- os: osx
|
|
||||||
env: MATRIX_EVAL="CC=clang && CXX=clang++ && GENERATOR=Xcode && CONFIG=Release"
|
|
||||||
osx_image: xcode11.3
|
|
||||||
|
|
||||||
install:
|
|
||||||
- eval "${MATRIX_EVAL}"
|
|
||||||
- |
|
|
||||||
if [ "${GHC_COVERAGE}" = "1" ]; then
|
|
||||||
gem install coveralls-lcov
|
|
||||||
fi
|
|
||||||
- $CC --version
|
|
||||||
- $CXX --version
|
|
||||||
- cmake --version
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
- eval "${MATRIX_EVAL}"
|
|
||||||
- mkdir build
|
|
||||||
- cd build
|
|
||||||
- export VERBOSE=1
|
|
||||||
- |
|
|
||||||
if [ "${CONFIG}" = "Debug" ]; then
|
|
||||||
cmake -G"${GENERATOR}" -DCMAKE_CXX_COMPILER=${CXX} -DCMAKE_C_COMPILER=${CC} -DCMAKE_BUILD_TYPE=${CONFIG} -DGHC_COVERAGE=ON ..
|
|
||||||
else
|
|
||||||
cmake -G"${GENERATOR}" -DCMAKE_CXX_COMPILER=${CXX} -DCMAKE_C_COMPILER=${CC} -DCMAKE_BUILD_TYPE=${CONFIG} ..
|
|
||||||
fi
|
|
||||||
|
|
||||||
script:
|
|
||||||
- export VERBOSE=1
|
|
||||||
- cmake --build . --config ${CONFIG} --target filesystem_test
|
|
||||||
- |
|
|
||||||
if [ "${GHC_COVERAGE}" = "1" ]; then
|
|
||||||
cmake --build . --config ${CONFIG} --target filesystem_test
|
|
||||||
test/filesystem_test
|
|
||||||
else
|
|
||||||
cmake --build . --config ${CONFIG}
|
|
||||||
ctest -C ${CONFIG} -E Windows
|
|
||||||
if [ -f "test/std_filesystem_test" ]; then
|
|
||||||
test/std_filesystem_test || true
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
after_success:
|
|
||||||
- |
|
|
||||||
if [ "${GHC_COVERAGE}" = "1" ]; then
|
|
||||||
lcov --compat-libtool --directory . --capture --output-file coverage_output.info
|
|
||||||
lcov --remove coverage_output.info '/usr/*' '*/c++/*' '*.h' '*/catch.hpp' -o coverage.info
|
|
||||||
sed -i 's|SF:/.*/filesystem/|SF:../|g' coverage.info
|
|
||||||
coveralls-lcov coverage.info
|
|
||||||
fi
|
|
@ -1,36 +1,55 @@
|
|||||||
cmake_minimum_required(VERSION 3.7.2)
|
cmake_minimum_required(VERSION 3.7.2)
|
||||||
project(ghcfilesystem)
|
project(
|
||||||
|
ghcfilesystem,
|
||||||
|
VERSION 1.5.15
|
||||||
|
)
|
||||||
|
|
||||||
include(CMakeDependentOption)
|
if (POLICY CMP0077)
|
||||||
|
cmake_policy(SET CMP0077 NEW)
|
||||||
|
endif()
|
||||||
|
if(POLICY CMP0110)
|
||||||
|
cmake_policy(SET CMP0110 NEW)
|
||||||
|
endif()
|
||||||
|
|
||||||
cmake_dependent_option(GHC_FILESYSTEM_BUILD_TESTING
|
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
||||||
"Enable tests" ON
|
option(GHC_FILESYSTEM_BUILD_TESTING "Enable tests" ON)
|
||||||
"CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR" OFF)
|
option(GHC_FILESYSTEM_BUILD_EXAMPLES "Build examples" ON)
|
||||||
cmake_dependent_option(GHC_FILESYSTEM_BUILD_EXAMPLES
|
option(GHC_FILESYSTEM_WITH_INSTALL "With install target" ON)
|
||||||
"Build examples" ON
|
else()
|
||||||
"CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR" OFF)
|
option(GHC_FILESYSTEM_BUILD_EXAMPLES "Build examples" OFF)
|
||||||
cmake_dependent_option(GHC_FILESYSTEM_WITH_INSTALL
|
option(GHC_FILESYSTEM_BUILD_TESTING "Enable tests" OFF)
|
||||||
"With install target" ON
|
option(GHC_FILESYSTEM_WITH_INSTALL "With install target" OFF)
|
||||||
"CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR" OFF)
|
endif()
|
||||||
|
option(GHC_FILESYSTEM_BUILD_STD_TESTING "Enable STD tests" ${GHC_FILESYSTEM_BUILD_TESTING})
|
||||||
|
if(NOT DEFINED GHC_FILESYSTEM_TEST_COMPILE_FEATURES)
|
||||||
|
set(GHC_FILESYSTEM_TEST_COMPILE_FEATURES ${CMAKE_CXX_COMPILE_FEATURES})
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT DEFINED CMAKE_CXX_STANDARD)
|
if(NOT DEFINED CMAKE_CXX_STANDARD)
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
if(NOT CYGWIN)
|
||||||
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(CMAKE_CXX_STANDARD LESS 11)
|
if(CMAKE_CXX_STANDARD LESS 11)
|
||||||
message(FATAL_ERROR "CMAKE_CXX_STANDARD is less than 11, ghc::filesystem only works with C++11 and above.")
|
message(FATAL_ERROR "CMAKE_CXX_STANDARD is less than 11, ghc::filesystem only works with C++11 and above.")
|
||||||
endif()
|
endif()
|
||||||
|
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
||||||
|
message(STATUS "System name: ${CMAKE_SYSTEM_NAME}")
|
||||||
|
message(STATUS "Compiler ID: ${CMAKE_CXX_COMPILER_ID}")
|
||||||
|
message(STATUS "CMAKE_CXX_COMPILE_FEATURES: ${CMAKE_CXX_COMPILE_FEATURES}")
|
||||||
|
endif()
|
||||||
|
|
||||||
add_library(ghc_filesystem INTERFACE)
|
add_library(ghc_filesystem INTERFACE)
|
||||||
|
add_library(ghcFilesystem::ghc_filesystem ALIAS ghc_filesystem)
|
||||||
target_include_directories(ghc_filesystem INTERFACE
|
target_include_directories(ghc_filesystem INTERFACE
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>)
|
$<INSTALL_INTERFACE:include>)
|
||||||
target_compile_options(ghc_filesystem INTERFACE "$<$<C_COMPILER_ID:MSVC>:/utf-8>")
|
target_compile_options(ghc_filesystem INTERFACE "$<$<C_COMPILER_ID:MSVC>:/utf-8>")
|
||||||
target_compile_options(ghc_filesystem INTERFACE "$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
|
target_compile_options(ghc_filesystem INTERFACE "$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
|
||||||
|
|
||||||
get_directory_property(hasParent PARENT_DIRECTORY)
|
if(GHC_FILESYSTEM_BUILD_TESTING OR GHC_FILESYSTEM_BUILD_EXAMPLES)
|
||||||
if(NOT hasParent)
|
|
||||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
|
||||||
include(GhcHelper)
|
include(GhcHelper)
|
||||||
@ -48,9 +67,24 @@ endif()
|
|||||||
if(GHC_FILESYSTEM_WITH_INSTALL)
|
if(GHC_FILESYSTEM_WITH_INSTALL)
|
||||||
include(CMakePackageConfigHelpers)
|
include(CMakePackageConfigHelpers)
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||||
install(TARGETS ghc_filesystem EXPORT ghcFilesystemConfig)
|
install(TARGETS ghc_filesystem EXPORT ghc_filesystem-targets)
|
||||||
install(EXPORT ghcFilesystemConfig NAMESPACE ghcFilesystem:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ghcFilesystem)
|
install(EXPORT ghc_filesystem-targets NAMESPACE ghcFilesystem:: DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/ghc_filesystem")
|
||||||
|
export(EXPORT ghc_filesystem-targets NAMESPACE ghcFilesystem:: FILE "${CMAKE_CURRENT_BINARY_DIR}/cmake/ghc_filesystem-targets.cmake")
|
||||||
|
configure_package_config_file(
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/config.cmake.in"
|
||||||
|
"${PROJECT_BINARY_DIR}/cmake/ghc_filesystem-config.cmake"
|
||||||
|
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/ghc_filesystem"
|
||||||
|
PATH_VARS CMAKE_INSTALL_INCLUDEDIR)
|
||||||
|
write_basic_package_version_file(
|
||||||
|
"${PROJECT_BINARY_DIR}/cmake/ghc_filesystem-config-version.cmake"
|
||||||
|
VERSION ${PROJECT_VERSION}
|
||||||
|
COMPATIBILITY SameMinorVersion
|
||||||
|
)
|
||||||
|
install(
|
||||||
|
FILES
|
||||||
|
"${PROJECT_BINARY_DIR}/cmake/ghc_filesystem-config.cmake"
|
||||||
|
"${PROJECT_BINARY_DIR}/cmake/ghc_filesystem-config-version.cmake"
|
||||||
|
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/ghc_filesystem"
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
macro(AddExecutableWithStdFS targetName)
|
macro(AddExecutableWithStdFS targetName)
|
||||||
|
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 7.0 OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0))
|
||||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 7.0 OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0))
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
include_directories(/usr/local/opt/llvm/include)
|
include_directories(/usr/local/opt/llvm/include)
|
||||||
link_directories(/usr/local/opt/llvm/lib)
|
link_directories(/usr/local/opt/llvm/lib)
|
||||||
@ -12,7 +11,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND (CMAKE_CXX_COMPILER_VERSION
|
|||||||
target_link_libraries(${targetName} -lc++fs)
|
target_link_libraries(${targetName} -lc++fs)
|
||||||
else()
|
else()
|
||||||
target_compile_options(${targetName} PRIVATE "-stdlib=libc++")
|
target_compile_options(${targetName} PRIVATE "-stdlib=libc++")
|
||||||
target_link_libraries(${targetName} -stdlib=libc++ -lc++fs)
|
target_link_libraries(${targetName} -stdlib=libc++ -lc++fs $<$<PLATFORM_ID:Linux>:rt>)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
if(NOT APPLE)
|
if(NOT APPLE)
|
||||||
@ -20,6 +19,12 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND (CMAKE_CXX_COMPILER_VERSION
|
|||||||
target_link_libraries(${targetName} -stdlib=libc++)
|
target_link_libraries(${targetName} -stdlib=libc++)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
if(${CMAKE_SYSTEM_NAME} MATCHES "(SunOS|Solaris)")
|
||||||
|
target_link_libraries(filesystem_test xnet)
|
||||||
|
endif()
|
||||||
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
|
||||||
|
target_link_libraries(filesystem_test network)
|
||||||
|
endif()
|
||||||
target_compile_definitions(${targetName} PRIVATE USE_STD_FS)
|
target_compile_definitions(${targetName} PRIVATE USE_STD_FS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -29,6 +34,13 @@ if (CMAKE_COMPILER_IS_GNUCXX AND (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 8.0 O
|
|||||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
|
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
|
||||||
target_link_libraries(${targetName} -lstdc++fs)
|
target_link_libraries(${targetName} -lstdc++fs)
|
||||||
endif()
|
endif()
|
||||||
|
if(${CMAKE_SYSTEM_NAME} MATCHES "(SunOS|Solaris)")
|
||||||
|
target_link_libraries(${targetName} xnet)
|
||||||
|
endif()
|
||||||
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
|
||||||
|
target_link_libraries(${targetName} network)
|
||||||
|
endif()
|
||||||
|
target_compile_options(${targetName} PRIVATE $<$<BOOL:${CYGWIN}>:-Wa,-mbig-obj>)
|
||||||
target_compile_definitions(${targetName} PRIVATE USE_STD_FS)
|
target_compile_definitions(${targetName} PRIVATE USE_STD_FS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -41,3 +53,29 @@ if(CMAKE_CXX_COMPILER_ID MATCHES MSVC AND (CMAKE_CXX_COMPILER_VERSION VERSION_EQ
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
macro(AddTestExecutableWithStdCpp cppStd)
|
||||||
|
add_executable(filesystem_test_cpp${cppStd} ${ARGN})
|
||||||
|
set_property(TARGET filesystem_test_cpp${cppStd} PROPERTY CXX_STANDARD ${cppStd})
|
||||||
|
target_link_libraries(filesystem_test_cpp${cppStd} ghc_filesystem)
|
||||||
|
if(${CMAKE_SYSTEM_NAME} MATCHES "(SunOS|Solaris)")
|
||||||
|
target_link_libraries(filesystem_test_cpp${cppStd} xnet)
|
||||||
|
endif()
|
||||||
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
|
||||||
|
target_link_libraries(filesystem_test_cpp${cppStd} network)
|
||||||
|
endif()
|
||||||
|
target_compile_options(filesystem_test_cpp${cppStd} PRIVATE
|
||||||
|
$<$<BOOL:${EMSCRIPTEN}>:-s DISABLE_EXCEPTION_CATCHING=0>
|
||||||
|
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wall -Wextra -Wshadow -Wconversion -Wsign-conversion -Wpedantic -Werror -Wno-error=deprecated-declarations>
|
||||||
|
$<$<CXX_COMPILER_ID:GNU>:-Wall -Wextra -Wshadow -Wconversion -Wsign-conversion -Wpedantic -Wno-psabi -Werror -Wno-error=deprecated-declarations>
|
||||||
|
$<$<CXX_COMPILER_ID:MSVC>:/WX /wd4996>
|
||||||
|
$<$<BOOL:${CYGWIN}>:-Wa,-mbig-obj>
|
||||||
|
$<$<BOOL:${GHC_COVERAGE}>:--coverage>)
|
||||||
|
if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
||||||
|
target_compile_definitions(filesystem_test_cpp${cppStd} PRIVATE _CRT_SECURE_NO_WARNINGS)
|
||||||
|
endif()
|
||||||
|
if(EMSCRIPTEN)
|
||||||
|
set_target_properties(filesystem_test_cpp${cppStd} PROPERTIES LINK_FLAGS "-g4 -s DISABLE_EXCEPTION_CATCHING=0 -s ALLOW_MEMORY_GROWTH=1")
|
||||||
|
endif()
|
||||||
|
ParseAndAddCatchTests(filesystem_test_cpp${cppStd})
|
||||||
|
endmacro()
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
@PACKAGE_INIT@
|
@PACKAGE_INIT@
|
||||||
|
|
||||||
set_and_check(ghcfilesystem_INCLUDE_DIRS "@PACKAGE_INCLUDE_INSTALL_DIR@")
|
# import targets
|
||||||
|
include("${CMAKE_CURRENT_LIST_DIR}/ghc_filesystem-targets.cmake")
|
||||||
|
|
||||||
check_required_components(ghcfilesystem)
|
check_required_components(ghcfilesystem)
|
@ -10,3 +10,8 @@ add_executable(fs_du du.cpp)
|
|||||||
target_link_libraries(fs_du ghc_filesystem)
|
target_link_libraries(fs_du ghc_filesystem)
|
||||||
AddExecutableWithStdFS(std_fs_du du.cpp)
|
AddExecutableWithStdFS(std_fs_du du.cpp)
|
||||||
|
|
||||||
|
if(EXISTS "${PROJECT_SOURCE_DIR}/examples/benchmark.cpp")
|
||||||
|
add_executable(fs_benchmark benchmark.cpp)
|
||||||
|
set_property(TARGET fs_benchmark PROPERTY CXX_STANDARD 17)
|
||||||
|
target_link_libraries(fs_benchmark ghc_filesystem)
|
||||||
|
endif()
|
File diff suppressed because it is too large
Load Diff
@ -25,7 +25,7 @@
|
|||||||
// SOFTWARE.
|
// SOFTWARE.
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------
|
||||||
// fs_fwd.hpp - The forwarding header for the header/implementation seperated usage of
|
// fs_fwd.hpp - The forwarding header for the header/implementation separated usage of
|
||||||
// ghc::filesystem.
|
// ghc::filesystem.
|
||||||
// This file can be include at any place, where ghc::filesystem api is needed while
|
// This file can be include at any place, where ghc::filesystem api is needed while
|
||||||
// not bleeding implementation details (e.g. system includes) into the global namespace,
|
// not bleeding implementation details (e.g. system includes) into the global namespace,
|
||||||
@ -34,5 +34,5 @@
|
|||||||
#ifndef GHC_FILESYSTEM_FWD_H
|
#ifndef GHC_FILESYSTEM_FWD_H
|
||||||
#define GHC_FILESYSTEM_FWD_H
|
#define GHC_FILESYSTEM_FWD_H
|
||||||
#define GHC_FILESYSTEM_FWD
|
#define GHC_FILESYSTEM_FWD
|
||||||
#include <ghc/filesystem.hpp>
|
#include "filesystem.hpp"
|
||||||
#endif // GHC_FILESYSTEM_FWD_H
|
#endif // GHC_FILESYSTEM_FWD_H
|
||||||
|
@ -25,11 +25,11 @@
|
|||||||
// SOFTWARE.
|
// SOFTWARE.
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------
|
||||||
// fs_impl.hpp - The implementation header for the header/implementation seperated usage of
|
// fs_impl.hpp - The implementation header for the header/implementation separated usage of
|
||||||
// ghc::filesystem.
|
// ghc::filesystem.
|
||||||
// This file can be used to hide the implementation of ghc::filesystem into a single cpp.
|
// This file can be used to hide the implementation of ghc::filesystem into a single cpp.
|
||||||
// The cpp has to include this before including fs_fwd.hpp directly or via a different
|
// The cpp has to include this before including fs_fwd.hpp directly or via a different
|
||||||
// header to work.
|
// header to work.
|
||||||
//---------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------
|
||||||
#define GHC_FILESYSTEM_IMPLEMENTATION
|
#define GHC_FILESYSTEM_IMPLEMENTATION
|
||||||
#include <ghc/filesystem.hpp>
|
#include "filesystem.hpp"
|
||||||
|
@ -30,27 +30,48 @@
|
|||||||
// namespace fs.
|
// namespace fs.
|
||||||
//---------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------
|
||||||
#ifndef GHC_FILESYSTEM_STD_H
|
#ifndef GHC_FILESYSTEM_STD_H
|
||||||
#if defined(__cplusplus) && __cplusplus >= 201703L && defined(__has_include)
|
#define GHC_FILESYSTEM_STD_H
|
||||||
#if __has_include(<filesystem>)
|
|
||||||
#define GHC_USE_STD_FS
|
|
||||||
#include <filesystem>
|
|
||||||
namespace fs {
|
|
||||||
using namespace std::filesystem;
|
|
||||||
using ifstream = std::ifstream;
|
|
||||||
using ofstream = std::ofstream;
|
|
||||||
using fstream = std::fstream;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#ifndef GHC_USE_STD_FS
|
|
||||||
#define GHC_WIN_WSTRING_STRING_TYPE
|
|
||||||
#include <ghc/filesystem.hpp>
|
|
||||||
namespace fs {
|
|
||||||
using namespace ghc::filesystem;
|
|
||||||
using ifstream = ghc::filesystem::ifstream;
|
|
||||||
using ofstream = ghc::filesystem::ofstream;
|
|
||||||
using fstream = ghc::filesystem::fstream;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif // GHC_FILESYSTEM_STD_H
|
|
||||||
|
|
||||||
|
#if defined(_MSVC_LANG) && _MSVC_LANG >= 201703L || __cplusplus >= 201703L && defined(__has_include)
|
||||||
|
// ^ Supports MSVC prior to 15.7 without setting /Zc:__cplusplus to fix __cplusplus
|
||||||
|
// _MSVC_LANG works regardless. But without the switch, the compiler always reported 199711L: https://blogs.msdn.microsoft.com/vcblog/2018/04/09/msvc-now-correctly-reports-__cplusplus/
|
||||||
|
#if __has_include(<filesystem>) // Two stage __has_include needed for MSVC 2015 and per https://gcc.gnu.org/onlinedocs/cpp/_005f_005fhas_005finclude.html
|
||||||
|
#define GHC_USE_STD_FS
|
||||||
|
|
||||||
|
// Old Apple OSs don't support std::filesystem, though the header is available at compile
|
||||||
|
// time. In particular, std::filesystem is unavailable before macOS 10.15, iOS/tvOS 13.0,
|
||||||
|
// and watchOS 6.0.
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#include <Availability.h>
|
||||||
|
// Note: This intentionally uses std::filesystem on any new Apple OS, like visionOS
|
||||||
|
// released after std::filesystem, where std::filesystem is always available.
|
||||||
|
// (All other __<platform>_VERSION_MIN_REQUIREDs will be undefined and thus 0.)
|
||||||
|
#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500 \
|
||||||
|
|| defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 130000 \
|
||||||
|
|| defined(__TV_OS_VERSION_MIN_REQUIRED) && __TV_OS_VERSION_MIN_REQUIRED < 130000 \
|
||||||
|
|| defined(__WATCH_OS_VERSION_MAX_ALLOWED) && __WATCH_OS_VERSION_MAX_ALLOWED < 60000
|
||||||
|
#undef GHC_USE_STD_FS
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef GHC_USE_STD_FS
|
||||||
|
#include <filesystem>
|
||||||
|
namespace fs {
|
||||||
|
using namespace std::filesystem;
|
||||||
|
using ifstream = std::ifstream;
|
||||||
|
using ofstream = std::ofstream;
|
||||||
|
using fstream = std::fstream;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
#include "filesystem.hpp"
|
||||||
|
namespace fs {
|
||||||
|
using namespace ghc::filesystem;
|
||||||
|
using ifstream = ghc::filesystem::ifstream;
|
||||||
|
using ofstream = ghc::filesystem::ofstream;
|
||||||
|
using fstream = ghc::filesystem::fstream;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // GHC_FILESYSTEM_STD_H
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
// SOFTWARE.
|
// SOFTWARE.
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------
|
||||||
// fs_std_fwd.hpp - The forwarding header for the header/implementation seperated usage of
|
// fs_std_fwd.hpp - The forwarding header for the header/implementation separated usage of
|
||||||
// ghc::filesystem that uses std::filesystem if it detects it.
|
// ghc::filesystem that uses std::filesystem if it detects it.
|
||||||
// This file can be include at any place, where fs::filesystem api is needed while
|
// This file can be include at any place, where fs::filesystem api is needed while
|
||||||
// not bleeding implementation details (e.g. system includes) into the global namespace,
|
// not bleeding implementation details (e.g. system includes) into the global namespace,
|
||||||
@ -33,28 +33,47 @@
|
|||||||
//---------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------
|
||||||
#ifndef GHC_FILESYSTEM_STD_FWD_H
|
#ifndef GHC_FILESYSTEM_STD_FWD_H
|
||||||
#define GHC_FILESYSTEM_STD_FWD_H
|
#define GHC_FILESYSTEM_STD_FWD_H
|
||||||
#if defined(__cplusplus) && __cplusplus >= 201703L && defined(__has_include)
|
|
||||||
#if __has_include(<filesystem>)
|
|
||||||
#define GHC_USE_STD_FS
|
|
||||||
#include <filesystem>
|
|
||||||
namespace fs {
|
|
||||||
using namespace std::filesystem;
|
|
||||||
using ifstream = std::ifstream;
|
|
||||||
using ofstream = std::ofstream;
|
|
||||||
using fstream = std::fstream;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#ifndef GHC_USE_STD_FS
|
|
||||||
#define GHC_WIN_WSTRING_STRING_TYPE
|
|
||||||
#define GHC_FILESYSTEM_FWD
|
|
||||||
#include <ghc/filesystem.hpp>
|
|
||||||
namespace fs {
|
|
||||||
using namespace ghc::filesystem;
|
|
||||||
using ifstream = ghc::filesystem::ifstream;
|
|
||||||
using ofstream = ghc::filesystem::ofstream;
|
|
||||||
using fstream = ghc::filesystem::fstream;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif // GHC_FILESYSTEM_STD_FWD_H
|
|
||||||
|
|
||||||
|
#if defined(_MSVC_LANG) && _MSVC_LANG >= 201703L || __cplusplus >= 201703L && defined(__has_include)
|
||||||
|
// ^ Supports MSVC prior to 15.7 without setting /Zc:__cplusplus to fix __cplusplus
|
||||||
|
// _MSVC_LANG works regardless. But without the switch, the compiler always reported 199711L: https://blogs.msdn.microsoft.com/vcblog/2018/04/09/msvc-now-correctly-reports-__cplusplus/
|
||||||
|
#if __has_include(<filesystem>) // Two stage __has_include needed for MSVC 2015 and per https://gcc.gnu.org/onlinedocs/cpp/_005f_005fhas_005finclude.html
|
||||||
|
#define GHC_USE_STD_FS
|
||||||
|
|
||||||
|
// Old Apple OSs don't support std::filesystem, though the header is available at compile
|
||||||
|
// time. In particular, std::filesystem is unavailable before macOS 10.15, iOS/tvOS 13.0,
|
||||||
|
// and watchOS 6.0.
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#include <Availability.h>
|
||||||
|
// Note: This intentionally uses std::filesystem on any new Apple OS, like visionOS
|
||||||
|
// released after std::filesystem, where std::filesystem is always available.
|
||||||
|
// (All other __<platform>_VERSION_MIN_REQUIREDs will be undefined and thus 0.)
|
||||||
|
#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500 \
|
||||||
|
|| defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 130000 \
|
||||||
|
|| defined(__TV_OS_VERSION_MIN_REQUIRED) && __TV_OS_VERSION_MIN_REQUIRED < 130000 \
|
||||||
|
|| defined(__WATCH_OS_VERSION_MAX_ALLOWED) && __WATCH_OS_VERSION_MAX_ALLOWED < 60000
|
||||||
|
#undef GHC_USE_STD_FS
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef GHC_USE_STD_FS
|
||||||
|
#include <filesystem>
|
||||||
|
namespace fs {
|
||||||
|
using namespace std::filesystem;
|
||||||
|
using ifstream = std::ifstream;
|
||||||
|
using ofstream = std::ofstream;
|
||||||
|
using fstream = std::fstream;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
#include "fs_fwd.hpp"
|
||||||
|
namespace fs {
|
||||||
|
using namespace ghc::filesystem;
|
||||||
|
using ifstream = ghc::filesystem::ifstream;
|
||||||
|
using ofstream = ghc::filesystem::ofstream;
|
||||||
|
using fstream = ghc::filesystem::fstream;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // GHC_FILESYSTEM_STD_FWD_H
|
||||||
|
@ -25,19 +25,36 @@
|
|||||||
// SOFTWARE.
|
// SOFTWARE.
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------
|
||||||
// fs_std_impl.hpp - The implementation header for the header/implementation seperated usage of
|
// fs_std_impl.hpp - The implementation header for the header/implementation separated usage of
|
||||||
// ghc::filesystem that does nothing if std::filesystem is detected.
|
// ghc::filesystem that does nothing if std::filesystem is detected.
|
||||||
// This file can be used to hide the implementation of ghc::filesystem into a single cpp.
|
// This file can be used to hide the implementation of ghc::filesystem into a single cpp.
|
||||||
// The cpp has to include this before including fs_std_fwd.hpp directly or via a different
|
// The cpp has to include this before including fs_std_fwd.hpp directly or via a different
|
||||||
// header to work.
|
// header to work.
|
||||||
//---------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------
|
||||||
#if defined(__cplusplus) && __cplusplus >= 201703L && defined(__has_include)
|
#if defined(_MSVC_LANG) && _MSVC_LANG >= 201703L || __cplusplus >= 201703L && defined(__has_include)
|
||||||
#if __has_include(<filesystem>)
|
// ^ Supports MSVC prior to 15.7 without setting /Zc:__cplusplus to fix __cplusplus
|
||||||
#define GHC_USE_STD_FS
|
// _MSVC_LANG works regardless. But without the switch, the compiler always reported 199711L: https://blogs.msdn.microsoft.com/vcblog/2018/04/09/msvc-now-correctly-reports-__cplusplus/
|
||||||
#endif
|
#if __has_include(<filesystem>) // Two stage __has_include needed for MSVC 2015 and per https://gcc.gnu.org/onlinedocs/cpp/_005f_005fhas_005finclude.html
|
||||||
|
#define GHC_USE_STD_FS
|
||||||
|
|
||||||
|
// Old Apple OSs don't support std::filesystem, though the header is available at compile
|
||||||
|
// time. In particular, std::filesystem is unavailable before macOS 10.15, iOS/tvOS 13.0,
|
||||||
|
// and watchOS 6.0.
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#include <Availability.h>
|
||||||
|
// Note: This intentionally uses std::filesystem on any new Apple OS, like visionOS
|
||||||
|
// released after std::filesystem, where std::filesystem is always available.
|
||||||
|
// (All other __<platform>_VERSION_MIN_REQUIREDs will be undefined and thus 0.)
|
||||||
|
#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500 \
|
||||||
|
|| defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 130000 \
|
||||||
|
|| defined(__TV_OS_VERSION_MIN_REQUIRED) && __TV_OS_VERSION_MIN_REQUIRED < 130000 \
|
||||||
|
|| defined(__WATCH_OS_VERSION_MAX_ALLOWED) && __WATCH_OS_VERSION_MAX_ALLOWED < 60000
|
||||||
|
#undef GHC_USE_STD_FS
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GHC_USE_STD_FS
|
#ifndef GHC_USE_STD_FS
|
||||||
#define GHC_WIN_WSTRING_STRING_TYPE
|
#include "fs_impl.hpp"
|
||||||
#define GHC_FILESYSTEM_IMPLEMENTATION
|
|
||||||
#include <ghc/filesystem.hpp>
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -3,6 +3,20 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
|
|||||||
set(PARSE_CATCH_TESTS_ADD_TO_CONFIGURE_DEPENDS ON)
|
set(PARSE_CATCH_TESTS_ADD_TO_CONFIGURE_DEPENDS ON)
|
||||||
include(ParseAndAddCatchTests)
|
include(ParseAndAddCatchTests)
|
||||||
|
|
||||||
|
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND UNIX AND NOT APPLE AND NOT BSD)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "-lc++abi")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
function(SetTestCompileOptions target_name)
|
||||||
|
target_compile_options(${target_name} PRIVATE
|
||||||
|
$<$<BOOL:${EMSCRIPTEN}>:-s DISABLE_EXCEPTION_CATCHING=0>
|
||||||
|
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wall -Wextra -Wshadow -Wconversion -Wsign-conversion -Wpedantic -Werror -Wno-deprecated-declarations>
|
||||||
|
$<$<CXX_COMPILER_ID:GNU>:-Wall -Wextra -Wshadow -Wconversion -Wsign-conversion -Wpedantic -Wno-psabi -Werror -Wno-deprecated-declarations>
|
||||||
|
$<$<CXX_COMPILER_ID:MSVC>:/WX /wd4996>
|
||||||
|
$<$<BOOL:${CYGWIN}>:-Wa,-mbig-obj>)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
if(GHC_COVERAGE)
|
if(GHC_COVERAGE)
|
||||||
message("Generating test runner for coverage run...")
|
message("Generating test runner for coverage run...")
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMCMAKE_EXE_LINKER_FLAGS} --coverage")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMCMAKE_EXE_LINKER_FLAGS} --coverage")
|
||||||
@ -13,36 +27,55 @@ if(GHC_COVERAGE)
|
|||||||
target_compile_options(filesystem_test PUBLIC --coverage)
|
target_compile_options(filesystem_test PUBLIC --coverage)
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(filesystem_test PUBLIC ghc_filesystem --coverage)
|
target_link_libraries(filesystem_test PUBLIC ghc_filesystem --coverage)
|
||||||
|
if(${CMAKE_SYSTEM_NAME} MATCHES "(SunOS|Solaris)")
|
||||||
|
target_link_libraries(filesystem_test PUBLIC xnet)
|
||||||
|
endif()
|
||||||
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
|
||||||
|
target_link_libraries(filesystem_test PUBLIC network)
|
||||||
|
endif()
|
||||||
|
if("cxx_std_17" IN_LIST GHC_FILESYSTEM_TEST_COMPILE_FEATURES)
|
||||||
|
AddTestExecutableWithStdCpp(17 filesystem_test.cpp catch.hpp)
|
||||||
|
endif()
|
||||||
|
if("cxx_std_20" IN_LIST GHC_FILESYSTEM_TEST_COMPILE_FEATURES)
|
||||||
|
AddTestExecutableWithStdCpp(20 filesystem_test.cpp catch.hpp)
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
message("Generating test runner for normal test...")
|
message("Generating test runner for normal test...")
|
||||||
add_executable(filesystem_test filesystem_test.cpp catch.hpp)
|
add_executable(filesystem_test filesystem_test.cpp catch.hpp)
|
||||||
target_link_libraries(filesystem_test ghc_filesystem)
|
target_link_libraries(filesystem_test ghc_filesystem)
|
||||||
target_compile_options(filesystem_test PRIVATE
|
if(${CMAKE_SYSTEM_NAME} MATCHES "(SunOS|Solaris)")
|
||||||
$<$<BOOL:${EMSCRIPTEN}>:-s DISABLE_EXCEPTION_CATCHING=0>
|
target_link_libraries(filesystem_test xnet)
|
||||||
$<$<CXX_COMPILER_ID:Clang>:-Wall -Wextra -Wshadow -Wconversion -Wsign-conversion -Wpedantic -Werror>
|
endif()
|
||||||
$<$<CXX_COMPILER_ID:GNU>:-Wall -Wextra -Wshadow -Wconversion -Wsign-conversion -Wpedantic -Wno-psabi -Werror>
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
|
||||||
$<$<CXX_COMPILER_ID:MSVC>:/WX>)
|
target_link_libraries(filesystem_test network)
|
||||||
|
endif()
|
||||||
|
SetTestCompileOptions(filesystem_test)
|
||||||
if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
||||||
target_compile_definitions(filesystem_test PRIVATE _CRT_SECURE_NO_WARNINGS)
|
target_compile_definitions(filesystem_test PRIVATE _CRT_SECURE_NO_WARNINGS WIN32_LEAN_AND_MEAN NOMINMAX)
|
||||||
endif()
|
endif()
|
||||||
if(EMSCRIPTEN)
|
if(EMSCRIPTEN)
|
||||||
set_target_properties(filesystem_test PROPERTIES LINK_FLAGS "-g4 -s DISABLE_EXCEPTION_CATCHING=0 -s ALLOW_MEMORY_GROWTH=1")
|
set_target_properties(filesystem_test PROPERTIES LINK_FLAGS "-g4 -s DISABLE_EXCEPTION_CATCHING=0 -s ALLOW_MEMORY_GROWTH=1")
|
||||||
endif()
|
endif()
|
||||||
ParseAndAddCatchTests(filesystem_test)
|
ParseAndAddCatchTests(filesystem_test)
|
||||||
AddExecutableWithStdFS(std_filesystem_test filesystem_test.cpp catch.hpp)
|
if(GHC_FILESYSTEM_BUILD_STD_TESTING)
|
||||||
|
AddExecutableWithStdFS(std_filesystem_test filesystem_test.cpp catch.hpp)
|
||||||
|
endif()
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
add_executable(filesystem_test_wchar filesystem_test.cpp catch.hpp)
|
add_executable(filesystem_test_char filesystem_test.cpp catch.hpp)
|
||||||
target_link_libraries(filesystem_test_wchar ghc_filesystem)
|
target_link_libraries(filesystem_test_char ghc_filesystem)
|
||||||
target_compile_options(filesystem_test_wchar PRIVATE
|
SetTestCompileOptions(filesystem_test_char)
|
||||||
$<$<CXX_COMPILER_ID:Clang>:-Wall -Wextra -Werror>
|
|
||||||
$<$<CXX_COMPILER_ID:GNU>:-Wall -Werror>
|
|
||||||
$<$<CXX_COMPILER_ID:MSVC>:/WX>)
|
|
||||||
if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
||||||
target_compile_definitions(filesystem_test_wchar PRIVATE _CRT_SECURE_NO_WARNINGS GHC_WIN_WSTRING_STRING_TYPE)
|
target_compile_definitions(filesystem_test_char PRIVATE _CRT_SECURE_NO_WARNINGS GHC_WIN_DISABLE_WSTRING_STORAGE_TYPE)
|
||||||
else()
|
else()
|
||||||
target_compile_definitions(filesystem_test_wchar PRIVATE GHC_WIN_WSTRING_STRING_TYPE)
|
target_compile_definitions(filesystem_test_char PRIVATE GHC_WIN_DISABLE_WSTRING_STORAGE_TYPE)
|
||||||
endif()
|
endif()
|
||||||
ParseAndAddCatchTests(filesystem_test_wchar)
|
ParseAndAddCatchTests(filesystem_test_char)
|
||||||
|
endif()
|
||||||
|
if("cxx_std_17" IN_LIST GHC_FILESYSTEM_TEST_COMPILE_FEATURES)
|
||||||
|
AddTestExecutableWithStdCpp(17 filesystem_test.cpp catch.hpp)
|
||||||
|
endif()
|
||||||
|
if("cxx_std_20" IN_LIST GHC_FILESYSTEM_TEST_COMPILE_FEATURES)
|
||||||
|
AddTestExecutableWithStdCpp(20 filesystem_test.cpp catch.hpp)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -52,8 +85,15 @@ add_test(multifile_test multifile_test)
|
|||||||
|
|
||||||
add_executable(fwd_impl_test fwd_test.cpp impl_test.cpp)
|
add_executable(fwd_impl_test fwd_test.cpp impl_test.cpp)
|
||||||
target_link_libraries(fwd_impl_test ghc_filesystem)
|
target_link_libraries(fwd_impl_test ghc_filesystem)
|
||||||
|
if(${CMAKE_SYSTEM_NAME} MATCHES "(SunOS|Solaris)")
|
||||||
|
target_link_libraries(fwd_impl_test xnet)
|
||||||
|
endif()
|
||||||
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
|
||||||
|
target_link_libraries(fwd_impl_test network)
|
||||||
|
endif()
|
||||||
|
SetTestCompileOptions(fwd_impl_test)
|
||||||
if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
||||||
target_compile_definitions(fwd_impl_test PRIVATE _CRT_SECURE_NO_WARNINGS)
|
target_compile_definitions(fwd_impl_test PRIVATE _CRT_SECURE_NO_WARNINGS WIN32_LEAN_AND_MEAN NOMINMAX)
|
||||||
endif()
|
endif()
|
||||||
add_test(fwd_impl_test fwd_impl_test)
|
add_test(fwd_impl_test fwd_impl_test)
|
||||||
|
|
||||||
@ -62,3 +102,4 @@ if(NOT MSVC)
|
|||||||
target_compile_options(exception PRIVATE -fno-exceptions)
|
target_compile_options(exception PRIVATE -fno-exceptions)
|
||||||
endif()
|
endif()
|
||||||
target_include_directories(exception PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../include)
|
target_include_directories(exception PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../include)
|
||||||
|
SetTestCompileOptions(exception)
|
||||||
|
7827
test/catch.hpp
7827
test/catch.hpp
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,6 @@
|
|||||||
// where exactly one cpp includes fs_impl.hpp and all others use
|
// where exactly one cpp includes fs_impl.hpp and all others use
|
||||||
// fs_fwd.hpp (to test this with maximum functionality, the unit tests
|
// fs_fwd.hpp (to test this with maximum functionality, the unit tests
|
||||||
// are included here, signaling they should only include the fs_fwd.hpp)
|
// are included here, signaling they should only include the fs_fwd.hpp)
|
||||||
#define NOMINMAX
|
|
||||||
#include <ghc/fs_impl.hpp>
|
#include <ghc/fs_impl.hpp>
|
||||||
#define CATCH_CONFIG_MAIN
|
#define CATCH_CONFIG_MAIN
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include <ghc/filesystem.hpp>
|
#include <ghc/filesystem.hpp>
|
||||||
namespace fs = ghc::filesystem;
|
namespace fs = ghc::filesystem;
|
||||||
|
|
||||||
// This test and the one in multi2.cpp doesn't actualy test relevant functionality,
|
// This test and the one in multi2.cpp doesn't actually test relevant functionality,
|
||||||
// it is just used to check that it is possible to include filesystem.h in multiple
|
// it is just used to check that it is possible to include filesystem.h in multiple
|
||||||
// source files.
|
// source files.
|
||||||
TEST_CASE("Multifile-test 1", "[multi]")
|
TEST_CASE("Multifile-test 1", "[multi]")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user