diff options
author | Nils Gladitz <nilsgladitz@gmail.com> | 2015-04-02 15:02:08 (GMT) |
---|---|---|
committer | Nils Gladitz <nilsgladitz@gmail.com> | 2015-04-04 10:25:15 (GMT) |
commit | 9a544f2d987df940625465129a5f00bea01ad4eb (patch) | |
tree | 5ef0b0cfd39cd226e5aa363290710f910bdd261d /Tests/CTestCoverageCollectGCOV/fakegcov.cmake | |
parent | f707460e42949e4ca372bf23892a7d6fb9eb1b86 (diff) | |
download | CMake-9a544f2d987df940625465129a5f00bea01ad4eb.zip CMake-9a544f2d987df940625465129a5f00bea01ad4eb.tar.gz CMake-9a544f2d987df940625465129a5f00bea01ad4eb.tar.bz2 |
CTestCoverageCollectGCOV: Support CTEST_CUSTOM_COVERAGE_EXCLUDE
Diffstat (limited to 'Tests/CTestCoverageCollectGCOV/fakegcov.cmake')
-rw-r--r-- | Tests/CTestCoverageCollectGCOV/fakegcov.cmake | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Tests/CTestCoverageCollectGCOV/fakegcov.cmake b/Tests/CTestCoverageCollectGCOV/fakegcov.cmake index e704f14..b0c3a9b 100644 --- a/Tests/CTestCoverageCollectGCOV/fakegcov.cmake +++ b/Tests/CTestCoverageCollectGCOV/fakegcov.cmake @@ -3,6 +3,12 @@ foreach(I RANGE 0 ${CMAKE_ARGC}) set(gcda_file "${CMAKE_ARGV${I}}") endif() endforeach() -get_filename_component(gcda_file ${gcda_file} NAME_WE) -file(WRITE "${CMAKE_SOURCE_DIR}/${gcda_file}.gcov" -"fake gcov file") + +get_filename_component(gcda_name ${gcda_file} NAME) +string(REPLACE ".gcda" ".gcov" gcov_name "${gcda_name}") + +file(STRINGS "${gcda_file}" source_file LIMIT_COUNT 1 ENCODING UTF-8) + +file(WRITE "${CMAKE_SOURCE_DIR}/${gcov_name}" + " -: 0:Source:${source_file}" +) |