mirror of
https://git.mirrors.martin98.com/https://github.com/gulrak/filesystem
synced 2025-06-04 11:13:58 +08:00
Work on CI support.
This commit is contained in:
parent
6ab8c8fc72
commit
00a8d0437d
46
.travis.yml
Normal file
46
.travis.yml
Normal file
@ -0,0 +1,46 @@
|
||||
language: cpp
|
||||
|
||||
dist: trusty # default distribution
|
||||
os: linux # default os
|
||||
sudo: false
|
||||
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- env: CC=gcc-5 CXX=g++-5 GENERATOR="Unix Makefiles"
|
||||
addons: { apt: { packages: ["g++-5"], sources: ["ubuntu-toolchain-r-test"] } }
|
||||
|
||||
- env: CC=gcc-6 CXX=g++-6 GENERATOR="Unix Makefiles"
|
||||
addons: { apt: { packages: ["g++-6"], sources: ["ubuntu-toolchain-r-test"] } }
|
||||
|
||||
- env: CC=gcc-7 CXX=g++-7 GENERATOR="Unix Makefiles"
|
||||
addons: { apt: { packages: ["g++-7"], sources: ["ubuntu-toolchain-r-test"] } }
|
||||
|
||||
- env: CC=gcc-8 CXX=g++-8 GENERATOR="Unix Makefiles"
|
||||
addons: { apt: { packages: ["g++-8"], sources: ["ubuntu-toolchain-r-test"] } }
|
||||
|
||||
- env: CC=clang-5.0 CXX=clang++-5.0 GENERATOR="Unix Makefiles"
|
||||
addons: { apt: { packages: ["g++-8", "clang-5.0"], sources: ["llvm-toolchain-trusty-5.0", "ubuntu-toolchain-r-test"] } }
|
||||
|
||||
- env: CC=clang-6.0 CXX=clang++-6.0 GENERATOR="Unix Makefiles"
|
||||
addons: { apt: { packages: ["g++-8", "clang-6.0"], sources: ["llvm-toolchain-trusty-6.0", "ubuntu-toolchain-r-test"] } }
|
||||
|
||||
- os: osx
|
||||
env: CC=clang CXX=clang++ GENERATOR="Xcode"
|
||||
osx_image: xcode9.2
|
||||
|
||||
install:
|
||||
- $CC --version
|
||||
- $CXX --version
|
||||
- cmake --version
|
||||
|
||||
before_script:
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake -G${GENERATOR} -DCMAKE_CXX_COMPILER=${CXX} -DCMAKE_C_COMPILER=${CC} ..
|
||||
|
||||
script:
|
||||
- cmake --build . --config Release
|
||||
- ctest
|
||||
|
@ -25,6 +25,7 @@ target_compile_options(ghc_filesystem INTERFACE "$<$<CXX_COMPILER_ID:MSVC>:/utf-
|
||||
|
||||
get_directory_property(hasParent PARENT_DIRECTORY)
|
||||
if(NOT hasParent)
|
||||
enable_testing()
|
||||
add_subdirectory(test)
|
||||
add_subdirectory(examples)
|
||||
endif()
|
||||
|
@ -1,3 +1,5 @@
|
||||
[](https://travis-ci.org/gulrak/filesystem)
|
||||
|
||||
# Filesystem
|
||||
|
||||
This is a header-only single-file std::filesystem compatible helper library,
|
||||
@ -200,7 +202,7 @@ that use this technique, so you can simply include them if you want to dynamical
|
||||
the filesystem implementation.
|
||||
|
||||
|
||||
### Git Submodule
|
||||
### Git Submodule and CMake
|
||||
|
||||
Starting from v1.1.0, it is possible to add `ghc::filesystem`
|
||||
as a git submodule, add the directory to your `CMakeLists.txt` with
|
||||
|
@ -13,6 +13,7 @@ if(CMAKE_GENERATOR STREQUAL Xcode)
|
||||
target_compile_options(filesystem_test_cov PRIVATE "$<$<CONFIG:DEBUG>:--coverage>")
|
||||
target_link_libraries(filesystem_test_cov PUBLIC ghc_filesystem PRIVATE --coverage)
|
||||
endif()
|
||||
add_test(filesystem_test filesystem_test)
|
||||
|
||||
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)
|
||||
@ -39,9 +40,11 @@ endif()
|
||||
|
||||
add_executable(multifile_test multi1.cpp multi2.cpp catch.hpp)
|
||||
target_link_libraries(multifile_test ghc_filesystem)
|
||||
add_test(multifile_test multifile_test)
|
||||
|
||||
add_executable(fwd_impl_test fwd_test.cpp impl_test.cpp)
|
||||
target_link_libraries(fwd_impl_test ghc_filesystem)
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
||||
target_compile_definitions(fwd_impl_test PRIVATE _CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
add_test(fwd_impl_test fwd_impl_test)
|
||||
|
Loading…
x
Reference in New Issue
Block a user