From 8552dc6092ef4e1e9ecb8a44dbd4573e26d1fb25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Sch=C3=BCmann?= Date: Thu, 30 May 2019 21:49:59 +0200 Subject: [PATCH] Added big-obj compile options for coverage builds on mingw. --- test/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index ebd01af..a601eb7 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -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...")