From d70a9fbfd4cb1b5cef2f514dd40402d7d22035f2 Mon Sep 17 00:00:00 2001 From: Rick V Date: Fri, 18 Jan 2019 21:10:32 -0600 Subject: [PATCH] oops, that patch would have tanked a 64-bit windows profile run --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 09c738bd7..013a61f15 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,8 +46,13 @@ add_compile_options($<$:-fpermissive>) add_compile_options(-Wno-unused-function -Wno-deprecated-declarations -Wno-unknown-pragmas) if (WITH_COVERAGE) - add_compile_options( --coverage -g0 ) - link_libraries( --coverage ) + if (USING_CLANG) + add_compile_options( -fprofile-instr-generate -fcoverage-mapping ) + link_libraries( -fprofile-instr-generate ) + else() + add_compile_options( --coverage -g0 ) + link_libraries( --coverage ) + endif() endif() # these vars are set by the cmake toolchain spec