Skip to content

Commit

Permalink
macro get_source_path_from_gcov_filename should return absolute path,…
Browse files Browse the repository at this point in the history
… also ^ symbold should replace to up level(..) (JoakimSoderberg#21)
  • Loading branch information
topilski authored and JoakimSoderberg committed Jul 29, 2017
1 parent e37d5b8 commit 9f96714
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmake/CoverallsGenerateGcov.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,10 @@ macro(get_source_path_from_gcov_filename _SRC_FILENAME _GCOV_FILENAME)

# #path#to#project#root#subdir#the_file.c.gcov -> /path/to/project/root/subdir/the_file.c
string(REGEX REPLACE "\\.gcov$" "" SRC_FILENAME_TMP ${_GCOV_FILENAME_WEXT})
string(REGEX REPLACE "\\^" ".." SRC_FILENAME_TMP ${SRC_FILENAME_TMP})
string(REGEX REPLACE "\#" "/" SRC_FILENAME_TMP ${SRC_FILENAME_TMP})
set(${_SRC_FILENAME} "${SRC_FILENAME_TMP}")
get_filename_component(SRC_FILENAME_TMP_ABSOLUTE ${SRC_FILENAME_TMP} ABSOLUTE)
set(${_SRC_FILENAME} "${SRC_FILENAME_TMP_ABSOLUTE}")
endmacro()

##############################################################################
Expand Down

0 comments on commit 9f96714

Please sign in to comment.