summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-03-17 04:37:21 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-03-17 14:32:57 +0000
commitea7ecd6d3229da0624aaa309f8a5da8a91d77c3e (patch)
tree1718be85b7c8969f524ae26d79eb4c3f4b463e1c /cmake
parent571b10149da5a6ee0806109f076666b46d11604b (diff)
Add COVERAGE cmake flag for clang.
This only works with clang/llvm. Coveralls support needs to be added later.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/CompileGTest.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmake/CompileGTest.cmake b/cmake/CompileGTest.cmake
index 1974901e..b7e0175f 100644
--- a/cmake/CompileGTest.cmake
+++ b/cmake/CompileGTest.cmake
@@ -54,5 +54,6 @@ function(unit_test subdir target)
54 target_link_modules(unit_${target}_test toxcore gtest) 54 target_link_modules(unit_${target}_test toxcore gtest)
55 set_target_properties(unit_${target}_test PROPERTIES COMPILE_FLAGS "${TEST_CXX_FLAGS}") 55 set_target_properties(unit_${target}_test PROPERTIES COMPILE_FLAGS "${TEST_CXX_FLAGS}")
56 add_test(NAME ${target} COMMAND ${CROSSCOMPILING_EMULATOR} unit_${target}_test) 56 add_test(NAME ${target} COMMAND ${CROSSCOMPILING_EMULATOR} unit_${target}_test)
57 set_property(TEST ${target} PROPERTY ENVIRONMENT "LLVM_PROFILE_FILE=${target}.profraw")
57 endif() 58 endif()
58endfunction() 59endfunction()