summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 20182fbb..1f18988c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -89,6 +89,12 @@ if(NOT MSVC)
89 add_flag("-Werror") 89 add_flag("-Werror")
90 endif() 90 endif()
91 91
92 option(COVERAGE "Track code coverage" OFF)
93 if(COVERAGE)
94 add_flag("-fprofile-instr-generate")
95 add_flag("-fcoverage-mapping")
96 endif()
97
92 option(DEBUG "Enable assertions and other debugging facilities" OFF) 98 option(DEBUG "Enable assertions and other debugging facilities" OFF)
93 if(DEBUG) 99 if(DEBUG)
94 set(MIN_LOGGER_LEVEL DEBUG) 100 set(MIN_LOGGER_LEVEL DEBUG)
@@ -457,6 +463,7 @@ function(auto_test target)
457 if(NOT ARGV1 STREQUAL "DONT_RUN") 463 if(NOT ARGV1 STREQUAL "DONT_RUN")
458 add_test(NAME ${target} COMMAND ${CROSSCOMPILING_EMULATOR} auto_${target}_test) 464 add_test(NAME ${target} COMMAND ${CROSSCOMPILING_EMULATOR} auto_${target}_test)
459 set_tests_properties(${target} PROPERTIES TIMEOUT "${TEST_TIMEOUT_SECONDS}") 465 set_tests_properties(${target} PROPERTIES TIMEOUT "${TEST_TIMEOUT_SECONDS}")
466 set_property(TEST ${target} PROPERTY ENVIRONMENT "LLVM_PROFILE_FILE=${target}.profraw")
460 endif() 467 endif()
461 endif() 468 endif()
462endfunction() 469endfunction()