mirror of
https://git.mirrors.martin98.com/https://github.com/gulrak/filesystem
synced 2025-06-04 11:13:58 +08:00
Work on better CI integration.
This commit is contained in:
parent
2a15f1833f
commit
8b37292acb
10
.travis.yml
10
.travis.yml
@ -77,11 +77,15 @@ script:
|
||||
if [ "${GHC_COVERAGE}" = "1" ]; then
|
||||
cmake --build . --config ${CONFIG} --target filesystem_test
|
||||
test/filesystem_test
|
||||
lcov --compat-libtool --directory . --capture --output-file coverage_output.info
|
||||
lcov --remove coverage_output.info '/usr/*' '*/c++/*' '*.h' '*/catch.hpp' -o coverage.info
|
||||
coveralls-lcov coverage.info
|
||||
else
|
||||
cmake --build . --config ${CONFIG}
|
||||
ctest -C ${CONFIG} -E Windows
|
||||
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
|
||||
coveralls-lcov coverage.info
|
||||
fi
|
||||
|
@ -4,23 +4,23 @@ set(PARSE_CATCH_TESTS_ADD_TO_CONFIGURE_DEPENDS ON)
|
||||
include(ParseAndAddCatchTests)
|
||||
|
||||
if(GHC_COVERAGE)
|
||||
message("Generating test runner for coverage run...")
|
||||
add_executable(filesystem_test filesystem_test.cpp catch.hpp)
|
||||
target_compile_options(filesystem_test PUBLIC --coverage)
|
||||
target_link_libraries(filesystem_test PUBLIC ghc_filesystem --coverage)
|
||||
else()
|
||||
message("Generating test runner for normal test...")
|
||||
add_executable(filesystem_test filesystem_test.cpp catch.hpp)
|
||||
target_link_libraries(filesystem_test ghc_filesystem)
|
||||
target_compile_options(filesystem_test PRIVATE
|
||||
$<$<CXX_COMPILER_ID:Clang>:-Wall -Wextra -Werror>
|
||||
$<$<CXX_COMPILER_ID:GNU>:-Wall -Werror>
|
||||
$<$<CXX_COMPILER_ID:MSVC>:/WX>)
|
||||
$<$<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)
|
||||
target_compile_definitions(filesystem_test PRIVATE _CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
ParseAndAddCatchTests(filesystem_test filesystem_test)
|
||||
AddExecutableWithStdFS(std_filesystem_test filesystem_test.cpp catch.hpp)
|
||||
else()
|
||||
message("Generating test runner for coverage run...")
|
||||
add_executable(filesystem_test filesystem_test.cpp catch.hpp)
|
||||
target_compile_options(filesystem_test PUBLIC --coverage)
|
||||
target_link_libraries(filesystem_test PUBLIC ghc_filesystem --coverage)
|
||||
endif()
|
||||
|
||||
add_executable(multifile_test multi1.cpp multi2.cpp catch.hpp)
|
||||
|
Loading…
x
Reference in New Issue
Block a user