Added big-obj compile options for coverage builds on mingw.

This commit is contained in:
Steffen Schümann 2019-05-30 21:49:59 +02:00
parent 96ea0dd12e
commit 8552dc6092

View File

@ -5,8 +5,13 @@ include(ParseAndAddCatchTests)
if(GHC_COVERAGE)
message("Generating test runner for coverage run...")
set(CMAKE_EXE_LINKER_FLAGS "${CMCMAKE_EXE_LINKER_FLAGS} --coverage")
add_executable(filesystem_test filesystem_test.cpp catch.hpp)
target_compile_options(filesystem_test PUBLIC --coverage)
if(MINGW)
target_compile_options(filesystem_test PUBLIC --coverage "-Wa,-mbig-obj")
else()
target_compile_options(filesystem_test PUBLIC --coverage)
endif()
target_link_libraries(filesystem_test PUBLIC ghc_filesystem --coverage)
else()
message("Generating test runner for normal test...")