CMake-codecov icon indicating copy to clipboard operation
CMake-codecov copied to clipboard

Avoid gcov filenames too long

Open zhongpan opened this issue 4 years ago • 1 comments

In PR add support for Ninja #22, I realized that I had introduced two issues:

  1. The gcov file name may exceed the maximum length limit
  2. When build gcov target, always regenerate the gcov file, because the OUTPUT parameter in the add_custom_command command is not the actual generated file.

Solutions:

  1. Replace -p with -x, and move the gcov file to the path corresponding to the hash(-x) for better readability
  2. OUTPUT is the file moved above

zhongpan avatar May 18 '20 08:05 zhongpan

Can you link some resources about the "maximum length limit"? As fas as I know a path may take up to 4096 characters in Linux.

alehaa avatar Jul 02 '20 20:07 alehaa