diff options
author | Francesco Borzì <borzifrancesco@gmail.com> | 2020-08-17 15:17:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-17 15:17:21 +0200 |
commit | da61bf3a4266a60ef5058bf47376b868f02fbc58 (patch) | |
tree | 47ee827b933587fac9ed47d961197303543b1e6f /CMakeLists.txt | |
parent | da1725cfc30dd39e54910b2d9da2c21a00e001c0 (diff) |
test: fix some cmake params (#3308)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 79c73eccbd..40ead37e8c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,7 +141,8 @@ CU_RUN_HOOK("AFTER_SRC_LOAD") if( UNIT_TESTS ) # we use this to get code coverage - if(CMAKE_CXX_COMPILER_ID MATCHES GNU) + if(CMAKE_CXX_COMPILER_ID MATCHES GNU OR CMAKE_CXX_COMPILER_ID MATCHES Clang) + message("Unit tests code coverage: enabling -fprofile-arcs -ftest-coverage") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage") endif() |